diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..d45ba0bf --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ +.DEFAULT_GOAL := testenv + +.PHONY: testenv +testenv: + docker run \ + --rm -it \ + -v $(PWD):/sdk \ + -w /sdk \ + composer:1.8 \ + /bin/bash -c "composer i; /bin/bash" \ No newline at end of file diff --git a/README.md b/README.md index 5030bb3c..91687734 100644 --- a/README.md +++ b/README.md @@ -11,15 +11,15 @@ manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. -For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, -the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint -is `https://mycompany.talon.one/v2/customer_sessions/{Id}` +For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, +the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint +is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 1.0.0 -- Package version: 4.0.1 +- API version: +- Package version: 5.0.0 - Build package: org.openapitools.codegen.languages.PhpClientCodegen ## Requirements @@ -87,7 +87,7 @@ require_once(__DIR__ . '/vendor/autoload.php'); // Configure Host, API key, & API key prefix for integration authentication $config = \TalonOne\Client\Configuration::getDefaultConfiguration() - ->setHost('https://mycompany.talon.one') + ->setHost('https://yourbaseurl.talon.one') ->setApiKeyPrefix('Authorization', 'ApiKey-v1') ->setApiKey('Authorization', 'dbc644d33aa74d582bd9479c59e16f970fe13bf34a208c39d6c7fa7586968468'); @@ -159,10 +159,11 @@ try { require_once(__DIR__ . '/vendor/autoload.php'); -// Configure Host & API key prefix for management authentication +// Configure Host, API key, & API key prefix for management authentication $config = \TalonOne\Client\Configuration::getDefaultConfiguration() - ->setHost('https://mycompany.talon.one') - ->setApiKeyPrefix('Authorization', 'Bearer'); + ->setHost('https://yourbaseurl.talon.one') + ->setApiKeyPrefix('Authorization', 'ManagementKey-v1') + ->setApiKey('Authorization', '2f0dce055da01ae595005d7d79154bae7448d319d5fc7c5b2951fadd6ba1ea07'); // Initiating a management api instance with the config $apiInstance = new \TalonOne\Client\Api\ManagementApi( @@ -173,17 +174,6 @@ $apiInstance = new \TalonOne\Client\Api\ManagementApi( ); try { - $loginParams = new \TalonOne\Client\Model\LoginParams([ - 'email' => 'admin@talon.one', - 'password' => 'VerySecurePa$$word!' - ]); - - // create a session (login) in order to get a token - $session = $apiInstance->createSession($loginParams); - - // Save token in the configuration as API key - $config->setApiKey('Authorization', $session->getToken()); - $application_id = 7; // int | desired application identifier // Calling `getApplication` function $application = $apiInstance->getApplication($application_id); @@ -211,8 +201,13 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**deleteCustomerData**](docs/Api/IntegrationApi.md#deletecustomerdata) | **DELETE** /v1/customer_data/{integrationId} | Delete customer's personal data *IntegrationApi* | [**getCustomerInventory**](docs/Api/IntegrationApi.md#getcustomerinventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | List customer data *IntegrationApi* | [**getCustomerSession**](docs/Api/IntegrationApi.md#getcustomersession) | **GET** /v2/customer_sessions/{customerSessionId} | Get customer session -*IntegrationApi* | [**getLoyaltyTransactions**](docs/Api/IntegrationApi.md#getloyaltytransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | Get loyalty ledger transaction logs +*IntegrationApi* | [**getLoyaltyBalances**](docs/Api/IntegrationApi.md#getloyaltybalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points +*IntegrationApi* | [**getLoyaltyCardBalances**](docs/Api/IntegrationApi.md#getloyaltycardbalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances | Get card's point balances +*IntegrationApi* | [**getLoyaltyCardTransactions**](docs/Api/IntegrationApi.md#getloyaltycardtransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions | List card's transactions +*IntegrationApi* | [**getLoyaltyProgramProfileTransactions**](docs/Api/IntegrationApi.md#getloyaltyprogramprofiletransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions *IntegrationApi* | [**getReservedCustomers**](docs/Api/IntegrationApi.md#getreservedcustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved +*IntegrationApi* | [**linkLoyaltyCardToProfile**](docs/Api/IntegrationApi.md#linkloyaltycardtoprofile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card +*IntegrationApi* | [**reopenCustomerSession**](docs/Api/IntegrationApi.md#reopencustomersession) | **PUT** /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session *IntegrationApi* | [**returnCartItems**](docs/Api/IntegrationApi.md#returncartitems) | **POST** /v2/customer_sessions/{customerSessionId}/returns | Return cart items *IntegrationApi* | [**syncCatalog**](docs/Api/IntegrationApi.md#synccatalog) | **PUT** /v1/catalogs/{catalogId}/sync | Sync cart item catalog *IntegrationApi* | [**trackEvent**](docs/Api/IntegrationApi.md#trackevent) | **POST** /v1/events | Track event @@ -223,8 +218,9 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**updateCustomerProfileV2**](docs/Api/IntegrationApi.md#updatecustomerprofilev2) | **PUT** /v2/customer_profiles/{integrationId} | Update customer profile *IntegrationApi* | [**updateCustomerProfilesV2**](docs/Api/IntegrationApi.md#updatecustomerprofilesv2) | **PUT** /v2/customer_profiles | Update multiple customer profiles *IntegrationApi* | [**updateCustomerSessionV2**](docs/Api/IntegrationApi.md#updatecustomersessionv2) | **PUT** /v2/customer_sessions/{customerSessionId} | Update customer session -*ManagementApi* | [**addLoyaltyPoints**](docs/Api/ManagementApi.md#addloyaltypoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points in loyalty program for given customer -*ManagementApi* | [**copyCampaignToApplications**](docs/Api/ManagementApi.md#copycampaigntoapplications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified application +*ManagementApi* | [**addLoyaltyCardPoints**](docs/Api/ManagementApi.md#addloyaltycardpoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points | Add points to card +*ManagementApi* | [**addLoyaltyPoints**](docs/Api/ManagementApi.md#addloyaltypoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points to customer profile +*ManagementApi* | [**copyCampaignToApplications**](docs/Api/ManagementApi.md#copycampaigntoapplications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified Application *ManagementApi* | [**createAccountCollection**](docs/Api/ManagementApi.md#createaccountcollection) | **POST** /v1/collections | Create account-level collection *ManagementApi* | [**createAdditionalCost**](docs/Api/ManagementApi.md#createadditionalcost) | **POST** /v1/additional_costs | Create additional cost *ManagementApi* | [**createAttribute**](docs/Api/ManagementApi.md#createattribute) | **POST** /v1/attributes | Create custom attribute @@ -233,15 +229,17 @@ Class | Method | HTTP request | Description *ManagementApi* | [**createCoupons**](docs/Api/ManagementApi.md#createcoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons *ManagementApi* | [**createCouponsAsync**](docs/Api/ManagementApi.md#createcouponsasync) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously *ManagementApi* | [**createCouponsForMultipleRecipients**](docs/Api/ManagementApi.md#createcouponsformultiplerecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients -*ManagementApi* | [**createNotificationWebhook**](docs/Api/ManagementApi.md#createnotificationwebhook) | **POST** /v1/applications/{applicationId}/notification_webhooks | Create notification webhook +*ManagementApi* | [**createNotificationWebhook**](docs/Api/ManagementApi.md#createnotificationwebhook) | **POST** /v1/applications/{applicationId}/notification_webhooks | Create notification about campaign-related changes *ManagementApi* | [**createPasswordRecoveryEmail**](docs/Api/ManagementApi.md#createpasswordrecoveryemail) | **POST** /v1/password_recovery_emails | Request a password reset *ManagementApi* | [**createSession**](docs/Api/ManagementApi.md#createsession) | **POST** /v1/sessions | Create session +*ManagementApi* | [**deductLoyaltyCardPoints**](docs/Api/ManagementApi.md#deductloyaltycardpoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points | Deduct points from card *ManagementApi* | [**deleteAccountCollection**](docs/Api/ManagementApi.md#deleteaccountcollection) | **DELETE** /v1/collections/{collectionId} | Delete account-level collection *ManagementApi* | [**deleteCampaign**](docs/Api/ManagementApi.md#deletecampaign) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId} | Delete campaign *ManagementApi* | [**deleteCollection**](docs/Api/ManagementApi.md#deletecollection) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Delete collection *ManagementApi* | [**deleteCoupon**](docs/Api/ManagementApi.md#deletecoupon) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Delete coupon *ManagementApi* | [**deleteCoupons**](docs/Api/ManagementApi.md#deletecoupons) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Delete coupons -*ManagementApi* | [**deleteNotificationWebhook**](docs/Api/ManagementApi.md#deletenotificationwebhook) | **DELETE** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Delete notification webhook +*ManagementApi* | [**deleteLoyaltyCard**](docs/Api/ManagementApi.md#deleteloyaltycard) | **DELETE** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Delete loyalty card +*ManagementApi* | [**deleteNotificationWebhook**](docs/Api/ManagementApi.md#deletenotificationwebhook) | **DELETE** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Delete notification about campaign-related changes *ManagementApi* | [**deleteReferral**](docs/Api/ManagementApi.md#deletereferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete referral *ManagementApi* | [**destroySession**](docs/Api/ManagementApi.md#destroysession) | **DELETE** /v1/sessions | Destroy session *ManagementApi* | [**exportAccountCollectionItems**](docs/Api/ManagementApi.md#exportaccountcollectionitems) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items @@ -249,8 +247,11 @@ Class | Method | HTTP request | Description *ManagementApi* | [**exportCoupons**](docs/Api/ManagementApi.md#exportcoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons *ManagementApi* | [**exportCustomerSessions**](docs/Api/ManagementApi.md#exportcustomersessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions *ManagementApi* | [**exportEffects**](docs/Api/ManagementApi.md#exporteffects) | **GET** /v1/applications/{applicationId}/export_effects | Export triggered effects -*ManagementApi* | [**exportLoyaltyBalance**](docs/Api/ManagementApi.md#exportloyaltybalance) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance | Export customer loyalty balance to a CSV file -*ManagementApi* | [**exportLoyaltyLedger**](docs/Api/ManagementApi.md#exportloyaltyledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export a customer's loyalty ledger log +*ManagementApi* | [**exportLoyaltyBalance**](docs/Api/ManagementApi.md#exportloyaltybalance) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance | Export customer loyalty balance to CSV +*ManagementApi* | [**exportLoyaltyBalances**](docs/Api/ManagementApi.md#exportloyaltybalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances | Export customer loyalty balances +*ManagementApi* | [**exportLoyaltyCardBalances**](docs/Api/ManagementApi.md#exportloyaltycardbalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs +*ManagementApi* | [**exportLoyaltyCardLedger**](docs/Api/ManagementApi.md#exportloyaltycardledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log +*ManagementApi* | [**exportLoyaltyLedger**](docs/Api/ManagementApi.md#exportloyaltyledger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs *ManagementApi* | [**exportReferrals**](docs/Api/ManagementApi.md#exportreferrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals *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 @@ -260,8 +261,8 @@ Class | Method | HTTP request | Description *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 | List access logs *ManagementApi* | [**getAllRoles**](docs/Api/ManagementApi.md#getallroles) | **GET** /v1/roles | List 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* | [**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 Application health *ManagementApi* | [**getApplicationCustomer**](docs/Api/ManagementApi.md#getapplicationcustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer *ManagementApi* | [**getApplicationCustomerFriends**](docs/Api/ManagementApi.md#getapplicationcustomerfriends) | **GET** /v1/applications/{applicationId}/profile/{integrationId}/friends | List friends referred by customer profile *ManagementApi* | [**getApplicationCustomers**](docs/Api/ManagementApi.md#getapplicationcustomers) | **GET** /v1/applications/{applicationId}/customers | List application's customers @@ -270,13 +271,14 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getApplicationEventsWithoutTotalCount**](docs/Api/ManagementApi.md#getapplicationeventswithouttotalcount) | **GET** /v1/applications/{applicationId}/events/no_total | List Applications events *ManagementApi* | [**getApplicationSession**](docs/Api/ManagementApi.md#getapplicationsession) | **GET** /v1/applications/{applicationId}/sessions/{sessionId} | Get Application session *ManagementApi* | [**getApplicationSessions**](docs/Api/ManagementApi.md#getapplicationsessions) | **GET** /v1/applications/{applicationId}/sessions | List Application sessions -*ManagementApi* | [**getApplications**](docs/Api/ManagementApi.md#getapplications) | **GET** /v1/applications | List applications +*ManagementApi* | [**getApplications**](docs/Api/ManagementApi.md#getapplications) | **GET** /v1/applications | List Applications *ManagementApi* | [**getAttribute**](docs/Api/ManagementApi.md#getattribute) | **GET** /v1/attributes/{attributeId} | Get 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 | List audiences *ManagementApi* | [**getCampaign**](docs/Api/ManagementApi.md#getcampaign) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId} | Get 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 | List campaigns that match the given attributes +*ManagementApi* | [**getCampaignTemplates**](docs/Api/ManagementApi.md#getcampaigntemplates) | **GET** /v1/campaign_templates | List campaign templates *ManagementApi* | [**getCampaigns**](docs/Api/ManagementApi.md#getcampaigns) | **GET** /v1/applications/{applicationId}/campaigns | List campaigns *ManagementApi* | [**getChanges**](docs/Api/ManagementApi.md#getchanges) | **GET** /v1/changes | Get audit logs for an account *ManagementApi* | [**getCollection**](docs/Api/ManagementApi.md#getcollection) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Get collection @@ -290,12 +292,16 @@ Class | Method | HTTP request | Description *ManagementApi* | [**getCustomersByAttributes**](docs/Api/ManagementApi.md#getcustomersbyattributes) | **POST** /v1/customer_search/no_total | List customer profiles matching 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* | [**getLoyaltyPoints**](docs/Api/ManagementApi.md#getloyaltypoints) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId} | Get the Loyalty Ledger for this integrationID +*ManagementApi* | [**getLoyaltyCard**](docs/Api/ManagementApi.md#getloyaltycard) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Get loyalty card +*ManagementApi* | [**getLoyaltyCardTransactionLogs**](docs/Api/ManagementApi.md#getloyaltycardtransactionlogs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions +*ManagementApi* | [**getLoyaltyCards**](docs/Api/ManagementApi.md#getloyaltycards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards | List loyalty cards +*ManagementApi* | [**getLoyaltyPoints**](docs/Api/ManagementApi.md#getloyaltypoints) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId} | Get customer's full loyalty ledger *ManagementApi* | [**getLoyaltyProgram**](docs/Api/ManagementApi.md#getloyaltyprogram) | **GET** /v1/loyalty_programs/{loyaltyProgramId} | Get loyalty program +*ManagementApi* | [**getLoyaltyProgramTransactions**](docs/Api/ManagementApi.md#getloyaltyprogramtransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/transactions | List loyalty program transactions *ManagementApi* | [**getLoyaltyPrograms**](docs/Api/ManagementApi.md#getloyaltyprograms) | **GET** /v1/loyalty_programs | List loyalty programs -*ManagementApi* | [**getLoyaltyStatistics**](docs/Api/ManagementApi.md#getloyaltystatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics by loyalty program ID -*ManagementApi* | [**getNotificationWebhook**](docs/Api/ManagementApi.md#getnotificationwebhook) | **GET** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Get notification webhook -*ManagementApi* | [**getNotificationWebhooks**](docs/Api/ManagementApi.md#getnotificationwebhooks) | **GET** /v1/applications/{applicationId}/notification_webhooks | List notification webhooks +*ManagementApi* | [**getLoyaltyStatistics**](docs/Api/ManagementApi.md#getloyaltystatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics +*ManagementApi* | [**getNotificationWebhook**](docs/Api/ManagementApi.md#getnotificationwebhook) | **GET** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Get notification about campaign-related changes +*ManagementApi* | [**getNotificationWebhooks**](docs/Api/ManagementApi.md#getnotificationwebhooks) | **GET** /v1/applications/{applicationId}/notification_webhooks | List notifications about campaign-related changes *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 role *ManagementApi* | [**getRuleset**](docs/Api/ManagementApi.md#getruleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset @@ -310,16 +316,20 @@ Class | Method | HTTP request | Description *ManagementApi* | [**importAllowedList**](docs/Api/ManagementApi.md#importallowedlist) | **POST** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute *ManagementApi* | [**importCollection**](docs/Api/ManagementApi.md#importcollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data in existing collection *ManagementApi* | [**importCoupons**](docs/Api/ManagementApi.md#importcoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons +*ManagementApi* | [**importLoyaltyCards**](docs/Api/ManagementApi.md#importloyaltycards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards *ManagementApi* | [**importLoyaltyPoints**](docs/Api/ManagementApi.md#importloyaltypoints) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_points | Import loyalty points *ManagementApi* | [**importPoolGiveaways**](docs/Api/ManagementApi.md#importpoolgiveaways) | **POST** /v1/giveaways/pools/{poolId}/import | Import giveaway codes into a giveaway pool *ManagementApi* | [**importReferrals**](docs/Api/ManagementApi.md#importreferrals) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals | Import referrals *ManagementApi* | [**listAccountCollections**](docs/Api/ManagementApi.md#listaccountcollections) | **GET** /v1/collections | List collections in account *ManagementApi* | [**listCollections**](docs/Api/ManagementApi.md#listcollections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections *ManagementApi* | [**listCollectionsInApplication**](docs/Api/ManagementApi.md#listcollectionsinapplication) | **GET** /v1/applications/{applicationId}/collections | List collections in application -*ManagementApi* | [**removeLoyaltyPoints**](docs/Api/ManagementApi.md#removeloyaltypoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points in loyalty program for given customer +*ManagementApi* | [**postAddedDeductedPointsNotification**](docs/Api/ManagementApi.md#postaddeddeductedpointsnotification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points | Create notification about added or deducted loyalty points +*ManagementApi* | [**postCatalogsStrikethroughNotification**](docs/Api/ManagementApi.md#postcatalogsstrikethroughnotification) | **POST** /v1/catalogs/{applicationId}/notifications/strikethrough | Create strikethrough notification +*ManagementApi* | [**removeLoyaltyPoints**](docs/Api/ManagementApi.md#removeloyaltypoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile *ManagementApi* | [**resetPassword**](docs/Api/ManagementApi.md#resetpassword) | **POST** /v1/reset_password | Reset password *ManagementApi* | [**searchCouponsAdvancedApplicationWideWithoutTotalCount**](docs/Api/ManagementApi.md#searchcouponsadvancedapplicationwidewithouttotalcount) | **POST** /v1/applications/{applicationId}/coupons_search_advanced/no_total | List coupons that match the given attributes (without total count) *ManagementApi* | [**searchCouponsAdvancedWithoutTotalCount**](docs/Api/ManagementApi.md#searchcouponsadvancedwithouttotalcount) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total | List coupons that match the given attributes in campaign (without total count) +*ManagementApi* | [**transferLoyaltyCard**](docs/Api/ManagementApi.md#transferloyaltycard) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer | Transfer card data *ManagementApi* | [**updateAccountCollection**](docs/Api/ManagementApi.md#updateaccountcollection) | **PUT** /v1/collections/{collectionId} | Update account-level collection *ManagementApi* | [**updateAdditionalCost**](docs/Api/ManagementApi.md#updateadditionalcost) | **PUT** /v1/additional_costs/{additionalCostId} | Update additional cost *ManagementApi* | [**updateAttribute**](docs/Api/ManagementApi.md#updateattribute) | **PUT** /v1/attributes/{attributeId} | Update custom attribute @@ -327,7 +337,8 @@ Class | Method | HTTP request | Description *ManagementApi* | [**updateCollection**](docs/Api/ManagementApi.md#updatecollection) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Update collection description *ManagementApi* | [**updateCoupon**](docs/Api/ManagementApi.md#updatecoupon) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Update coupon *ManagementApi* | [**updateCouponBatch**](docs/Api/ManagementApi.md#updatecouponbatch) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Update coupons -*ManagementApi* | [**updateNotificationWebhook**](docs/Api/ManagementApi.md#updatenotificationwebhook) | **PUT** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Update notification webhook +*ManagementApi* | [**updateLoyaltyCard**](docs/Api/ManagementApi.md#updateloyaltycard) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Update loyalty card status +*ManagementApi* | [**updateNotificationWebhook**](docs/Api/ManagementApi.md#updatenotificationwebhook) | **PUT** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Update notification about campaign-related changes *ManagementApi* | [**updateReferral**](docs/Api/ManagementApi.md#updatereferral) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Update referral @@ -340,11 +351,20 @@ Class | Method | HTTP request | Description - [Account](docs/Model/Account.md) - [AccountAdditionalCost](docs/Model/AccountAdditionalCost.md) - [AccountAnalytics](docs/Model/AccountAnalytics.md) + - [AccountDashboardStatistic](docs/Model/AccountDashboardStatistic.md) + - [AccountDashboardStatisticApiCalls](docs/Model/AccountDashboardStatisticApiCalls.md) + - [AccountDashboardStatisticCampaigns](docs/Model/AccountDashboardStatisticCampaigns.md) + - [AccountDashboardStatisticDiscount](docs/Model/AccountDashboardStatisticDiscount.md) + - [AccountDashboardStatisticLoyaltyPoints](docs/Model/AccountDashboardStatisticLoyaltyPoints.md) + - [AccountDashboardStatisticReferrals](docs/Model/AccountDashboardStatisticReferrals.md) + - [AccountDashboardStatisticRevenue](docs/Model/AccountDashboardStatisticRevenue.md) - [AccountEntity](docs/Model/AccountEntity.md) - [AccountLimits](docs/Model/AccountLimits.md) - [AddFreeItemEffectProps](docs/Model/AddFreeItemEffectProps.md) - [AddItemCatalogAction](docs/Model/AddItemCatalogAction.md) + - [AddLoyaltyPoints](docs/Model/AddLoyaltyPoints.md) - [AddLoyaltyPointsEffectProps](docs/Model/AddLoyaltyPointsEffectProps.md) + - [AddedDeductedPointsNotificationPolicy](docs/Model/AddedDeductedPointsNotificationPolicy.md) - [AdditionalCost](docs/Model/AdditionalCost.md) - [Application](docs/Model/Application.md) - [ApplicationAPIKey](docs/Model/ApplicationAPIKey.md) @@ -364,10 +384,15 @@ Class | Method | HTTP request | Description - [AttributesSettings](docs/Model/AttributesSettings.md) - [Audience](docs/Model/Audience.md) - [AudienceAnalytics](docs/Model/AudienceAnalytics.md) + - [AudienceCustomer](docs/Model/AudienceCustomer.md) - [AudienceIntegrationID](docs/Model/AudienceIntegrationID.md) - [AudienceMembership](docs/Model/AudienceMembership.md) - [AwardGiveawayEffectProps](docs/Model/AwardGiveawayEffectProps.md) - [BaseLoyaltyProgram](docs/Model/BaseLoyaltyProgram.md) + - [BaseNotification](docs/Model/BaseNotification.md) + - [BaseNotificationEntity](docs/Model/BaseNotificationEntity.md) + - [BaseNotificationWebhook](docs/Model/BaseNotificationWebhook.md) + - [BaseNotifications](docs/Model/BaseNotifications.md) - [BaseSamlConnection](docs/Model/BaseSamlConnection.md) - [Binding](docs/Model/Binding.md) - [BulkApplicationNotification](docs/Model/BulkApplicationNotification.md) @@ -407,6 +432,7 @@ Class | Method | HTTP request | Description - [CatalogActionFilter](docs/Model/CatalogActionFilter.md) - [CatalogItem](docs/Model/CatalogItem.md) - [CatalogSyncRequest](docs/Model/CatalogSyncRequest.md) + - [CatalogsStrikethroughNotificationPolicy](docs/Model/CatalogsStrikethroughNotificationPolicy.md) - [Change](docs/Model/Change.md) - [ChangeProfilePassword](docs/Model/ChangeProfilePassword.md) - [CodeGeneratorSettings](docs/Model/CodeGeneratorSettings.md) @@ -422,6 +448,7 @@ Class | Method | HTTP request | Description - [CouponReservations](docs/Model/CouponReservations.md) - [CouponSearch](docs/Model/CouponSearch.md) - [CouponValue](docs/Model/CouponValue.md) + - [CouponsNotificationPolicy](docs/Model/CouponsNotificationPolicy.md) - [CreateApplicationAPIKey](docs/Model/CreateApplicationAPIKey.md) - [CreateManagementKey](docs/Model/CreateManagementKey.md) - [CreateTemplateCampaign](docs/Model/CreateTemplateCampaign.md) @@ -436,8 +463,10 @@ Class | Method | HTTP request | Description - [CustomerProfileAudienceRequestItem](docs/Model/CustomerProfileAudienceRequestItem.md) - [CustomerProfileIntegrationRequestV2](docs/Model/CustomerProfileIntegrationRequestV2.md) - [CustomerProfileSearchQuery](docs/Model/CustomerProfileSearchQuery.md) + - [CustomerProfileUpdateV2Response](docs/Model/CustomerProfileUpdateV2Response.md) - [CustomerSession](docs/Model/CustomerSession.md) - [CustomerSessionV2](docs/Model/CustomerSessionV2.md) + - [DeductLoyaltyPoints](docs/Model/DeductLoyaltyPoints.md) - [DeductLoyaltyPointsEffectProps](docs/Model/DeductLoyaltyPointsEffectProps.md) - [Effect](docs/Model/Effect.md) - [EffectEntity](docs/Model/EffectEntity.md) @@ -450,13 +479,17 @@ Class | Method | HTTP request | Description - [ErrorResponse](docs/Model/ErrorResponse.md) - [ErrorResponseWithStatus](docs/Model/ErrorResponseWithStatus.md) - [ErrorSource](docs/Model/ErrorSource.md) + - [EvaluableCampaignIds](docs/Model/EvaluableCampaignIds.md) - [Event](docs/Model/Event.md) - [EventType](docs/Model/EventType.md) - [EventV2](docs/Model/EventV2.md) + - [ExpiringPointsNotificationPolicy](docs/Model/ExpiringPointsNotificationPolicy.md) + - [ExpiringPointsNotificationTrigger](docs/Model/ExpiringPointsNotificationTrigger.md) - [Export](docs/Model/Export.md) - [FeatureFlag](docs/Model/FeatureFlag.md) - [FeaturesFeed](docs/Model/FeaturesFeed.md) - [FeedNotification](docs/Model/FeedNotification.md) + - [FrontendState](docs/Model/FrontendState.md) - [FuncArgDef](docs/Model/FuncArgDef.md) - [FunctionDef](docs/Model/FunctionDef.md) - [Giveaway](docs/Model/Giveaway.md) @@ -492,13 +525,20 @@ Class | Method | HTTP request | Description - [InlineResponse20032](docs/Model/InlineResponse20032.md) - [InlineResponse20033](docs/Model/InlineResponse20033.md) - [InlineResponse20034](docs/Model/InlineResponse20034.md) + - [InlineResponse20035](docs/Model/InlineResponse20035.md) + - [InlineResponse20036](docs/Model/InlineResponse20036.md) + - [InlineResponse20037](docs/Model/InlineResponse20037.md) + - [InlineResponse20038](docs/Model/InlineResponse20038.md) + - [InlineResponse20039](docs/Model/InlineResponse20039.md) - [InlineResponse2004](docs/Model/InlineResponse2004.md) + - [InlineResponse20040](docs/Model/InlineResponse20040.md) - [InlineResponse2005](docs/Model/InlineResponse2005.md) - [InlineResponse2006](docs/Model/InlineResponse2006.md) - [InlineResponse2007](docs/Model/InlineResponse2007.md) - [InlineResponse2008](docs/Model/InlineResponse2008.md) - [InlineResponse2009](docs/Model/InlineResponse2009.md) - [InlineResponse201](docs/Model/InlineResponse201.md) + - [IntegrationCoupon](docs/Model/IntegrationCoupon.md) - [IntegrationCustomerSessionResponse](docs/Model/IntegrationCustomerSessionResponse.md) - [IntegrationEntity](docs/Model/IntegrationEntity.md) - [IntegrationEvent](docs/Model/IntegrationEvent.md) @@ -529,13 +569,11 @@ Class | Method | HTTP request | Description - [LoyaltyLedgerEntry](docs/Model/LoyaltyLedgerEntry.md) - [LoyaltyLedgerTransactions](docs/Model/LoyaltyLedgerTransactions.md) - [LoyaltyMembership](docs/Model/LoyaltyMembership.md) - - [LoyaltyPoints](docs/Model/LoyaltyPoints.md) - [LoyaltyProgram](docs/Model/LoyaltyProgram.md) - [LoyaltyProgramBalance](docs/Model/LoyaltyProgramBalance.md) - [LoyaltyProgramEntity](docs/Model/LoyaltyProgramEntity.md) - [LoyaltyProgramLedgers](docs/Model/LoyaltyProgramLedgers.md) - - [LoyaltyProjection](docs/Model/LoyaltyProjection.md) - - [LoyaltyProjectionData](docs/Model/LoyaltyProjectionData.md) + - [LoyaltyProgramTransaction](docs/Model/LoyaltyProgramTransaction.md) - [LoyaltyStatistics](docs/Model/LoyaltyStatistics.md) - [LoyaltySubLedger](docs/Model/LoyaltySubLedger.md) - [LoyaltyTier](docs/Model/LoyaltyTier.md) @@ -560,6 +598,7 @@ Class | Method | HTTP request | Description - [NewApplicationAPIKey](docs/Model/NewApplicationAPIKey.md) - [NewAttribute](docs/Model/NewAttribute.md) - [NewAudience](docs/Model/NewAudience.md) + - [NewBaseNotification](docs/Model/NewBaseNotification.md) - [NewCampaign](docs/Model/NewCampaign.md) - [NewCampaignCollection](docs/Model/NewCampaignCollection.md) - [NewCampaignGroup](docs/Model/NewCampaignGroup.md) @@ -586,8 +625,10 @@ Class | Method | HTTP request | Description - [NewManagementKey](docs/Model/NewManagementKey.md) - [NewMultipleAudiencesItem](docs/Model/NewMultipleAudiencesItem.md) - [NewNotificationWebhook](docs/Model/NewNotificationWebhook.md) + - [NewOutgoingIntegrationWebhook](docs/Model/NewOutgoingIntegrationWebhook.md) - [NewPassword](docs/Model/NewPassword.md) - [NewPasswordEmail](docs/Model/NewPasswordEmail.md) + - [NewPicklist](docs/Model/NewPicklist.md) - [NewReferral](docs/Model/NewReferral.md) - [NewReferralsForMultipleAdvocates](docs/Model/NewReferralsForMultipleAdvocates.md) - [NewReturn](docs/Model/NewReturn.md) @@ -599,8 +640,16 @@ Class | Method | HTTP request | Description - [NewWebhook](docs/Model/NewWebhook.md) - [Notification](docs/Model/Notification.md) - [NotificationWebhook](docs/Model/NotificationWebhook.md) + - [OutgoingIntegrationBrazePolicy](docs/Model/OutgoingIntegrationBrazePolicy.md) + - [OutgoingIntegrationConfiguration](docs/Model/OutgoingIntegrationConfiguration.md) + - [OutgoingIntegrationType](docs/Model/OutgoingIntegrationType.md) + - [OutgoingIntegrationTypes](docs/Model/OutgoingIntegrationTypes.md) + - [OutgoingIntegrationWebhookTemplate](docs/Model/OutgoingIntegrationWebhookTemplate.md) + - [OutgoingIntegrationWebhookTemplates](docs/Model/OutgoingIntegrationWebhookTemplates.md) - [PatchItemCatalogAction](docs/Model/PatchItemCatalogAction.md) - [PatchManyItemsCatalogAction](docs/Model/PatchManyItemsCatalogAction.md) + - [Picklist](docs/Model/Picklist.md) + - [PriorityPosition](docs/Model/PriorityPosition.md) - [ProfileAudiencesChanges](docs/Model/ProfileAudiencesChanges.md) - [RedeemReferralEffectProps](docs/Model/RedeemReferralEffectProps.md) - [Referral](docs/Model/Referral.md) @@ -611,11 +660,18 @@ Class | Method | HTTP request | Description - [RejectReferralEffectProps](docs/Model/RejectReferralEffectProps.md) - [RemoveItemCatalogAction](docs/Model/RemoveItemCatalogAction.md) - [RemoveManyItemsCatalogAction](docs/Model/RemoveManyItemsCatalogAction.md) + - [ReopenSessionResponse](docs/Model/ReopenSessionResponse.md) + - [ReserveCouponEffectProps](docs/Model/ReserveCouponEffectProps.md) - [ReturnIntegrationRequest](docs/Model/ReturnIntegrationRequest.md) - [ReturnedCartItem](docs/Model/ReturnedCartItem.md) - [Role](docs/Model/Role.md) - [RoleAssign](docs/Model/RoleAssign.md) - [RoleMembership](docs/Model/RoleMembership.md) + - [RoleV2](docs/Model/RoleV2.md) + - [RoleV2ApplicationDetails](docs/Model/RoleV2ApplicationDetails.md) + - [RoleV2PermissionSet](docs/Model/RoleV2PermissionSet.md) + - [RoleV2Permissions](docs/Model/RoleV2Permissions.md) + - [RoleV2PermissionsRoles](docs/Model/RoleV2PermissionsRoles.md) - [RollbackAddedLoyaltyPointsEffectProps](docs/Model/RollbackAddedLoyaltyPointsEffectProps.md) - [RollbackCouponEffectProps](docs/Model/RollbackCouponEffectProps.md) - [RollbackDeductedLoyaltyPointsEffectProps](docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md) @@ -635,10 +691,19 @@ Class | Method | HTTP request | Description - [ShowBundleMetadataEffectProps](docs/Model/ShowBundleMetadataEffectProps.md) - [ShowNotificationEffectProps](docs/Model/ShowNotificationEffectProps.md) - [SlotDef](docs/Model/SlotDef.md) + - [StrikethroughChangedItem](docs/Model/StrikethroughChangedItem.md) + - [StrikethroughCustomEffectPerItemProps](docs/Model/StrikethroughCustomEffectPerItemProps.md) + - [StrikethroughEffect](docs/Model/StrikethroughEffect.md) + - [StrikethroughLabelingNotification](docs/Model/StrikethroughLabelingNotification.md) + - [StrikethroughSetDiscountPerItemEffectProps](docs/Model/StrikethroughSetDiscountPerItemEffectProps.md) + - [StrikethroughTrigger](docs/Model/StrikethroughTrigger.md) + - [TalangAttribute](docs/Model/TalangAttribute.md) + - [TalangAttributeVisibility](docs/Model/TalangAttributeVisibility.md) - [TemplateArgDef](docs/Model/TemplateArgDef.md) - [TemplateDef](docs/Model/TemplateDef.md) - [TemplateLimitConfig](docs/Model/TemplateLimitConfig.md) - [Tier](docs/Model/Tier.md) + - [TransferLoyaltyCard](docs/Model/TransferLoyaltyCard.md) - [TriggerWebhookEffectProps](docs/Model/TriggerWebhookEffectProps.md) - [UpdateAccount](docs/Model/UpdateAccount.md) - [UpdateApplication](docs/Model/UpdateApplication.md) @@ -655,6 +720,7 @@ Class | Method | HTTP request | Description - [UpdateCustomEffect](docs/Model/UpdateCustomEffect.md) - [UpdateLoyaltyCard](docs/Model/UpdateLoyaltyCard.md) - [UpdateLoyaltyProgram](docs/Model/UpdateLoyaltyProgram.md) + - [UpdatePicklist](docs/Model/UpdatePicklist.md) - [UpdateReferral](docs/Model/UpdateReferral.md) - [UpdateReferralBatch](docs/Model/UpdateReferralBatch.md) - [UpdateRole](docs/Model/UpdateRole.md) @@ -683,6 +749,16 @@ Class | Method | HTTP request | Description +## management_key + + +- **Type**: API key +- **API key parameter name**: Authorization +- **Location**: HTTP header + + + + ## manager_auth diff --git a/composer.json b/composer.json index 0b76578b..742c34cc 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,8 @@ { "name": "talon-one/talon-one-client", "type": "library", - "version": "4.0.1", - "description": "Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}`", + "version": "5.0.0", + "description": "Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`", "keywords": [ "talon-one", "openapi-generator", diff --git a/docs/Api/IntegrationApi.md b/docs/Api/IntegrationApi.md index a9417688..179b4adc 100644 --- a/docs/Api/IntegrationApi.md +++ b/docs/Api/IntegrationApi.md @@ -14,8 +14,13 @@ Method | HTTP request | Description [**deleteCustomerData**](IntegrationApi.md#deleteCustomerData) | **DELETE** /v1/customer_data/{integrationId} | Delete customer's personal data [**getCustomerInventory**](IntegrationApi.md#getCustomerInventory) | **GET** /v1/customer_profiles/{integrationId}/inventory | List customer data [**getCustomerSession**](IntegrationApi.md#getCustomerSession) | **GET** /v2/customer_sessions/{customerSessionId} | Get customer session -[**getLoyaltyTransactions**](IntegrationApi.md#getLoyaltyTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | Get loyalty ledger transaction logs +[**getLoyaltyBalances**](IntegrationApi.md#getLoyaltyBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances | Get customer's loyalty points +[**getLoyaltyCardBalances**](IntegrationApi.md#getLoyaltyCardBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances | Get card's point balances +[**getLoyaltyCardTransactions**](IntegrationApi.md#getLoyaltyCardTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions | List card's transactions +[**getLoyaltyProgramProfileTransactions**](IntegrationApi.md#getLoyaltyProgramProfileTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions | List customer's loyalty transactions [**getReservedCustomers**](IntegrationApi.md#getReservedCustomers) | **GET** /v1/coupon_reservations/customerprofiles/{couponValue} | List customers that have this coupon reserved +[**linkLoyaltyCardToProfile**](IntegrationApi.md#linkLoyaltyCardToProfile) | **POST** /v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile | Link customer profile to card +[**reopenCustomerSession**](IntegrationApi.md#reopenCustomerSession) | **PUT** /v2/customer_sessions/{customerSessionId}/reopen | Reopen customer session [**returnCartItems**](IntegrationApi.md#returnCartItems) | **POST** /v2/customer_sessions/{customerSessionId}/returns | Return cart items [**syncCatalog**](IntegrationApi.md#syncCatalog) | **PUT** /v1/catalogs/{catalogId}/sync | Sync cart item catalog [**trackEvent**](IntegrationApi.md#trackEvent) | **POST** /v1/events | Track event @@ -35,7 +40,7 @@ Method | HTTP request | Description Create audience -Create an audience. The audience can be created directly from scratch or can come from third party platforms. To create an audience from an existing audience from a [technology partner](https://docs.talon.one/docs/dev/technology-partners/overview): 1. Set the `integration` property to `mparticle`, `segment` etc., depending on a third-party platform. 1. Set `integrationId` to the ID of this audience in a third-party platform. To create an audience from an existing audience in another platform: 1. Do not use the `integration` property. 1. Set `integrationId` to the ID of this audience in the 3rd-party platform. To create an audience from scratch: 1. Only set the `name` property. Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder. +Create an audience. The audience can be created directly from scratch or can come from third party platforms. **Note:** Audiences can also be created from scratch via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/creating-audiences). To create an audience from an existing audience from a [technology partner](https://docs.talon.one/docs/dev/technology-partners/overview): 1. Set the `integration` property to `mparticle`, `segment` etc., depending on a third-party platform. 1. Set `integrationId` to the ID of this audience in a third-party platform. To create an audience from an existing audience in another platform: 1. Do not use the `integration` property. 1. Set `integrationId` to the ID of this audience in the 3rd-party platform. To create an audience from scratch: 1. Only set the `name` property. Once you create your first audience, audience-specific rule conditions are enabled in the Rule Builder. ### Example @@ -56,7 +61,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewAudience(); // \TalonOne\Client\Model\NewAudience | +$body = new \TalonOne\Client\Model\NewAudience(); // \TalonOne\Client\Model\NewAudience | body try { $result = $apiInstance->createAudienceV2($body); @@ -72,7 +77,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewAudience**](../Model/NewAudience.md)| | + **body** | [**\TalonOne\Client\Model\NewAudience**](../Model/NewAudience.md)| body | ### Return type @@ -98,7 +103,7 @@ Name | Type | Description | Notes Create coupon reservation -Create a coupon reservation for specified customer profiles on the specified coupon. Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data endpoint](/integration-api/#operation/getCustomerInventory). If a coupon gets created for a specific user, it will automatically show up in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data endpoint](/integration-api/#operation/getCustomerInventory). **Important:** - This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. - To create a hard reservation, use the [Create coupons](/management-api/#operation/createCoupons) or [Create coupons for multiple recipients](/management-api/#operation/createCouponsForMultipleRecipients) endpoints setting the `recipientsIntegrationId` property. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. +Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store.

Important

This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code).
To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. ### Example @@ -120,7 +125,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $couponValue = 'couponValue_example'; // string | The code of the coupon. -$body = new \TalonOne\Client\Model\CouponReservations(); // \TalonOne\Client\Model\CouponReservations | +$body = new \TalonOne\Client\Model\CouponReservations(); // \TalonOne\Client\Model\CouponReservations | body try { $result = $apiInstance->createCouponReservation($couponValue, $body); @@ -137,7 +142,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **couponValue** | **string**| The code of the coupon. | - **body** | [**\TalonOne\Client\Model\CouponReservations**](../Model/CouponReservations.md)| | + **body** | [**\TalonOne\Client\Model\CouponReservations**](../Model/CouponReservations.md)| body | ### Return type @@ -184,7 +189,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewReferral(); // \TalonOne\Client\Model\NewReferral | +$body = new \TalonOne\Client\Model\NewReferral(); // \TalonOne\Client\Model\NewReferral | body try { $result = $apiInstance->createReferral($body); @@ -200,7 +205,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewReferral**](../Model/NewReferral.md)| | + **body** | [**\TalonOne\Client\Model\NewReferral**](../Model/NewReferral.md)| body | ### Return type @@ -247,8 +252,8 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewReferralsForMultipleAdvocates(); // \TalonOne\Client\Model\NewReferralsForMultipleAdvocates | -$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. +$body = new \TalonOne\Client\Model\NewReferralsForMultipleAdvocates(); // \TalonOne\Client\Model\NewReferralsForMultipleAdvocates | body +$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. try { $result = $apiInstance->createReferralsForMultipleAdvocates($body, $silent); @@ -264,8 +269,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewReferralsForMultipleAdvocates**](../Model/NewReferralsForMultipleAdvocates.md)| | - **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. | [optional] [default to 'yes'] + **body** | [**\TalonOne\Client\Model\NewReferralsForMultipleAdvocates**](../Model/NewReferralsForMultipleAdvocates.md)| body | + **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [optional] [default to 'yes'] ### Return type @@ -300,7 +305,7 @@ Remove all members from this audience. require_once(__DIR__ . '/vendor/autoload.php'); -// Configure API key authorization: manager_auth +// Configure API key authorization: api_key_v1 $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); @@ -335,7 +340,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[api_key_v1](../../README.md#api_key_v1) ### HTTP request headers @@ -353,7 +358,7 @@ void (empty response body) Delete audience -Delete an audience created by a third-party integration. **Warning:** This endpoint also removes any associations recorded between a customer profile and this audience. +Delete an audience created by a third-party integration. **Warning:** This endpoint also removes any associations recorded between a customer profile and this audience. **Note:** Audiences can also be deleted via the Campaign Manager. See the [docs](https://docs.talon.one/docs/product/audiences/managing-audiences#deleting-an-audience). ### Example @@ -362,7 +367,7 @@ Delete an audience created by a third-party integration. **Warning:** This endp require_once(__DIR__ . '/vendor/autoload.php'); -// Configure API key authorization: manager_auth +// Configure API key authorization: api_key_v1 $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); @@ -397,7 +402,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[api_key_v1](../../README.md#api_key_v1) ### HTTP request headers @@ -437,7 +442,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $couponValue = 'couponValue_example'; // string | The code of the coupon. -$body = new \TalonOne\Client\Model\CouponReservations(); // \TalonOne\Client\Model\CouponReservations | +$body = new \TalonOne\Client\Model\CouponReservations(); // \TalonOne\Client\Model\CouponReservations | body try { $apiInstance->deleteCouponReservation($couponValue, $body); @@ -453,7 +458,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **couponValue** | **string**| The code of the coupon. | - **body** | [**\TalonOne\Client\Model\CouponReservations**](../Model/CouponReservations.md)| | + **body** | [**\TalonOne\Client\Model\CouponReservations**](../Model/CouponReservations.md)| body | ### Return type @@ -500,7 +505,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). +$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. try { $apiInstance->deleteCustomerData($integrationId); @@ -515,7 +520,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). | + **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | ### Return type @@ -537,11 +542,11 @@ void (empty response body) ## getCustomerInventory -> \TalonOne\Client\Model\CustomerInventory getCustomerInventory($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways, $loyaltyProjectionEndDate) +> \TalonOne\Client\Model\CustomerInventory getCustomerInventory($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways) List customer data -Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points and reserved coupons. Reserved coupons also include redeemed coupons. You can also use this endpoint to get the projected loyalty balances in order to notify your customers about points that are about to expire, or to remind them how many points they have. +Return the customer inventory regarding entities referencing this customer profile's `integrationId`. Typical entities returned are: customer profile information, referral codes, loyalty points, loyalty cards and reserved coupons. Reserved coupons also include redeemed coupons. ### Example @@ -562,16 +567,15 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). +$integrationId = 'integrationId_example'; // string | The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. $profile = True; // bool | Set to `true` to include customer profile information in the response. $referrals = True; // bool | Set to `true` to include referral information in the response. $coupons = True; // bool | Set to `true` to include coupon information in the response. $loyalty = True; // bool | Set to `true` to include loyalty information in the response. $giveaways = True; // bool | Set to `true` to include giveaways information in the response. -$loyaltyProjectionEndDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. try { - $result = $apiInstance->getCustomerInventory($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways, $loyaltyProjectionEndDate); + $result = $apiInstance->getCustomerInventory($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways); print_r($result); } catch (Exception $e) { echo 'Exception when calling IntegrationApi->getCustomerInventory: ', $e->getMessage(), PHP_EOL; @@ -584,13 +588,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). | + **integrationId** | **string**| The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | **profile** | **bool**| Set to `true` to include customer profile information in the response. | [optional] **referrals** | **bool**| Set to `true` to include referral information in the response. | [optional] **coupons** | **bool**| Set to `true` to include coupon information in the response. | [optional] **loyalty** | **bool**| Set to `true` to include loyalty information in the response. | [optional] **giveaways** | **bool**| Set to `true` to include giveaways information in the response. | [optional] - **loyaltyProjectionEndDate** | **\DateTime**| Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. | [optional] ### Return type @@ -637,7 +640,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). +$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. try { $result = $apiInstance->getCustomerSession($customerSessionId); @@ -653,7 +656,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). | + **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. | ### Return type @@ -673,13 +676,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getLoyaltyTransactions +## getLoyaltyBalances -> \TalonOne\Client\Model\InlineResponse2001 getLoyaltyTransactions($loyaltyProgramId, $integrationId, $startDate, $endDate, $pageSize, $skip) +> \TalonOne\Client\Model\LoyaltyBalances getLoyaltyBalances($loyaltyProgramId, $integrationId, $endDate) -Get loyalty ledger transaction logs +Get customer's loyalty points -Retrieve paginated loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date. If no filters are applied, the last 30 loyalty transactions for the given integration ID are returned. +Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. **Note:** For more information, see [our documentation on managing loyalty data](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-data#obtaining-the-loyalty-balances-of-a-customer). ### Example @@ -700,18 +703,15 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $integrationId = 'integrationId_example'; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. -$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Time from which results are returned. It must be an RFC3339 timestamp string. -$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results older than this timestamp. It must be an RFC3339 timestamp string. -$pageSize = 56; // int | The number of items 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. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. try { - $result = $apiInstance->getLoyaltyTransactions($loyaltyProgramId, $integrationId, $startDate, $endDate, $pageSize, $skip); + $result = $apiInstance->getLoyaltyBalances($loyaltyProgramId, $integrationId, $endDate); print_r($result); } catch (Exception $e) { - echo 'Exception when calling IntegrationApi->getLoyaltyTransactions: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling IntegrationApi->getLoyaltyBalances: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -721,11 +721,150 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | - **startDate** | **\DateTime**| Time from which results are returned. It must be an RFC3339 timestamp string. | [optional] - **endDate** | **\DateTime**| Only return results older than this timestamp. It must be an RFC3339 timestamp string. | [optional] - **pageSize** | **int**| The number of items in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + +### Return type + +[**\TalonOne\Client\Model\LoyaltyBalances**](../Model/LoyaltyBalances.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getLoyaltyCardBalances + +> \TalonOne\Client\Model\LoyaltyBalances getLoyaltyCardBalances($loyaltyProgramId, $loyaltyCardId, $endDate) + +Get card's point balances + +Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, all loyalty balances for the given loyalty card are returned. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. + +try { + $result = $apiInstance->getLoyaltyCardBalances($loyaltyProgramId, $loyaltyCardId, $endDate); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->getLoyaltyCardBalances: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] + +### Return type + +[**\TalonOne\Client\Model\LoyaltyBalances**](../Model/LoyaltyBalances.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getLoyaltyCardTransactions + +> \TalonOne\Client\Model\InlineResponse2001 getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip) + +List card's transactions + +Retrieve loyalty transaction logs for the given loyalty card in the specified loyalty program with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. + +try { + $result = $apiInstance->getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->getLoyaltyCardTransactions: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] ### Return type @@ -746,13 +885,88 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## getLoyaltyProgramProfileTransactions + +> \TalonOne\Client\Model\InlineResponse2002 getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip) + +List customer's loyalty transactions + +Retrieve paginated results of loyalty transaction logs for the given Integration ID in the specified loyalty program. You can filter transactions by date. If no filters are applied, the last 50 loyalty transactions for the given integration ID are returned. **Note:** To retrieve all loyalty program transaction logs in a given loyalty program, use the [List loyalty program transactions](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyProgramTransactions) endpoint. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$integrationId = 'integrationId_example'; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. +$subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$pageSize = 50; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. + +try { + $result = $apiInstance->getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->getLoyaltyProgramProfileTransactions: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 50] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse2002**](../Model/InlineResponse2002.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## getReservedCustomers > \TalonOne\Client\Model\InlineResponse200 getReservedCustomers($couponValue) List customers that have this coupon reserved -Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](/management-api/#operation/createCoupons) or [Create coupons for multiple recipients](/management-api/#operation/createCouponsForMultipleRecipients) endpoints. +Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. ### Example @@ -809,13 +1023,143 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## linkLoyaltyCardToProfile + +> \TalonOne\Client\Model\LoyaltyCard linkLoyaltyCardToProfile($loyaltyProgramId, $loyaltyCardId, $body) + +Link customer profile to card + +[Loyalty cards](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) allow customers to collect and spend loyalty points within a [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types). They are useful to gamify loyalty programs and can be used with or without customer profiles linked to them. Link a customer profile to a given loyalty card for the card to be set as **Registered**. This affects how it can be used. See the [docs](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/managing-loyalty-cards#linking-customer-profiles-to-a-loyalty-card). **Note:** You can link as many customer profiles to a given loyalty card as the [**card user limit**](https://docs.talon.one/docs/product/loyalty-programs/creating-loyalty-programs#creating-card-based-loyalty-programs) allows. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$body = new \TalonOne\Client\Model\LoyaltyCardRegistration(); // \TalonOne\Client\Model\LoyaltyCardRegistration | body + +try { + $result = $apiInstance->linkLoyaltyCardToProfile($loyaltyProgramId, $loyaltyCardId, $body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->linkLoyaltyCardToProfile: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **body** | [**\TalonOne\Client\Model\LoyaltyCardRegistration**](../Model/LoyaltyCardRegistration.md)| body | + +### Return type + +[**\TalonOne\Client\Model\LoyaltyCard**](../Model/LoyaltyCard.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## reopenCustomerSession + +> \TalonOne\Client\Model\ReopenSessionResponse reopenCustomerSession($customerSessionId) + +Reopen customer session + +Reopen a closed [customer session](https://docs.talon.one/docs/dev/concepts/entities#customer-session). For example, if a session has been completed but still needs to be edited, you can reopen it with this endpoint. A reopen session is treated like a standard open session. When reopening a session: - The `talon_session_reopened` event is triggered. You can see it in the **Events** view in the Campaign Manager. - The session state is updated to `open`. - Modified budgets and triggered effects when the session was closed are rolled back except for the list below.
Effects and budgets unimpacted by a session reopening

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

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

**Note:** If your order workflow requires you to create a new session instead of reopening a session, use the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint to cancel a closed session and create a new one. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\IntegrationApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. + +try { + $result = $apiInstance->reopenCustomerSession($customerSessionId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling IntegrationApi->reopenCustomerSession: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. | + +### Return type + +[**\TalonOne\Client\Model\ReopenSessionResponse**](../Model/ReopenSessionResponse.md) + +### Authorization + +[api_key_v1](../../README.md#api_key_v1) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## returnCartItems > \TalonOne\Client\Model\IntegrationStateV2 returnCartItems($customerSessionId, $body, $dry) Return cart items -Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. Its behavior depends on whether [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled for the Application. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session). +Create a new return request for the specified cart items. This endpoint automatically changes the session state from `closed` to `partially_returned`. Its behavior depends on whether [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled for the Application. **Note:** This will roll back any effects associated with these cart items. For more information, see [our documentation on session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) and [this tutorial](https://docs.talon.one/docs/dev/tutorials/partially-returning-a-session). ### Example @@ -836,8 +1180,8 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). -$body = new \TalonOne\Client\Model\ReturnIntegrationRequest(); // \TalonOne\Client\Model\ReturnIntegrationRequest | +$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. +$body = new \TalonOne\Client\Model\ReturnIntegrationRequest(); // \TalonOne\Client\Model\ReturnIntegrationRequest | body $dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. try { @@ -854,8 +1198,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). | - **body** | [**\TalonOne\Client\Model\ReturnIntegrationRequest**](../Model/ReturnIntegrationRequest.md)| | + **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. | + **body** | [**\TalonOne\Client\Model\ReturnIntegrationRequest**](../Model/ReturnIntegrationRequest.md)| body | **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] ### Return type @@ -882,7 +1226,7 @@ Name | Type | Description | Notes Sync cart item catalog -Perform one or more of the following sync actions on this cart item catalog, up to 1000 actions: - Add an item to the catalog. - Edit the attributes of an item in the catalog. - Edit the attributes of more than one item in the catalog. - Remove an item from the catalog. - Remove more than one item from the catalog. **Note**: For more information, see [our documentation on managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs#displaying-the-details-and-content-of-a-catalog) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` object contains the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action:
Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoe\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\" }, \"type\": \"ADD\" } ] } ```
Editing the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\" }, \"type\": \"PATCH\" } ] } ```
Editing the attributes of several items at once
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing several items from the catalog at once
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog

Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:

```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
+Perform one or more of the following sync actions on this cart item catalog, up to 1000 actions: - Add an item to the catalog. - Edit the attributes of an item in the catalog. - Edit the attributes of more than one item in the catalog. - Remove an item from the catalog. - Remove more than one item from the catalog. **Note:** For more information, see [our documentation on managing cart item catalogs](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). ### Filtering cart items Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs#displaying-the-details-and-content-of-a-catalog) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. The `filters` array contains an object with the following properties: - `attr`: A [cart item attribute](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) connected to the catalog. It is applied to all items in the catalog. - `op`: The filtering operator indicating the relationship between the value of each cart item in the catalog and the value of the `value` property for the attribute selected in `attr`. The value of `op` can be one of the following: - `EQ`: Equal to `value` - `LT`: Less than `value` - `LE`: Less than or equal to `value` - `GT`: Greater than `value` - `GE`: Greater than or equal to `value` - `IN`: One of the comma-separated values that `value` is set to. **Note:** `GE`, `LE`, `GT`, `LT` are for numeric values only. - `value`: The value of the attribute selected in `attr`. ### Payload examples Synchronization actions are sent as `PUT` requests. See the structure for each action:
Adding an item to the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"Navy blue\", \"type\": \"shoe\" }, \"replaceIfExists\": true, \"sku\": \"SKU1241028\", \"price\": 100 }, \"type\": \"ADD\" } ] } ```
Editing the attributes of an item in the catalog
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"age\": 11, \"origin\": \"germany\" }, \"createIfNotExists\": false, \"sku\": \"SKU1241028\" }, \"type\": \"PATCH\" } ] } ```
Editing the attributes of several items at once
```json { \"actions\": [ { \"payload\": { \"attributes\": { \"color\": \"red\" }, \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"PATCH_MANY\" } ] } ```
Removing an item from the catalog
```json { \"actions\": [ { \"payload\": { \"sku\": \"SKU1241028\" }, \"type\": \"REMOVE\" } ] } ```
Removing several items from the catalog at once
```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"color\", \"op\": \"EQ\", \"value\": \"blue\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
Removing shoes of sizes above 45 from the catalog

Let's imagine that we have a shoe store and we have decided to stop selling shoes larger than size 45. We can remove from the catalog all the shoes of sizes above 45 with a single action:

```json { \"actions\": [ { \"payload\": { \"filters\": [ { \"attr\": \"size\", \"op\": \"GT\", \"value\": \"45\" } ] }, \"type\": \"REMOVE_MANY\" } ] } ```
### Example @@ -891,7 +1235,7 @@ Perform one or more of the following sync actions on this cart item catalog, up require_once(__DIR__ . '/vendor/autoload.php'); -// Configure API key authorization: manager_auth +// Configure API key authorization: api_key_v1 $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); @@ -903,8 +1247,8 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$catalogId = 56; // int | -$body = new \TalonOne\Client\Model\CatalogSyncRequest(); // \TalonOne\Client\Model\CatalogSyncRequest | +$catalogId = 56; // int | The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. +$body = new \TalonOne\Client\Model\CatalogSyncRequest(); // \TalonOne\Client\Model\CatalogSyncRequest | body try { $result = $apiInstance->syncCatalog($catalogId, $body); @@ -920,8 +1264,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **catalogId** | **int**| | - **body** | [**\TalonOne\Client\Model\CatalogSyncRequest**](../Model/CatalogSyncRequest.md)| | + **catalogId** | **int**| The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. | + **body** | [**\TalonOne\Client\Model\CatalogSyncRequest**](../Model/CatalogSyncRequest.md)| body | ### Return type @@ -929,7 +1273,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[api_key_v1](../../README.md#api_key_v1) ### HTTP request headers @@ -947,7 +1291,7 @@ Name | Type | Description | Notes Track event -**Important:** This endpoint is **DEPRECATED**. Use [Track Event V2](https://docs.talon.one/integration-api/#tag/Events/operation/trackEventV2) instead.
Triggers a custom event in a customer session. You can then check this event in your rules. **Important:** Talon.One offers a set of [built-in events](/docs/dev/concepts/events), ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a user updates their payment information. Before using this endpoint, create your event as a custom attribute of type `event`. See the [Developer docs](/docs/dev/concepts/events/#creating-a-custom-event). An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same `profileId` or an error will be returned.
+

Deprecation warning

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

See Migrating to V2.

Triggers a custom event in a customer session. You can then check this event in your rules. Before using this endpoint, create your event as a custom attribute of type `event`. An event is always part of a session. If either the profile or the session does not exist, a new empty profile/session is created. If the specified session already exists, it must belong to the same `profileId` or an error will be returned. ### Example @@ -968,7 +1312,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewEvent(); // \TalonOne\Client\Model\NewEvent | +$body = new \TalonOne\Client\Model\NewEvent(); // \TalonOne\Client\Model\NewEvent | body $dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. try { @@ -985,7 +1329,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewEvent**](../Model/NewEvent.md)| | + **body** | [**\TalonOne\Client\Model\NewEvent**](../Model/NewEvent.md)| body | **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] ### Return type @@ -1012,7 +1356,7 @@ Name | Type | Description | Notes Track event V2 -Triggers a custom event. You can then check this event in your rules. Talon.One offers a set of [built-in events](/docs/dev/concepts/events), ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). **Important:** - `profileId` is required. An event V2 is associated with a customer profile. - Before using this endpoint, create your event as a custom attribute of type `event`. See the [Developer docs](/docs/dev/concepts/events/#creating-a-custom-event). +Triggers a custom event. You can build a condition around this event in your rules. Talon.One offers a set of [built-in events](https://docs.talon.one/docs/dev/concepts/events). Ensure you do not create a custom event when you can use a built-in event. For example, use this endpoint to trigger an event when a customer shares a link to a product. See the [tutorial](https://docs.talon.one/docs/product/tutorials/referrals/incentivizing-product-link-sharing). **Important:** - `profileId` is required. An event V2 is associated with a customer profile. - Before using this endpoint, create your event as a custom attribute of type `event`. See the [Developer docs](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event). When you successfully sent an event to Talon.One, you can list received events in the **Events** view in the Campaign Manager. ### Example @@ -1033,8 +1377,8 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\IntegrationEventV2Request(); // \TalonOne\Client\Model\IntegrationEventV2Request | -$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. +$body = new \TalonOne\Client\Model\IntegrationEventV2Request(); // \TalonOne\Client\Model\IntegrationEventV2Request | body +$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. $dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. try { @@ -1051,8 +1395,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\IntegrationEventV2Request**](../Model/IntegrationEventV2Request.md)| | - **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. | [optional] [default to 'yes'] + **body** | [**\TalonOne\Client\Model\IntegrationEventV2Request**](../Model/IntegrationEventV2Request.md)| body | + **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [optional] [default to 'yes'] **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] ### Return type @@ -1101,7 +1445,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $audienceId = 56; // int | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). -$body = new \stdClass; // object | +$body = new \stdClass; // object | body try { $apiInstance->updateAudienceCustomersAttributes($audienceId, $body); @@ -1117,7 +1461,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **audienceId** | **int**| The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | - **body** | **object**| | + **body** | **object**| body | ### Return type @@ -1143,7 +1487,7 @@ void (empty response body) Update audience name -Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the rule engine. To update the audience's members, use the [Update customer profile endpoint](#tag/Customer-profiles/operation/updateCustomerProfileV2). +Update the name of the given audience created by a third-party integration. Sending a request to this endpoint does **not** trigger the rule engine. To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint. ### Example @@ -1165,7 +1509,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $audienceId = 56; // int | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). -$body = new \TalonOne\Client\Model\UpdateAudience(); // \TalonOne\Client\Model\UpdateAudience | +$body = new \TalonOne\Client\Model\UpdateAudience(); // \TalonOne\Client\Model\UpdateAudience | body try { $result = $apiInstance->updateAudienceV2($audienceId, $body); @@ -1182,7 +1526,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **audienceId** | **int**| The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | - **body** | [**\TalonOne\Client\Model\UpdateAudience**](../Model/UpdateAudience.md)| | + **body** | [**\TalonOne\Client\Model\UpdateAudience**](../Model/UpdateAudience.md)| body | ### Return type @@ -1229,7 +1573,7 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\CustomerProfileAudienceRequest(); // \TalonOne\Client\Model\CustomerProfileAudienceRequest | +$body = new \TalonOne\Client\Model\CustomerProfileAudienceRequest(); // \TalonOne\Client\Model\CustomerProfileAudienceRequest | body try { $apiInstance->updateCustomerProfileAudiences($body); @@ -1244,7 +1588,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\CustomerProfileAudienceRequest**](../Model/CustomerProfileAudienceRequest.md)| | + **body** | [**\TalonOne\Client\Model\CustomerProfileAudienceRequest**](../Model/CustomerProfileAudienceRequest.md)| body | ### Return type @@ -1270,7 +1614,7 @@ void (empty response body) Update customer profile -Update or create a [Customer Profile](/docs/dev/concepts/entities#customer-profile). This endpoint triggers the Rule Builder. You can use this endpoint to: - Set attributes on the given customer profile. Ensure you create the attributes in the Campaign Manager, first. - Modify the audience the customer profile is a member of.

Performance tips

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

Performance tips

Updating a customer profile returns a response with the requested integration state. You can use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests.
### Example @@ -1292,9 +1636,9 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( $config ); $integrationId = 'integrationId_example'; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. -$body = new \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2(); // \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 | +$body = new \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2(); // \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 | body $runRuleEngine = false; // bool | Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. -$dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. +$dry = True; // bool | (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. try { $result = $apiInstance->updateCustomerProfileV2($integrationId, $body, $runRuleEngine, $dry); @@ -1311,9 +1655,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | - **body** | [**\TalonOne\Client\Model\CustomerProfileIntegrationRequestV2**](../Model/CustomerProfileIntegrationRequestV2.md)| | + **body** | [**\TalonOne\Client\Model\CustomerProfileIntegrationRequestV2**](../Model/CustomerProfileIntegrationRequestV2.md)| body | **runRuleEngine** | **bool**| Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. | [optional] [default to false] - **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. | [optional] + **dry** | **bool**| (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. | [optional] ### Return type @@ -1339,7 +1683,7 @@ Name | Type | Description | Notes Update multiple customer profiles -Update (or create) up to 1000 [customer profiles](/docs/dev/concepts/entities#customer-profile) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](/integration-api/#tag/Customer-sessions). +Update (or create) up to 1000 [customer profiles](https://docs.talon.one/docs/dev/concepts/entities#customer-profile) in 1 request. The `integrationId` must be any identifier that remains stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. A customer profile [can be linked to one or more sessions](https://docs.talon.one/integration-api#tag/Customer-sessions). ### Example @@ -1360,8 +1704,8 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest(); // \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest | -$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. +$body = new \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest(); // \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest | body +$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. try { $result = $apiInstance->updateCustomerProfilesV2($body, $silent); @@ -1377,8 +1721,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest**](../Model/MultipleCustomerProfileIntegrationRequest.md)| | - **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. | [optional] [default to 'yes'] + **body** | [**\TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest**](../Model/MultipleCustomerProfileIntegrationRequest.md)| body | + **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [optional] [default to 'yes'] ### Return type @@ -1404,7 +1748,7 @@ Name | Type | Description | Notes Update customer session -Update or create a [customer session](/docs/dev/concepts/entities#customer-session). For example, use this endpoint to share the content of a customer's cart with Talon.One and to check which promotion rules apply. **Note:** The currency for the session and the cart items in the session is the same as the Application that owns this session. ### Session management 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. See more information and tips about session management in the [documentation](/docs/dev/concepts/entities#customer-session). ### Sessions and customer profiles - To link a session to a customer profile, set the `profileId` parameter in the request body to a customer profile's `integrationId`. - While you can create an anonymous session with `profileId=\"\"`, we recommend you use a guest ID instead. **Note:** You do **not** have to create a customer profile first. If the specified profile does not exist, an empty profile is created automatically.

Performance tips

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

Performance tips

Updating a customer session returns a response with the new integration state. Use the `responseContent` property to save yourself extra API calls. For example, you can get the customer profile details directly without extra requests.
For more information, see: - The introductory video in [Getting started](https://docs.talon.one/docs/dev/getting-started/overview). - The [integration tutorial](https://docs.talon.one/docs/dev/tutorials/integrating-talon-one). ### Example @@ -1425,9 +1769,9 @@ $apiInstance = new TalonOne\Client\Api\IntegrationApi( new GuzzleHttp\Client(), $config ); -$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). -$body = new \TalonOne\Client\Model\IntegrationRequest(); // \TalonOne\Client\Model\IntegrationRequest | -$dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. +$customerSessionId = 'customerSessionId_example'; // string | The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. +$body = new \TalonOne\Client\Model\IntegrationRequest(); // \TalonOne\Client\Model\IntegrationRequest | body +$dry = True; // bool | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. try { $result = $apiInstance->updateCustomerSessionV2($customerSessionId, $body, $dry); @@ -1443,9 +1787,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). | - **body** | [**\TalonOne\Client\Model\IntegrationRequest**](../Model/IntegrationRequest.md)| | - **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. | [optional] + **customerSessionId** | **string**| The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. | + **body** | [**\TalonOne\Client\Model\IntegrationRequest**](../Model/IntegrationRequest.md)| body | + **dry** | **bool**| Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. | [optional] ### Return type diff --git a/docs/Api/ManagementApi.md b/docs/Api/ManagementApi.md index d7d3a87d..f1c7bfc7 100644 --- a/docs/Api/ManagementApi.md +++ b/docs/Api/ManagementApi.md @@ -4,8 +4,9 @@ All URIs are relative to *https://yourbaseurl.talon.one* Method | HTTP request | Description ------------- | ------------- | ------------- -[**addLoyaltyPoints**](ManagementApi.md#addLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points in loyalty program for given customer -[**copyCampaignToApplications**](ManagementApi.md#copyCampaignToApplications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified application +[**addLoyaltyCardPoints**](ManagementApi.md#addLoyaltyCardPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points | Add points to card +[**addLoyaltyPoints**](ManagementApi.md#addLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points to customer profile +[**copyCampaignToApplications**](ManagementApi.md#copyCampaignToApplications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified Application [**createAccountCollection**](ManagementApi.md#createAccountCollection) | **POST** /v1/collections | Create account-level collection [**createAdditionalCost**](ManagementApi.md#createAdditionalCost) | **POST** /v1/additional_costs | Create additional cost [**createAttribute**](ManagementApi.md#createAttribute) | **POST** /v1/attributes | Create custom attribute @@ -14,15 +15,17 @@ Method | HTTP request | Description [**createCoupons**](ManagementApi.md#createCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons [**createCouponsAsync**](ManagementApi.md#createCouponsAsync) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously [**createCouponsForMultipleRecipients**](ManagementApi.md#createCouponsForMultipleRecipients) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients -[**createNotificationWebhook**](ManagementApi.md#createNotificationWebhook) | **POST** /v1/applications/{applicationId}/notification_webhooks | Create notification webhook +[**createNotificationWebhook**](ManagementApi.md#createNotificationWebhook) | **POST** /v1/applications/{applicationId}/notification_webhooks | Create notification about campaign-related changes [**createPasswordRecoveryEmail**](ManagementApi.md#createPasswordRecoveryEmail) | **POST** /v1/password_recovery_emails | Request a password reset [**createSession**](ManagementApi.md#createSession) | **POST** /v1/sessions | Create session +[**deductLoyaltyCardPoints**](ManagementApi.md#deductLoyaltyCardPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points | Deduct points from card [**deleteAccountCollection**](ManagementApi.md#deleteAccountCollection) | **DELETE** /v1/collections/{collectionId} | Delete account-level collection [**deleteCampaign**](ManagementApi.md#deleteCampaign) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId} | Delete campaign [**deleteCollection**](ManagementApi.md#deleteCollection) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Delete collection [**deleteCoupon**](ManagementApi.md#deleteCoupon) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Delete coupon [**deleteCoupons**](ManagementApi.md#deleteCoupons) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Delete coupons -[**deleteNotificationWebhook**](ManagementApi.md#deleteNotificationWebhook) | **DELETE** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Delete notification webhook +[**deleteLoyaltyCard**](ManagementApi.md#deleteLoyaltyCard) | **DELETE** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Delete loyalty card +[**deleteNotificationWebhook**](ManagementApi.md#deleteNotificationWebhook) | **DELETE** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Delete notification about campaign-related changes [**deleteReferral**](ManagementApi.md#deleteReferral) | **DELETE** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete referral [**destroySession**](ManagementApi.md#destroySession) | **DELETE** /v1/sessions | Destroy session [**exportAccountCollectionItems**](ManagementApi.md#exportAccountCollectionItems) | **GET** /v1/collections/{collectionId}/export | Export account-level collection's items @@ -30,8 +33,11 @@ Method | HTTP request | Description [**exportCoupons**](ManagementApi.md#exportCoupons) | **GET** /v1/applications/{applicationId}/export_coupons | Export coupons [**exportCustomerSessions**](ManagementApi.md#exportCustomerSessions) | **GET** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions [**exportEffects**](ManagementApi.md#exportEffects) | **GET** /v1/applications/{applicationId}/export_effects | Export triggered effects -[**exportLoyaltyBalance**](ManagementApi.md#exportLoyaltyBalance) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance | Export customer loyalty balance to a CSV file -[**exportLoyaltyLedger**](ManagementApi.md#exportLoyaltyLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export a customer's loyalty ledger log +[**exportLoyaltyBalance**](ManagementApi.md#exportLoyaltyBalance) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance | Export customer loyalty balance to CSV +[**exportLoyaltyBalances**](ManagementApi.md#exportLoyaltyBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances | Export customer loyalty balances +[**exportLoyaltyCardBalances**](ManagementApi.md#exportLoyaltyCardBalances) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/export_card_balances | Export all card transaction logs +[**exportLoyaltyCardLedger**](ManagementApi.md#exportLoyaltyCardLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log | Export card's ledger log +[**exportLoyaltyLedger**](ManagementApi.md#exportLoyaltyLedger) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log | Export customer's transaction logs [**exportReferrals**](ManagementApi.md#exportReferrals) | **GET** /v1/applications/{applicationId}/export_referrals | Export referrals [**getAccessLogsWithoutTotalCount**](ManagementApi.md#getAccessLogsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/access_logs/no_total | Get access logs for Application [**getAccount**](ManagementApi.md#getAccount) | **GET** /v1/accounts/{accountId} | Get account details @@ -41,8 +47,8 @@ Method | HTTP request | Description [**getAdditionalCosts**](ManagementApi.md#getAdditionalCosts) | **GET** /v1/additional_costs | List additional costs [**getAllAccessLogs**](ManagementApi.md#getAllAccessLogs) | **GET** /v1/access_logs | List access logs [**getAllRoles**](ManagementApi.md#getAllRoles) | **GET** /v1/roles | List 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 +[**getApplication**](ManagementApi.md#getApplication) | **GET** /v1/applications/{applicationId} | Get Application +[**getApplicationApiHealth**](ManagementApi.md#getApplicationApiHealth) | **GET** /v1/applications/{applicationId}/health_report | Get Application health [**getApplicationCustomer**](ManagementApi.md#getApplicationCustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer [**getApplicationCustomerFriends**](ManagementApi.md#getApplicationCustomerFriends) | **GET** /v1/applications/{applicationId}/profile/{integrationId}/friends | List friends referred by customer profile [**getApplicationCustomers**](ManagementApi.md#getApplicationCustomers) | **GET** /v1/applications/{applicationId}/customers | List application's customers @@ -51,13 +57,14 @@ Method | HTTP request | Description [**getApplicationEventsWithoutTotalCount**](ManagementApi.md#getApplicationEventsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/events/no_total | List Applications events [**getApplicationSession**](ManagementApi.md#getApplicationSession) | **GET** /v1/applications/{applicationId}/sessions/{sessionId} | Get Application session [**getApplicationSessions**](ManagementApi.md#getApplicationSessions) | **GET** /v1/applications/{applicationId}/sessions | List Application sessions -[**getApplications**](ManagementApi.md#getApplications) | **GET** /v1/applications | List applications +[**getApplications**](ManagementApi.md#getApplications) | **GET** /v1/applications | List Applications [**getAttribute**](ManagementApi.md#getAttribute) | **GET** /v1/attributes/{attributeId} | Get custom attribute [**getAttributes**](ManagementApi.md#getAttributes) | **GET** /v1/attributes | List custom attributes [**getAudiences**](ManagementApi.md#getAudiences) | **GET** /v1/audiences | List audiences [**getCampaign**](ManagementApi.md#getCampaign) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId} | Get 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 | List campaigns that match the given attributes +[**getCampaignTemplates**](ManagementApi.md#getCampaignTemplates) | **GET** /v1/campaign_templates | List campaign templates [**getCampaigns**](ManagementApi.md#getCampaigns) | **GET** /v1/applications/{applicationId}/campaigns | List campaigns [**getChanges**](ManagementApi.md#getChanges) | **GET** /v1/changes | Get audit logs for an account [**getCollection**](ManagementApi.md#getCollection) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Get collection @@ -71,12 +78,16 @@ Method | HTTP request | Description [**getCustomersByAttributes**](ManagementApi.md#getCustomersByAttributes) | **POST** /v1/customer_search/no_total | List customer profiles matching the given attributes [**getEventTypes**](ManagementApi.md#getEventTypes) | **GET** /v1/event_types | List event types [**getExports**](ManagementApi.md#getExports) | **GET** /v1/exports | Get exports -[**getLoyaltyPoints**](ManagementApi.md#getLoyaltyPoints) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId} | Get the Loyalty Ledger for this integrationID +[**getLoyaltyCard**](ManagementApi.md#getLoyaltyCard) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Get loyalty card +[**getLoyaltyCardTransactionLogs**](ManagementApi.md#getLoyaltyCardTransactionLogs) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs | List card's transactions +[**getLoyaltyCards**](ManagementApi.md#getLoyaltyCards) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/cards | List loyalty cards +[**getLoyaltyPoints**](ManagementApi.md#getLoyaltyPoints) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId} | Get customer's full loyalty ledger [**getLoyaltyProgram**](ManagementApi.md#getLoyaltyProgram) | **GET** /v1/loyalty_programs/{loyaltyProgramId} | Get loyalty program +[**getLoyaltyProgramTransactions**](ManagementApi.md#getLoyaltyProgramTransactions) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/transactions | List loyalty program transactions [**getLoyaltyPrograms**](ManagementApi.md#getLoyaltyPrograms) | **GET** /v1/loyalty_programs | List loyalty programs -[**getLoyaltyStatistics**](ManagementApi.md#getLoyaltyStatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics by loyalty program ID -[**getNotificationWebhook**](ManagementApi.md#getNotificationWebhook) | **GET** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Get notification webhook -[**getNotificationWebhooks**](ManagementApi.md#getNotificationWebhooks) | **GET** /v1/applications/{applicationId}/notification_webhooks | List notification webhooks +[**getLoyaltyStatistics**](ManagementApi.md#getLoyaltyStatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics +[**getNotificationWebhook**](ManagementApi.md#getNotificationWebhook) | **GET** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Get notification about campaign-related changes +[**getNotificationWebhooks**](ManagementApi.md#getNotificationWebhooks) | **GET** /v1/applications/{applicationId}/notification_webhooks | List notifications about campaign-related changes [**getReferralsWithoutTotalCount**](ManagementApi.md#getReferralsWithoutTotalCount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List referrals [**getRole**](ManagementApi.md#getRole) | **GET** /v1/roles/{roleId} | Get role [**getRuleset**](ManagementApi.md#getRuleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset @@ -91,16 +102,20 @@ Method | HTTP request | Description [**importAllowedList**](ManagementApi.md#importAllowedList) | **POST** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute [**importCollection**](ManagementApi.md#importCollection) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data in existing collection [**importCoupons**](ManagementApi.md#importCoupons) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons +[**importLoyaltyCards**](ManagementApi.md#importLoyaltyCards) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards [**importLoyaltyPoints**](ManagementApi.md#importLoyaltyPoints) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_points | Import loyalty points [**importPoolGiveaways**](ManagementApi.md#importPoolGiveaways) | **POST** /v1/giveaways/pools/{poolId}/import | Import giveaway codes into a giveaway pool [**importReferrals**](ManagementApi.md#importReferrals) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals | Import referrals [**listAccountCollections**](ManagementApi.md#listAccountCollections) | **GET** /v1/collections | List collections in account [**listCollections**](ManagementApi.md#listCollections) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections [**listCollectionsInApplication**](ManagementApi.md#listCollectionsInApplication) | **GET** /v1/applications/{applicationId}/collections | List collections in application -[**removeLoyaltyPoints**](ManagementApi.md#removeLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points in loyalty program for given customer +[**postAddedDeductedPointsNotification**](ManagementApi.md#postAddedDeductedPointsNotification) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points | Create notification about added or deducted loyalty points +[**postCatalogsStrikethroughNotification**](ManagementApi.md#postCatalogsStrikethroughNotification) | **POST** /v1/catalogs/{applicationId}/notifications/strikethrough | Create strikethrough notification +[**removeLoyaltyPoints**](ManagementApi.md#removeLoyaltyPoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points | Deduct points from customer profile [**resetPassword**](ManagementApi.md#resetPassword) | **POST** /v1/reset_password | Reset password [**searchCouponsAdvancedApplicationWideWithoutTotalCount**](ManagementApi.md#searchCouponsAdvancedApplicationWideWithoutTotalCount) | **POST** /v1/applications/{applicationId}/coupons_search_advanced/no_total | List coupons that match the given attributes (without total count) [**searchCouponsAdvancedWithoutTotalCount**](ManagementApi.md#searchCouponsAdvancedWithoutTotalCount) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total | List coupons that match the given attributes in campaign (without total count) +[**transferLoyaltyCard**](ManagementApi.md#transferLoyaltyCard) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer | Transfer card data [**updateAccountCollection**](ManagementApi.md#updateAccountCollection) | **PUT** /v1/collections/{collectionId} | Update account-level collection [**updateAdditionalCost**](ManagementApi.md#updateAdditionalCost) | **PUT** /v1/additional_costs/{additionalCostId} | Update additional cost [**updateAttribute**](ManagementApi.md#updateAttribute) | **PUT** /v1/attributes/{attributeId} | Update custom attribute @@ -108,18 +123,90 @@ Method | HTTP request | Description [**updateCollection**](ManagementApi.md#updateCollection) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Update collection description [**updateCoupon**](ManagementApi.md#updateCoupon) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Update coupon [**updateCouponBatch**](ManagementApi.md#updateCouponBatch) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Update coupons -[**updateNotificationWebhook**](ManagementApi.md#updateNotificationWebhook) | **PUT** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Update notification webhook +[**updateLoyaltyCard**](ManagementApi.md#updateLoyaltyCard) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Update loyalty card status +[**updateNotificationWebhook**](ManagementApi.md#updateNotificationWebhook) | **PUT** /v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId} | Update notification about campaign-related changes [**updateReferral**](ManagementApi.md#updateReferral) | **PUT** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Update referral +## addLoyaltyCardPoints + +> addLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $body) + +Add points to card + +Add points to the given loyalty card in the specified card-based loyalty program. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$body = new \TalonOne\Client\Model\AddLoyaltyPoints(); // \TalonOne\Client\Model\AddLoyaltyPoints | body + +try { + $apiInstance->addLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $body); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->addLoyaltyCardPoints: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **body** | [**\TalonOne\Client\Model\AddLoyaltyPoints**](../Model/AddLoyaltyPoints.md)| body | + +### Return type + +void (empty response body) + +### Authorization + +[management_key](../../README.md#management_key), [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) + + ## addLoyaltyPoints > addLoyaltyPoints($loyaltyProgramId, $integrationId, $body) -Add points in loyalty program for given customer +Add points to customer profile -Add points in the specified loyalty program for the given customer. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](/integration-api/#operation/updateCustomerSessionV2). +Add points in the specified loyalty program for the given customer. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. ### Example @@ -128,6 +215,11 @@ Add points in the specified loyalty program for the given customer. To get the require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -142,7 +234,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. $integrationId = 'integrationId_example'; // string | The identifier of the profile. -$body = new \TalonOne\Client\Model\LoyaltyPoints(); // \TalonOne\Client\Model\LoyaltyPoints | +$body = new \TalonOne\Client\Model\AddLoyaltyPoints(); // \TalonOne\Client\Model\AddLoyaltyPoints | body try { $apiInstance->addLoyaltyPoints($loyaltyProgramId, $integrationId, $body); @@ -159,7 +251,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **string**| The identifier for the loyalty program. | **integrationId** | **string**| The identifier of the profile. | - **body** | [**\TalonOne\Client\Model\LoyaltyPoints**](../Model/LoyaltyPoints.md)| | + **body** | [**\TalonOne\Client\Model\AddLoyaltyPoints**](../Model/AddLoyaltyPoints.md)| body | ### Return type @@ -167,7 +259,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -181,11 +273,11 @@ void (empty response body) ## copyCampaignToApplications -> \TalonOne\Client\Model\InlineResponse2003 copyCampaignToApplications($applicationId, $campaignId, $body) +> \TalonOne\Client\Model\InlineResponse2004 copyCampaignToApplications($applicationId, $campaignId, $body) -Copy the campaign into the specified application +Copy the campaign into the specified Application -Copy the campaign into all specified application. +Copy the campaign into all specified Applications. ### Example @@ -194,6 +286,11 @@ Copy the campaign into all specified application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -208,7 +305,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\CampaignCopy(); // \TalonOne\Client\Model\CampaignCopy | +$body = new \TalonOne\Client\Model\CampaignCopy(); // \TalonOne\Client\Model\CampaignCopy | body try { $result = $apiInstance->copyCampaignToApplications($applicationId, $campaignId, $body); @@ -226,15 +323,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\CampaignCopy**](../Model/CampaignCopy.md)| | + **body** | [**\TalonOne\Client\Model\CampaignCopy**](../Model/CampaignCopy.md)| body | ### Return type -[**\TalonOne\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) +[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -261,6 +358,11 @@ Create account-level collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -273,7 +375,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewCollection(); // \TalonOne\Client\Model\NewCollection | +$body = new \TalonOne\Client\Model\NewCollection(); // \TalonOne\Client\Model\NewCollection | body try { $result = $apiInstance->createAccountCollection($body); @@ -289,7 +391,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewCollection**](../Model/NewCollection.md)| | + **body** | [**\TalonOne\Client\Model\NewCollection**](../Model/NewCollection.md)| body | ### Return type @@ -297,7 +399,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -315,7 +417,7 @@ Name | Type | Description | Notes Create additional cost -Create an [additional cost](/docs/product/account/dev-tools/managing-additional-costs/). These additional costs are shared across all applications in your account, and are never required. +Create an [additional cost](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). These additional costs are shared across all applications in your account, and are never required. ### Example @@ -324,6 +426,11 @@ Create an [additional cost](/docs/product/account/dev-tools/managing-additional- require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -336,7 +443,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewAdditionalCost(); // \TalonOne\Client\Model\NewAdditionalCost | +$body = new \TalonOne\Client\Model\NewAdditionalCost(); // \TalonOne\Client\Model\NewAdditionalCost | body try { $result = $apiInstance->createAdditionalCost($body); @@ -352,7 +459,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewAdditionalCost**](../Model/NewAdditionalCost.md)| | + **body** | [**\TalonOne\Client\Model\NewAdditionalCost**](../Model/NewAdditionalCost.md)| body | ### Return type @@ -360,7 +467,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -378,7 +485,7 @@ Name | Type | Description | Notes Create custom attribute -Create a _custom attribute_ in this account. Custom attributes allow you to attach new fields to Talon.One domain objects like campaigns, coupons, customers and so on. These attributes can then be given values when creating/updating these objects, and these values can be used in your campaign rules. For example, you could define a `zipCode` field for customer sessions, and add a rule to your campaign that only allows certain ZIP codes. These attributes are shared across all applications in your account, and are never required. +Create a _custom attribute_ in this account. [Custom attributes](https://docs.talon.one/docs/dev/concepts/attributes) allow you to add data to Talon.One domain entities like campaigns, coupons, customers and so on. These attributes can then be given values when creating/updating these entities, and these values can be used in your campaign rules. For example, you could define a `zipCode` field for customer sessions, and add a rule to your campaign that only allows certain ZIP codes. These attributes are shared across all Applications in your account and are never required. ### Example @@ -387,6 +494,11 @@ Create a _custom attribute_ in this account. Custom attributes allow you to atta require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -399,7 +511,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewAttribute(); // \TalonOne\Client\Model\NewAttribute | +$body = new \TalonOne\Client\Model\NewAttribute(); // \TalonOne\Client\Model\NewAttribute | body try { $result = $apiInstance->createAttribute($body); @@ -415,7 +527,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewAttribute**](../Model/NewAttribute.md)| | + **body** | [**\TalonOne\Client\Model\NewAttribute**](../Model/NewAttribute.md)| body | ### Return type @@ -423,7 +535,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -450,6 +562,11 @@ Use the campaign template referenced in the request body to create a new campaig require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -463,7 +580,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\CreateTemplateCampaign(); // \TalonOne\Client\Model\CreateTemplateCampaign | +$body = new \TalonOne\Client\Model\CreateTemplateCampaign(); // \TalonOne\Client\Model\CreateTemplateCampaign | body try { $result = $apiInstance->createCampaignFromTemplate($applicationId, $body); @@ -480,7 +597,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\CreateTemplateCampaign**](../Model/CreateTemplateCampaign.md)| | + **body** | [**\TalonOne\Client\Model\CreateTemplateCampaign**](../Model/CreateTemplateCampaign.md)| body | ### Return type @@ -488,7 +605,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -515,6 +632,11 @@ Create a collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -529,7 +651,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\NewCampaignCollection(); // \TalonOne\Client\Model\NewCampaignCollection | +$body = new \TalonOne\Client\Model\NewCampaignCollection(); // \TalonOne\Client\Model\NewCampaignCollection | body try { $result = $apiInstance->createCollection($applicationId, $campaignId, $body); @@ -547,7 +669,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\NewCampaignCollection**](../Model/NewCampaignCollection.md)| | + **body** | [**\TalonOne\Client\Model\NewCampaignCollection**](../Model/NewCampaignCollection.md)| body | ### Return type @@ -555,7 +677,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -569,7 +691,7 @@ Name | Type | Description | Notes ## createCoupons -> \TalonOne\Client\Model\InlineResponse2006 createCoupons($applicationId, $campaignId, $body, $silent) +> \TalonOne\Client\Model\InlineResponse2007 createCoupons($applicationId, $campaignId, $body, $silent) Create coupons @@ -582,6 +704,11 @@ Create coupons according to some pattern. Up to 20.000 coupons can be created wi require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -596,8 +723,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\NewCoupons(); // \TalonOne\Client\Model\NewCoupons | -$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. +$body = new \TalonOne\Client\Model\NewCoupons(); // \TalonOne\Client\Model\NewCoupons | body +$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. try { $result = $apiInstance->createCoupons($applicationId, $campaignId, $body, $silent); @@ -615,16 +742,16 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\NewCoupons**](../Model/NewCoupons.md)| | - **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. | [optional] [default to 'yes'] + **body** | [**\TalonOne\Client\Model\NewCoupons**](../Model/NewCoupons.md)| body | + **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [optional] [default to 'yes'] ### Return type -[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) +[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -642,7 +769,7 @@ Name | Type | Description | Notes Create coupons asynchronously -Create any number of coupons from 20,001 to 5,000,000. +Create up to 5,000,000 coupons asynchronously. You should typically use this enpdoint when you create at least 20,001 coupons. You receive an email when the creation is complete. If you want to create less than 20,001 coupons, you can use the [Create coupons](https://docs.talon.one/management-api#tag/Coupons/operation/createCoupons) endpoint. ### Example @@ -651,6 +778,11 @@ Create any number of coupons from 20,001 to 5,000,000. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -665,7 +797,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\NewCouponCreationJob(); // \TalonOne\Client\Model\NewCouponCreationJob | +$body = new \TalonOne\Client\Model\NewCouponCreationJob(); // \TalonOne\Client\Model\NewCouponCreationJob | body try { $result = $apiInstance->createCouponsAsync($applicationId, $campaignId, $body); @@ -683,7 +815,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\NewCouponCreationJob**](../Model/NewCouponCreationJob.md)| | + **body** | [**\TalonOne\Client\Model\NewCouponCreationJob**](../Model/NewCouponCreationJob.md)| body | ### Return type @@ -691,7 +823,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -705,7 +837,7 @@ Name | Type | Description | Notes ## createCouponsForMultipleRecipients -> \TalonOne\Client\Model\InlineResponse2006 createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent) +> \TalonOne\Client\Model\InlineResponse2007 createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent) Create coupons for multiple recipients @@ -718,6 +850,11 @@ Create coupons according to some pattern for up to 1000 recipients. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -732,8 +869,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\NewCouponsForMultipleRecipients(); // \TalonOne\Client\Model\NewCouponsForMultipleRecipients | -$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. +$body = new \TalonOne\Client\Model\NewCouponsForMultipleRecipients(); // \TalonOne\Client\Model\NewCouponsForMultipleRecipients | body +$silent = 'yes'; // string | Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. try { $result = $apiInstance->createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent); @@ -751,16 +888,16 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\NewCouponsForMultipleRecipients**](../Model/NewCouponsForMultipleRecipients.md)| | - **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. | [optional] [default to 'yes'] + **body** | [**\TalonOne\Client\Model\NewCouponsForMultipleRecipients**](../Model/NewCouponsForMultipleRecipients.md)| body | + **silent** | **string**| Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. | [optional] [default to 'yes'] ### Return type -[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) +[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -776,9 +913,9 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\NotificationWebhook createNotificationWebhook($applicationId, $body) -Create notification webhook +Create notification about campaign-related changes -Create an outbound notification webhook. An outbound notification webhook is different from regular webhooks in that it is application-scoped and has a predefined payload (regular webhooks have user-definable payloads). +Create a [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). A notification about campaign-related changes is different from regular webhooks in that it is Application-scoped and has a predefined payload. [Regular webhooks](https://docs.talon.one/docs/dev/getting-started/webhooks) have user-definable payloads. **Tip:** - You can create these notifications using the Campaign Manager. See [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). - You can review the payload you will receive in the [specs](https://docs.talon.one/outbound-notifications#/paths/campaign_created/post). ### Example @@ -787,6 +924,11 @@ Create an outbound notification webhook. An outbound notification webhook is dif require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -800,7 +942,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\NewNotificationWebhook(); // \TalonOne\Client\Model\NewNotificationWebhook | +$body = new \TalonOne\Client\Model\NewNotificationWebhook(); // \TalonOne\Client\Model\NewNotificationWebhook | body try { $result = $apiInstance->createNotificationWebhook($applicationId, $body); @@ -817,7 +959,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\NewNotificationWebhook**](../Model/NewNotificationWebhook.md)| | + **body** | [**\TalonOne\Client\Model\NewNotificationWebhook**](../Model/NewNotificationWebhook.md)| body | ### Return type @@ -825,7 +967,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -843,7 +985,7 @@ Name | Type | Description | Notes Request a password reset -Send an email with a password recovery link to the email address of an existing account. +Send an email with a password recovery link to the email address of an existing account. **Note:** The password recovery link expires 30 minutes after this endpoint is triggered. ### Example @@ -852,6 +994,11 @@ Send an email with a password recovery link to the email address of an existing require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -864,7 +1011,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewPasswordEmail(); // \TalonOne\Client\Model\NewPasswordEmail | +$body = new \TalonOne\Client\Model\NewPasswordEmail(); // \TalonOne\Client\Model\NewPasswordEmail | body try { $result = $apiInstance->createPasswordRecoveryEmail($body); @@ -880,7 +1027,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewPasswordEmail**](../Model/NewPasswordEmail.md)| | + **body** | [**\TalonOne\Client\Model\NewPasswordEmail**](../Model/NewPasswordEmail.md)| body | ### Return type @@ -888,7 +1035,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -906,7 +1053,7 @@ Name | Type | Description | Notes Create session -Create a session to use the Management API endpoints. Use the value of the `token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do **not** regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup. **Note:** You can also use your browser's developer's console when you log into the Campaign Manager. Keep in mind that logging out destroys the token displayed in the console. +Create a session to use the Management API endpoints. Use the value of the `token` property provided in the response as bearer token in other API calls. A token is valid for 3 months. In accordance with best pratices, use your generated token for all your API requests. Do **not** regenerate a token for each request. This endpoint has a rate limit of 3 to 6 requests per second per account, depending on your setup.

Granular API key

Instead of using a session, you can also use the Management API key feature in the Campaign Manager to decide which endpoints can be used with a given key.
### Example @@ -915,6 +1062,11 @@ Create a session to use the Management API endpoints. Use the value of the `toke require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -927,7 +1079,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\LoginParams(); // \TalonOne\Client\Model\LoginParams | +$body = new \TalonOne\Client\Model\LoginParams(); // \TalonOne\Client\Model\LoginParams | body try { $result = $apiInstance->createSession($body); @@ -943,7 +1095,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\LoginParams**](../Model/LoginParams.md)| | + **body** | [**\TalonOne\Client\Model\LoginParams**](../Model/LoginParams.md)| body | ### Return type @@ -951,7 +1103,78 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [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) + + +## deductLoyaltyCardPoints + +> deductLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $body) + +Deduct points from card + +Deduct points from the given loyalty card in the specified card-based loyalty program. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$body = new \TalonOne\Client\Model\DeductLoyaltyPoints(); // \TalonOne\Client\Model\DeductLoyaltyPoints | body + +try { + $apiInstance->deductLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $body); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->deductLoyaltyCardPoints: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **body** | [**\TalonOne\Client\Model\DeductLoyaltyPoints**](../Model/DeductLoyaltyPoints.md)| body | + +### Return type + +void (empty response body) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -978,6 +1201,11 @@ Delete the given account-level collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -990,7 +1218,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. try { $apiInstance->deleteAccountCollection($collectionId); @@ -1005,7 +1233,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -1013,7 +1241,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1040,6 +1268,11 @@ Delete the given campaign. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1077,7 +1310,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1104,6 +1337,11 @@ Delete the given collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1118,7 +1356,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. try { $apiInstance->deleteCollection($applicationId, $campaignId, $collectionId); @@ -1135,7 +1373,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -1143,7 +1381,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1170,6 +1408,11 @@ Delete the specified coupon. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1184,7 +1427,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$couponId = 'couponId_example'; // string | The ID of the coupon code to update +$couponId = 'couponId_example'; // string | The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. try { $apiInstance->deleteCoupon($applicationId, $campaignId, $couponId); @@ -1201,7 +1444,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **couponId** | **string**| The ID of the coupon code to update | + **couponId** | **string**| The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. | ### Return type @@ -1209,7 +1452,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1236,6 +1479,11 @@ Deletes all the coupons matching the specified criteria. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1257,10 +1505,10 @@ $startsAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter $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 | - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. +$valid = 'valid_example'; // string | - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: 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 | - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. -$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. +$referralId = 56; // int | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. $recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. $exactMatch = false; // bool | Filter results to an exact case-insensitive matching against the coupon code @@ -1286,10 +1534,10 @@ Name | Type | Description | Notes **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**| - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. | [optional] + **valid** | **string**| - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches coupons in which start date is set and in the future. | [optional] **batchId** | **string**| Filter results by batches of coupons | [optional] **usable** | **string**| - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. | [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] + **referralId** | **int**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. | [optional] **exactMatch** | **bool**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] @@ -1299,7 +1547,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1311,13 +1559,13 @@ void (empty response body) [[Back to README]](../../README.md) -## deleteNotificationWebhook +## deleteLoyaltyCard -> deleteNotificationWebhook($applicationId, $notificationWebhookId) +> deleteLoyaltyCard($loyaltyProgramId, $loyaltyCardId) -Delete notification webhook +Delete loyalty card -Remove the given existing outbound notification webhook. +Delete the given loyalty card. ### Example @@ -1326,6 +1574,11 @@ Remove the given existing outbound notification webhook. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1338,13 +1591,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$notificationWebhookId = 56; // int | +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. try { - $apiInstance->deleteNotificationWebhook($applicationId, $notificationWebhookId); + $apiInstance->deleteLoyaltyCard($loyaltyProgramId, $loyaltyCardId); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteNotificationWebhook: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->deleteLoyaltyCard: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1354,8 +1607,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **notificationWebhookId** | **int**| | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | ### Return type @@ -1363,25 +1616,25 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md) -## deleteReferral +## deleteNotificationWebhook -> deleteReferral($applicationId, $campaignId, $referralId) +> deleteNotificationWebhook($applicationId, $notificationWebhookId) -Delete referral +Delete notification about campaign-related changes -Delete the specified referral. +Remove the given existing [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). ### Example @@ -1390,6 +1643,11 @@ Delete the specified referral. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1403,13 +1661,12 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$referralId = 'referralId_example'; // string | The ID of the referral code to delete +$notificationWebhookId = 56; // int | The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. try { - $apiInstance->deleteReferral($applicationId, $campaignId, $referralId); + $apiInstance->deleteNotificationWebhook($applicationId, $notificationWebhookId); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->deleteReferral: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->deleteNotificationWebhook: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1420,8 +1677,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **referralId** | **string**| The ID of the referral code to delete | + **notificationWebhookId** | **int**| The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. | ### Return type @@ -1429,7 +1685,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1441,13 +1697,13 @@ void (empty response body) [[Back to README]](../../README.md) -## destroySession +## deleteReferral -> destroySession() +> deleteReferral($applicationId, $campaignId, $referralId) -Destroy session +Delete referral -Destroys the session. +Delete the specified referral. ### Example @@ -1456,6 +1712,11 @@ Destroys the session. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1468,18 +1729,26 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$referralId = 'referralId_example'; // string | The ID of the referral code. try { - $apiInstance->destroySession(); + $apiInstance->deleteReferral($applicationId, $campaignId, $referralId); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->destroySession: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->deleteReferral: ', $e->getMessage(), PHP_EOL; } ?> ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **referralId** | **string**| The ID of the referral code. | ### Return type @@ -1487,7 +1756,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1499,13 +1768,13 @@ void (empty response body) [[Back to README]](../../README.md) -## exportAccountCollectionItems +## destroySession -> string exportAccountCollectionItems($collectionId) +> destroySession() -Export account-level collection's items +Destroy session -Download a CSV file containing items from an account-level collection. +Destroys the session. ### Example @@ -1514,6 +1783,11 @@ Download a CSV file containing items from an account-level collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1526,10 +1800,73 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). try { - $result = $apiInstance->exportAccountCollectionItems($collectionId); + $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 + +[management_key](../../README.md#management_key), [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) + + +## exportAccountCollectionItems + +> string exportAccountCollectionItems($collectionId) + +Export account-level collection's items + +Download a CSV file containing items from an account-level collection. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. + +try { + $result = $apiInstance->exportAccountCollectionItems($collectionId); print_r($result); } catch (Exception $e) { echo 'Exception when calling ManagementApi->exportAccountCollectionItems: ', $e->getMessage(), PHP_EOL; @@ -1542,7 +1879,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -1550,7 +1887,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1568,7 +1905,7 @@ Name | Type | Description | Notes Export a collection's items -Download a CSV file containing a collection's items. +Download a CSV file containing a collection's items. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). ### Example @@ -1577,6 +1914,11 @@ Download a CSV file containing a collection's items. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1591,7 +1933,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. try { $result = $apiInstance->exportCollectionItems($applicationId, $campaignId, $collectionId); @@ -1609,7 +1951,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -1617,7 +1959,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1635,7 +1977,7 @@ Name | Type | Description | Notes Export coupons -Download a CSV file containing the coupons that match the given properties. +Download a CSV file containing the coupons that match the given properties. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `accountid`: The ID of your deployment. - `applicationid`: The ID of the Application this coupon is related to. - `attributes`: A json object describing _custom_ referral attribute names and their values. - `batchid`: The ID of the batch this coupon is part of. - `campaignid`: The ID of the campaign this coupon is related to. - `counter`: The number of times this coupon has been redeemed. - `created`: The creation date of the coupon code. - `deleted`: Whether the coupon code is deleted. - `deleted_changelogid`: The ID of the delete event in the logs. - `discount_counter`: The amount of discount given by this coupon. - `discount_limitval`: The maximum discount amount that can be given be this coupon. - `expirydate`: The end date in RFC3339 of the code redemption period. - `id`: The internal ID of the coupon code. - `importid`: The ID of the import job that created this coupon. - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - `limits`: The limits set on this coupon. - `limitval`: The maximum number of redemptions of this code. - `recipientintegrationid`: The integration ID of the customer considered as recipient of the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon is reserved. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code. ### Example @@ -1644,6 +1986,11 @@ Download a CSV file containing the coupons that match the given properties. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1658,13 +2005,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $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. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $value = 'value_example'; // string | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. $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. +$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. $usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. -$referralId = 56; // int | Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. +$referralId = 56; // int | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. $recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field $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 @@ -1687,13 +2034,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **value** | **string**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **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] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] **usable** | **string**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | [optional] - **referralId** | **int**| Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] + **referralId** | **int**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] **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] @@ -1706,7 +2053,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1724,7 +2071,7 @@ Name | Type | Description | Notes Export customer sessions -Download a CSV file containing the customer sessions that match the request. **Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). +Download a CSV file containing the customer sessions that match the request. **Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - `id`: The internal ID of the session. - `firstsession`: Whether this is a first session. - `integrationid`: The integration ID of the session. - `applicationid`: The ID of the Application. - `profileid`: The internal ID of the customer profile. - `profileintegrationid`: The integration ID of the customer profile. - `created`: The timestamp when the session was created. - `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities#customer-session-states) of the session. - `cartitems`: The cart items in the session. - `discounts`: The discounts in the session. - `total`: The total value of the session. - `attributes`: The attributes set in the session. - `closedat`: Timestamp when the session was closed. - `cancelledat`: Timestamp when the session was cancelled. - `referral`: The referral code in the session. - `identifiers`: The identifiers in the session. - `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. - `updated`: Timestamp of the last session update. - `coupons`: Coupon codes in the session. ### Example @@ -1733,6 +2080,11 @@ Download a CSV file containing the customer sessions that match the request. ** require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1779,7 +2131,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1797,7 +2149,7 @@ Name | Type | Description | Notes Export triggered effects -Download a CSV file containing the triggered effects that match the given attributes. +Download a CSV file containing the triggered effects that match the given attributes. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `applicationid`: The ID of the Application. - `campaignid`: The ID of the campaign. - `couponid`: The ID of the coupon, when applicable to the effect. - `created`: The timestamp of the effect. - `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/events). - `eventid`: The internal ID of the effect. - `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). - `profileintegrationid`: The ID of the customer profile, when applicable. - `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. - `ruleindex`: The index of the rule. - `rulesetid`: The ID of the rule set. - `sessionid`: The internal ID of the session that triggered the effect. - `profileid`: The internal ID of the customer profile. - `sessionintegrationid`: The integration ID of the session. - `total_revenue`: The total revenue. ### Example @@ -1806,6 +2158,11 @@ Download a CSV file containing the triggered effects that match the given attrib require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1850,7 +2207,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1864,11 +2221,11 @@ Name | Type | Description | Notes ## exportLoyaltyBalance -> string exportLoyaltyBalance($loyaltyProgramId) +> string exportLoyaltyBalance($loyaltyProgramId, $endDate) -Export customer loyalty balance to a CSV file +Export customer loyalty balance to CSV -Download a CSV file containing the balance of each customer in the loyalty program. +⚠️ Deprecation notice: Support for requests to this endpoint will end soon. To export customer loyalty balances to CSV, use the [Export customer loyalty balances to CSV](/management-api#tag/Loyalty/operation/exportLoyaltyBalances) endpoint. Download a CSV file containing the balance of each customer in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). ### Example @@ -1877,6 +2234,11 @@ Download a CSV file containing the balance of each customer in the loyalty progr require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1890,9 +2252,10 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. try { - $result = $apiInstance->exportLoyaltyBalance($loyaltyProgramId); + $result = $apiInstance->exportLoyaltyBalance($loyaltyProgramId, $endDate); print_r($result); } catch (Exception $e) { echo 'Exception when calling ManagementApi->exportLoyaltyBalance: ', $e->getMessage(), PHP_EOL; @@ -1906,6 +2269,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **string**| The identifier for the loyalty program. | + **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -1913,7 +2277,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1925,13 +2289,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## exportLoyaltyLedger +## exportLoyaltyBalances -> string exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat) +> string exportLoyaltyBalances($loyaltyProgramId, $endDate) -Export a customer's loyalty ledger log +Export customer loyalty balances -Download a CSV file containing a customer's ledger log in the loyalty program +Download a CSV file containing the balance of each customer in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `profileIntegrationID`: The integration ID of the customer profile. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points. - `currentTier`: The tier that the customer is in at the time of the export. ### Example @@ -1940,6 +2304,11 @@ Download a CSV file containing a customer's ledger log in the loyalty program require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -1952,17 +2321,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$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. $loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. -$integrationId = 'integrationId_example'; // string | The identifier of the profile. -$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. try { - $result = $apiInstance->exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + $result = $apiInstance->exportLoyaltyBalances($loyaltyProgramId, $endDate); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->exportLoyaltyLedger: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportLoyaltyBalances: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -1972,11 +2338,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **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. | **loyaltyProgramId** | **string**| The identifier for the loyalty program. | - **integrationId** | **string**| The identifier of the profile. | - **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] + **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -1984,7 +2347,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -1996,13 +2359,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## exportReferrals +## exportLoyaltyCardBalances -> string exportReferrals($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) +> string exportLoyaltyCardBalances($loyaltyProgramId, $endDate) -Export referrals +Export all card transaction logs -Download a CSV file containing the referrals that match the given parameters. +Download a CSV file containing the balances of all cards in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `loyaltyProgramID`: The ID of the loyalty program. - `loyaltySubledger`: The name of the subdleger, when applicatble. - `cardIdentifier`: The alphanumeric identifier of the loyalty card. - `cardState`:The state of the loyalty card. It can be `active` or `inactive`. - `currentBalance`: The current point balance. - `pendingBalance`: The number of pending points. - `expiredBalance`: The number of expired points. - `spentBalance`: The number of spent points. ### Example @@ -2011,6 +2374,11 @@ Download a CSV file containing the referrals that match the given parameters. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2023,20 +2391,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 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 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 | - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. -$usable = 'usable_example'; // string | - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. -$batchId = 'batchId_example'; // string | Filter results by batches of referrals -$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. try { - $result = $apiInstance->exportReferrals($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + $result = $apiInstance->exportLoyaltyCardBalances($loyaltyProgramId, $endDate); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->exportReferrals: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportLoyaltyCardBalances: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2046,14 +2408,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **float**| Filter results by campaign. | [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**| - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. | [optional] - **usable** | **string**| - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. | [optional] - **batchId** | **string**| Filter results by batches of referrals | [optional] - **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **endDate** | **\DateTime**| Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. | [optional] ### Return type @@ -2061,7 +2417,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2073,13 +2429,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getAccessLogsWithoutTotalCount +## exportLoyaltyCardLedger -> \TalonOne\Client\Model\InlineResponse20013 getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) +> string exportLoyaltyCardLedger($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat) -Get access logs for Application +Export card's ledger log -Retrieve the list of API calls to this Application matching the specified criteria. +Download a CSV file containing a loyalty card ledger log of the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). ### Example @@ -2088,6 +2444,11 @@ Retrieve the list of API calls to this Application matching the specified criter require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2100,21 +2461,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$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. -$path = 'path_example'; // string | Only return results where the request path matches the given regular expression. -$method = 'method_example'; // string | Only return results where the request method matches the given regular expression. -$status = 'status_example'; // string | Filter results by HTTP status codes. -$pageSize = 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. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. +$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. try { - $result = $apiInstance->getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $result = $apiInstance->exportLoyaltyCardLedger($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getAccessLogsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportLoyaltyCardLedger: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2124,41 +2481,37 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **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. | - **path** | **string**| Only return results where the request path matches the given regular expression. | [optional] - **method** | **string**| Only return results where the request method matches the given regular expression. | [optional] - **status** | **string**| Filter results by HTTP status codes. | [optional] - **pageSize** | **int**| The number of items 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] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20013**](../Model/InlineResponse20013.md) +**string** ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **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) -## getAccount +## exportLoyaltyLedger -> \TalonOne\Client\Model\Account getAccount($accountId) +> string exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat) -Get account details +Export customer's transaction logs -Return the details of your companies Talon.One account. +Download a CSV file containing a customer's transaction logs in the loyalty program. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The generated file can contain the following columns: - `customerprofileid`: The ID of the profile. - `customersessionid`: The ID of the customer session. - `rulesetid`: The ID of the rule set. - `rulename`: The name of the rule. - `programid`: The ID of the loyalty program. - `type`: The type of the loyalty program. - `name`: The name of the loyalty program. - `subledgerid`: The ID of the subledger, when applicable. - `startdate`: The start date of the program. - `expirydate`: The expiration date of the program. - `id`: The ID of the transaction. - `created`: The timestamp of the creation of the loyalty program. - `amount`: The number of points in that transaction. - `archived`: Whether the session related to the transaction is archived. ### Example @@ -2167,6 +2520,11 @@ Return the details of your companies Talon.One account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2179,13 +2537,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$accountId = 56; // int | The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. +$loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. +$integrationId = 'integrationId_example'; // string | The identifier of the profile. +$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. try { - $result = $apiInstance->getAccount($accountId); + $result = $apiInstance->exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getAccount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportLoyaltyLedger: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2195,33 +2557,37 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **accountId** | **int**| The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. | + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **loyaltyProgramId** | **string**| The identifier for the loyalty program. | + **integrationId** | **string**| The identifier of the profile. | + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] ### Return type -[**\TalonOne\Client\Model\Account**](../Model/Account.md) +**string** ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **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) -## getAccountAnalytics +## exportReferrals -> \TalonOne\Client\Model\AccountAnalytics getAccountAnalytics($accountId) +> string exportReferrals($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) -Get account analytics +Export referrals -Return the analytics of your Talon.One account. +Download a CSV file containing the referrals that match the given parameters. **Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). The CSV file contains the following columns: - `code`: The referral code. - `advocateprofileintegrationid`: The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values. ### Example @@ -2230,6 +2596,11 @@ Return the analytics of your Talon.One account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2242,13 +2613,20 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$accountId = 56; // int | The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$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 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 | - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. +$usable = 'usable_example'; // string | - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. +$batchId = 'batchId_example'; // string | Filter results by batches of referrals +$dateFormat = 'dateFormat_example'; // string | Determines the format of dates in the export document. try { - $result = $apiInstance->getAccountAnalytics($accountId); + $result = $apiInstance->exportReferrals($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getAccountAnalytics: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->exportReferrals: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2258,33 +2636,40 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **accountId** | **int**| The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **float**| Filter results by campaign. | [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**| - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. | [optional] + **usable** | **string**| - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. | [optional] + **batchId** | **string**| Filter results by batches of referrals | [optional] + **dateFormat** | **string**| Determines the format of dates in the export document. | [optional] ### Return type -[**\TalonOne\Client\Model\AccountAnalytics**](../Model/AccountAnalytics.md) +**string** ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: application/json +- **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) -## getAccountCollection +## getAccessLogsWithoutTotalCount -> \TalonOne\Client\Model\Collection getAccountCollection($collectionId) +> \TalonOne\Client\Model\InlineResponse20018 getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) -Get account-level collection +Get access logs for Application -Retrieve a given account-level collection. +Retrieve the list of API calls sent to the specified Application. ### Example @@ -2293,6 +2678,11 @@ Retrieve a given account-level collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2305,13 +2695,21 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. +$path = 'path_example'; // string | Only return results where the request path matches the given regular expression. +$method = 'method_example'; // string | Only return results where the request method matches the given regular expression. +$status = 'status_example'; // string | Filter results by HTTP status codes. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { - $result = $apiInstance->getAccountCollection($collectionId); + $result = $apiInstance->getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getAccountCollection: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getAccessLogsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2321,15 +2719,23 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **path** | **string**| Only return results where the request path matches the given regular expression. | [optional] + **method** | **string**| Only return results where the request method matches the given regular expression. | [optional] + **status** | **string**| Filter results by HTTP status codes. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\Collection**](../Model/Collection.md) +[**\TalonOne\Client\Model\InlineResponse20018**](../Model/InlineResponse20018.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2341,13 +2747,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getAdditionalCost +## getAccount -> \TalonOne\Client\Model\AccountAdditionalCost getAdditionalCost($additionalCostId) +> \TalonOne\Client\Model\Account getAccount($accountId) -Get additional cost +Get account details -Returns the additional cost. +Return the details of your companies Talon.One account. ### Example @@ -2356,6 +2762,11 @@ Returns the additional cost. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2368,13 +2779,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$additionalCostId = 56; // int | +$accountId = 56; // int | The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. try { - $result = $apiInstance->getAdditionalCost($additionalCostId); + $result = $apiInstance->getAccount($accountId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getAdditionalCost: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getAccount: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2384,15 +2795,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **additionalCostId** | **int**| | + **accountId** | **int**| The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. | ### Return type -[**\TalonOne\Client\Model\AccountAdditionalCost**](../Model/AccountAdditionalCost.md) +[**\TalonOne\Client\Model\Account**](../Model/Account.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2404,13 +2815,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getAdditionalCosts +## getAccountAnalytics -> \TalonOne\Client\Model\InlineResponse20026 getAdditionalCosts($pageSize, $skip, $sort) +> \TalonOne\Client\Model\AccountAnalytics getAccountAnalytics($accountId) -List additional costs +Get account analytics -Returns all the defined additional costs for the account. +Return the analytics of your Talon.One account. ### Example @@ -2419,6 +2830,11 @@ Returns all the defined additional costs for the account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2431,15 +2847,219 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$accountId = 56; // int | The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. try { - $result = $apiInstance->getAdditionalCosts($pageSize, $skip, $sort); + $result = $apiInstance->getAccountAnalytics($accountId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getAdditionalCosts: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getAccountAnalytics: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **accountId** | **int**| The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. | + +### Return type + +[**\TalonOne\Client\Model\AccountAnalytics**](../Model/AccountAnalytics.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getAccountCollection + +> \TalonOne\Client\Model\Collection getAccountCollection($collectionId) + +Get account-level collection + +Retrieve a given account-level collection. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. + +try { + $result = $apiInstance->getAccountCollection($collectionId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getAccountCollection: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + +### Return type + +[**\TalonOne\Client\Model\Collection**](../Model/Collection.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getAdditionalCost + +> \TalonOne\Client\Model\AccountAdditionalCost getAdditionalCost($additionalCostId) + +Get additional cost + +Returns the additional cost. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$additionalCostId = 56; // int | The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. + +try { + $result = $apiInstance->getAdditionalCost($additionalCostId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getAdditionalCost: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **additionalCostId** | **int**| The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. | + +### Return type + +[**\TalonOne\Client\Model\AccountAdditionalCost**](../Model/AccountAdditionalCost.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getAdditionalCosts + +> \TalonOne\Client\Model\InlineResponse20032 getAdditionalCosts($pageSize, $skip, $sort) + +List additional costs + +Returns all the defined additional costs for 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'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. + +try { + $result = $apiInstance->getAdditionalCosts($pageSize, $skip, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getAdditionalCosts: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -2449,17 +3069,17 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20026**](../Model/InlineResponse20026.md) +[**\TalonOne\Client\Model\InlineResponse20032**](../Model/InlineResponse20032.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2473,7 +3093,7 @@ Name | Type | Description | Notes ## getAllAccessLogs -> \TalonOne\Client\Model\InlineResponse20014 getAllAccessLogs($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20019 getAllAccessLogs($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) List access logs @@ -2486,6 +3106,11 @@ Fetches the access logs for the entire account. Sensitive requests (logins) are require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2498,14 +3123,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$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. +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. $path = 'path_example'; // string | Only return results where the request path matches the given regular expression. $method = 'method_example'; // string | Only return results where the request method matches the given regular expression. $status = 'status_example'; // string | Filter results by HTTP status codes. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { $result = $apiInstance->getAllAccessLogs($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); @@ -2521,22 +3146,22 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **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. | + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | **path** | **string**| Only return results where the request path matches the given regular expression. | [optional] **method** | **string**| Only return results where the request method matches the given regular expression. | [optional] **status** | **string**| Filter results by HTTP status codes. | [optional] - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20014**](../Model/InlineResponse20014.md) +[**\TalonOne\Client\Model\InlineResponse20019**](../Model/InlineResponse20019.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2550,7 +3175,7 @@ Name | Type | Description | Notes ## getAllRoles -> \TalonOne\Client\Model\InlineResponse20034 getAllRoles() +> \TalonOne\Client\Model\InlineResponse20040 getAllRoles() List roles @@ -2563,6 +3188,11 @@ List all roles. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2591,11 +3221,11 @@ This endpoint does not need any parameter. ### Return type -[**\TalonOne\Client\Model\InlineResponse20034**](../Model/InlineResponse20034.md) +[**\TalonOne\Client\Model\InlineResponse20040**](../Model/InlineResponse20040.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2611,7 +3241,7 @@ This endpoint does not need any parameter. > \TalonOne\Client\Model\Application getApplication($applicationId) -Get application +Get Application Get the application specified by the ID. @@ -2622,6 +3252,11 @@ Get the application specified by the ID. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2658,7 +3293,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2674,9 +3309,9 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\ApplicationApiHealth getApplicationApiHealth($applicationId) -Get report of health of application API +Get Application health -Display the health of the application and show the last time the Application was used. +Display the health of the Application and show the last time the Application was used. You can also display this information from the **Settings** of an Application, in the **Developer Settings** menu. See the [docs](https://docs.talon.one/docs/dev/tutorials/monitoring-integration-status). ### Example @@ -2685,6 +3320,11 @@ Display the health of the application and show the last time the Application was require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2721,7 +3361,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2748,6 +3388,11 @@ Retrieve the customers of the specified application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2761,7 +3406,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. +$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. try { $result = $apiInstance->getApplicationCustomer($applicationId, $customerId); @@ -2778,7 +3423,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. | + **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | ### Return type @@ -2786,7 +3431,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2800,7 +3445,7 @@ Name | Type | Description | Notes ## getApplicationCustomerFriends -> \TalonOne\Client\Model\InlineResponse20024 getApplicationCustomerFriends($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20030 getApplicationCustomerFriends($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) List friends referred by customer profile @@ -2813,6 +3458,11 @@ List the friends referred by the specified customer profile in this Application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2827,9 +3477,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $integrationId = 'integrationId_example'; // string | The Integration ID of the Advocate's Profile. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. try { @@ -2848,18 +3498,18 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **integrationId** | **string**| The Integration ID of the Advocate's Profile. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20024**](../Model/InlineResponse20024.md) +[**\TalonOne\Client\Model\InlineResponse20030**](../Model/InlineResponse20030.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2873,7 +3523,7 @@ Name | Type | Description | Notes ## getApplicationCustomers -> \TalonOne\Client\Model\InlineResponse20016 getApplicationCustomers($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20021 getApplicationCustomers($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) List application's customers @@ -2886,6 +3536,11 @@ List all the customers of the specified application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2900,7 +3555,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $integrationId = 'integrationId_example'; // string | Filter results performing an exact matching against the profile integration identifier. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. @@ -2920,17 +3575,17 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **integrationId** | **string**| Filter results performing an exact matching against the profile integration identifier. | [optional] - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20016**](../Model/InlineResponse20016.md) +[**\TalonOne\Client\Model\InlineResponse20021**](../Model/InlineResponse20021.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -2944,7 +3599,7 @@ Name | Type | Description | Notes ## getApplicationCustomersByAttributes -> \TalonOne\Client\Model\InlineResponse20017 getApplicationCustomersByAttributes($applicationId, $body, $pageSize, $skip, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20022 getApplicationCustomersByAttributes($applicationId, $body, $pageSize, $skip, $withTotalResultSize) List application customers matching the given attributes @@ -2957,6 +3612,11 @@ Get a list of the application customers matching the provided criteria. The mat require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -2970,8 +3630,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\CustomerProfileSearchQuery(); // \TalonOne\Client\Model\CustomerProfileSearchQuery | -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$body = new \TalonOne\Client\Model\CustomerProfileSearchQuery(); // \TalonOne\Client\Model\CustomerProfileSearchQuery | body +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. @@ -2990,18 +3650,18 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\CustomerProfileSearchQuery**](../Model/CustomerProfileSearchQuery.md)| | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **body** | [**\TalonOne\Client\Model\CustomerProfileSearchQuery**](../Model/CustomerProfileSearchQuery.md)| body | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20017**](../Model/InlineResponse20017.md) +[**\TalonOne\Client\Model\InlineResponse20022**](../Model/InlineResponse20022.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3015,11 +3675,11 @@ Name | Type | Description | Notes ## getApplicationEventTypes -> \TalonOne\Client\Model\InlineResponse20022 getApplicationEventTypes($applicationId, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20028 getApplicationEventTypes($applicationId, $pageSize, $skip, $sort) List Applications event types -Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](/integration-api/#operation/trackEvent) +Get all of the distinct values of the Event `type` property for events recorded in the application. See also: [Track an event](https://docs.talon.one/integration-api#operation/trackEvent) ### Example @@ -3028,6 +3688,11 @@ Get all of the distinct values of the Event `type` property for events recorded require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3041,9 +3706,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { $result = $apiInstance->getApplicationEventTypes($applicationId, $pageSize, $skip, $sort); @@ -3060,17 +3725,17 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20022**](../Model/InlineResponse20022.md) +[**\TalonOne\Client\Model\InlineResponse20028**](../Model/InlineResponse20028.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3084,7 +3749,7 @@ Name | Type | Description | Notes ## getApplicationEventsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse20021 getApplicationEventsWithoutTotalCount($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) +> \TalonOne\Client\Model\InlineResponse20027 getApplicationEventsWithoutTotalCount($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) List Applications events @@ -3097,6 +3762,11 @@ Lists all events recorded for an application. Instead of having the total number require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3110,9 +3780,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $type = 'type_example'; // string | Comma-separated list of types by which to filter events. Must be exact match(es). $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. $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. @@ -3140,9 +3810,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **type** | **string**| Comma-separated list of types by which to filter events. Must be exact match(es). | [optional] **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **createdAfter** | **\DateTime**| Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] @@ -3157,11 +3827,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20021**](../Model/InlineResponse20021.md) +[**\TalonOne\Client\Model\InlineResponse20027**](../Model/InlineResponse20027.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3179,7 +3849,7 @@ Name | Type | Description | Notes Get Application session -Get the details of the given session. You can list the sessions with the [List Application sessions](/#tag/Customer-data/operation/getApplicationSession) endpoint. +Get the details of the given session. You can list the sessions with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. ### Example @@ -3188,6 +3858,11 @@ Get the details of the given session. You can list the sessions with the [List A require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3201,7 +3876,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$sessionId = 56; // int | The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). +$sessionId = 56; // int | The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. try { $result = $apiInstance->getApplicationSession($applicationId, $sessionId); @@ -3218,7 +3893,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **sessionId** | **int**| The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). | + **sessionId** | **int**| The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. | ### Return type @@ -3226,7 +3901,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3240,7 +3915,7 @@ Name | Type | Description | Notes ## getApplicationSessions -> \TalonOne\Client\Model\InlineResponse20020 getApplicationSessions($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) +> \TalonOne\Client\Model\InlineResponse20026 getApplicationSessions($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) List Application sessions @@ -3253,6 +3928,11 @@ List all the sessions of the specified Application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3266,9 +3946,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $profile = 'profile_example'; // string | Profile integration ID filter for sessions. Must be exact match. $state = 'state_example'; // string | Filter by sessions with this state. Must be exact match. $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. @@ -3292,9 +3972,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **profile** | **string**| Profile integration ID filter for sessions. Must be exact match. | [optional] **state** | **string**| Filter by sessions with this state. Must be exact match. | [optional] **createdBefore** | **\DateTime**| Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | [optional] @@ -3305,11 +3985,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20020**](../Model/InlineResponse20020.md) +[**\TalonOne\Client\Model\InlineResponse20026**](../Model/InlineResponse20026.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3323,9 +4003,9 @@ Name | Type | Description | Notes ## getApplications -> \TalonOne\Client\Model\InlineResponse2002 getApplications($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse2003 getApplications($pageSize, $skip, $sort) -List applications +List Applications List all applications in the current account. @@ -3336,6 +4016,11 @@ List all applications in the current account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3348,9 +4033,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { $result = $apiInstance->getApplications($pageSize, $skip, $sort); @@ -3366,17 +4051,17 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2002**](../Model/InlineResponse2002.md) +[**\TalonOne\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3394,7 +4079,7 @@ Name | Type | Description | Notes Get custom attribute -Returns custom attribute for the account by its id. +Retrieve the specified custom attribute. ### Example @@ -3403,6 +4088,11 @@ Returns custom attribute for the account by its id. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3415,7 +4105,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$attributeId = 56; // int | +$attributeId = 56; // int | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. try { $result = $apiInstance->getAttribute($attributeId); @@ -3431,7 +4121,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **attributeId** | **int**| | + **attributeId** | **int**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. | ### Return type @@ -3439,7 +4129,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3453,11 +4143,11 @@ Name | Type | Description | Notes ## getAttributes -> \TalonOne\Client\Model\InlineResponse20025 getAttributes($pageSize, $skip, $sort, $entity) +> \TalonOne\Client\Model\InlineResponse20031 getAttributes($pageSize, $skip, $sort, $entity) List custom attributes -Returns all the defined custom attributes for the account. +Return all the custom attributes for the account. ### Example @@ -3466,6 +4156,11 @@ Returns all the defined custom attributes for the account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3478,9 +4173,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $entity = 'entity_example'; // string | Returned attributes will be filtered by supplied entity. try { @@ -3497,18 +4192,18 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **entity** | **string**| Returned attributes will be filtered by supplied entity. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20025**](../Model/InlineResponse20025.md) +[**\TalonOne\Client\Model\InlineResponse20031**](../Model/InlineResponse20031.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3522,7 +4217,7 @@ Name | Type | Description | Notes ## getAudiences -> \TalonOne\Client\Model\InlineResponse20023 getAudiences($pageSize, $skip, $sort, $withTotalResultSize) +> \TalonOne\Client\Model\InlineResponse20029 getAudiences($pageSize, $skip, $sort, $withTotalResultSize) List audiences @@ -3535,6 +4230,11 @@ Get all audiences created in the account. To create an audience, use [Create aud require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3547,9 +4247,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. try { @@ -3566,18 +4266,18 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20023**](../Model/InlineResponse20023.md) +[**\TalonOne\Client\Model\InlineResponse20029**](../Model/InlineResponse20029.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3604,6 +4304,11 @@ Retrieve the given campaign. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3642,7 +4347,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3656,7 +4361,7 @@ Name | Type | Description | Notes ## getCampaignAnalytics -> \TalonOne\Client\Model\InlineResponse20015 getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) +> \TalonOne\Client\Model\InlineResponse20020 getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) Get analytics of campaigns @@ -3669,6 +4374,11 @@ Retrieve statistical data about the performance of the given campaign. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3683,8 +4393,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$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. +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. $granularity = 'granularity_example'; // string | The time interval between the results in the returned time-series. try { @@ -3703,17 +4413,17 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **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. | + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | **granularity** | **string**| The time interval between the results in the returned time-series. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20015**](../Model/InlineResponse20015.md) +[**\TalonOne\Client\Model\InlineResponse20020**](../Model/InlineResponse20020.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3727,7 +4437,7 @@ Name | Type | Description | Notes ## getCampaignByAttributes -> \TalonOne\Client\Model\InlineResponse2003 getCampaignByAttributes($applicationId, $body, $pageSize, $skip, $sort, $campaignState) +> \TalonOne\Client\Model\InlineResponse2004 getCampaignByAttributes($applicationId, $body, $pageSize, $skip, $sort, $campaignState) List campaigns that match the given attributes @@ -3740,6 +4450,11 @@ Get a list of all the campaigns that match a set of attributes. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3753,10 +4468,10 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\CampaignSearch(); // \TalonOne\Client\Model\CampaignSearch | -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$body = new \TalonOne\Client\Model\CampaignSearch(); // \TalonOne\Client\Model\CampaignSearch | body +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$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. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $campaignState = 'campaignState_example'; // string | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. try { @@ -3774,19 +4489,19 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\CampaignSearch**](../Model/CampaignSearch.md)| | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **body** | [**\TalonOne\Client\Model\CampaignSearch**](../Model/CampaignSearch.md)| body | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **campaignState** | **string**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) +[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3798,9 +4513,89 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) +## getCampaignTemplates + +> \TalonOne\Client\Model\InlineResponse20010 getCampaignTemplates($pageSize, $skip, $sort, $state, $name, $tags, $userId) + +List campaign templates + +Retrieve a list of campaign templates. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$state = 'state_example'; // string | Filter results by the state of the campaign template. +$name = 'name_example'; // string | Filter results performing case-insensitive matching against the name of the campaign template. +$tags = 'tags_example'; // string | Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. +$userId = 56; // int | Filter results by user ID. + +try { + $result = $apiInstance->getCampaignTemplates($pageSize, $skip, $sort, $state, $name, $tags, $userId); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getCampaignTemplates: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **state** | **string**| Filter results by the state of the campaign template. | [optional] + **name** | **string**| Filter results performing case-insensitive matching against the name of the campaign template. | [optional] + **tags** | **string**| Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. | [optional] + **userId** | **int**| Filter results by user ID. | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse20010**](../Model/InlineResponse20010.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + ## getCampaigns -> \TalonOne\Client\Model\InlineResponse2003 getCampaigns($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId) +> \TalonOne\Client\Model\InlineResponse2004 getCampaigns($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId) List campaigns @@ -3813,6 +4608,11 @@ List the campaigns of the specified application that match your filter criteria. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3826,9 +4626,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $campaignState = 'campaignState_example'; // string | Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. $name = 'name_example'; // string | Filter results performing case-insensitive matching against the name of the campaign. $tags = 'tags_example'; // string | Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values @@ -3852,9 +4652,9 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **campaignState** | **string**| Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. | [optional] **name** | **string**| Filter results performing case-insensitive matching against the name of the campaign. | [optional] **tags** | **string**| Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values | [optional] @@ -3865,11 +4665,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2003**](../Model/InlineResponse2003.md) +[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3883,11 +4683,11 @@ Name | Type | Description | Notes ## getChanges -> \TalonOne\Client\Model\InlineResponse20032 getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld) +> \TalonOne\Client\Model\InlineResponse20038 getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld) Get audit logs for an account -Export the audit logs displayed in **Accounts > Audit logs**. +Retrieve the audit logs displayed in **Accounts > Audit logs**. ### Example @@ -3896,6 +4696,11 @@ Export the audit logs displayed in **Accounts > Audit logs**. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3908,19 +4713,20 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $applicationId = 3.4; // float | Filter results by Application ID. $entityPath = 'entityPath_example'; // string | Filter results on a case insensitive matching of the url path of the entity -$userId = 56; // int | Filter results that match the given user ID. +$userId = 56; // int | Filter results by user ID. $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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$managementKeyId = 56; // int | Filter results that match the given management key ID. $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, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + $result = $apiInstance->getChanges($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); print_r($result); } catch (Exception $e) { echo 'Exception when calling ManagementApi->getChanges: ', $e->getMessage(), PHP_EOL; @@ -3933,24 +4739,25 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **applicationId** | **float**| Filter results by Application ID. | [optional] **entityPath** | **string**| Filter results on a case insensitive matching of the url path of the entity | [optional] - **userId** | **int**| Filter results that match the given user ID. | [optional] + **userId** | **int**| Filter results by user ID. | [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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **managementKeyId** | **int**| Filter results that match the given management key ID. | [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\InlineResponse20032**](../Model/InlineResponse20032.md) +[**\TalonOne\Client\Model\InlineResponse20038**](../Model/InlineResponse20038.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -3977,6 +4784,11 @@ Retrieve a given collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -3991,7 +4803,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. try { $result = $apiInstance->getCollection($applicationId, $campaignId, $collectionId); @@ -4009,7 +4821,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | ### Return type @@ -4017,7 +4829,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4031,7 +4843,7 @@ Name | Type | Description | Notes ## getCollectionItems -> \TalonOne\Client\Model\InlineResponse20011 getCollectionItems($collectionId, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20016 getCollectionItems($collectionId, $pageSize, $skip) Get collection items @@ -4044,6 +4856,11 @@ Retrieve the items from the given collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4056,8 +4873,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. try { @@ -4074,17 +4891,17 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20011**](../Model/InlineResponse20011.md) +[**\TalonOne\Client\Model\InlineResponse20016**](../Model/InlineResponse20016.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4098,7 +4915,7 @@ Name | Type | Description | Notes ## getCouponsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2007 getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) +> \TalonOne\Client\Model\InlineResponse2008 getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) List coupons @@ -4111,6 +4928,345 @@ List all the coupons matching the specified criteria. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$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 expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. +$usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. +$referralId = 56; // int | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. +$recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field +$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 + +try { + $result = $apiInstance->getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getCouponsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **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 expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] + **usable** | **string**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | [optional] + **referralId** | **int**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] + **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] + **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] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getCustomerActivityReport + +> \TalonOne\Client\Model\CustomerActivityReport getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) + +Get customer's activity report + +Fetch the summary report of a given customer in the given application, in a time range. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. + +try { + $result = $apiInstance->getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getCustomerActivityReport: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + +### Return type + +[**\TalonOne\Client\Model\CustomerActivityReport**](../Model/CustomerActivityReport.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getCustomerActivityReportsWithoutTotalCount + +> \TalonOne\Client\Model\InlineResponse20025 getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) + +Get Activity Reports for Application Customers + +Fetch summary reports for all application customers based on a time range. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$rangeStart = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from after this timestamp. This must be an RFC3339 timestamp string. +$rangeEnd = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Only return results from before this timestamp. This must be an RFC3339 timestamp string. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$name = 'name_example'; // string | Only return reports matching the customer name +$integrationId = 'integrationId_example'; // string | Filter results performing an exact matching against the profile integration identifier. +$campaignName = 'campaignName_example'; // string | Only return reports matching the campaignName +$advocateName = 'advocateName_example'; // string | Only return reports matching the current customer referrer name + +try { + $result = $apiInstance->getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getCustomerActivityReportsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **rangeStart** | **\DateTime**| Only return results from after this timestamp. This must be an RFC3339 timestamp string. | + **rangeEnd** | **\DateTime**| Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **name** | **string**| Only return reports matching the customer name | [optional] + **integrationId** | **string**| Filter results performing an exact matching against the profile integration identifier. | [optional] + **campaignName** | **string**| Only return reports matching the campaignName | [optional] + **advocateName** | **string**| Only return reports matching the current customer referrer name | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse20025**](../Model/InlineResponse20025.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getCustomerAnalytics + +> \TalonOne\Client\Model\CustomerAnalytics getCustomerAnalytics($applicationId, $customerId, $pageSize, $skip, $sort) + +Get customer's analytics report + +Fetch analytics for a given customer in the given application. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. + +try { + $result = $apiInstance->getCustomerAnalytics($applicationId, $customerId, $pageSize, $skip, $sort); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->getCustomerAnalytics: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + +### Return type + +[**\TalonOne\Client\Model\CustomerAnalytics**](../Model/CustomerAnalytics.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## getCustomerProfile + +> \TalonOne\Client\Model\CustomerProfile getCustomerProfile($customerId) + +Get customer profile + +Return the details of the specified customer profile.

Performance tips

You can retrieve the same information via the Integration API, which can save you extra API requests. consider these options: - Request the customer profile to be part of the response content using [Update Customer Session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2). - Send an empty update with the [Update Customer Profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with `runRuleEngine=false`.
+ +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4123,26 +5279,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$pageSize = 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. -$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 +$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. try { - $result = $apiInstance->getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $result = $apiInstance->getCustomerProfile($customerId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCouponsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getCustomerProfile: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4152,28 +5295,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **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] - **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] + **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. | ### Return type -[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\TalonOne\Client\Model\CustomerProfile**](../Model/CustomerProfile.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4185,13 +5315,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getCustomerActivityReport +## getCustomerProfiles -> \TalonOne\Client\Model\CustomerActivityReport getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20024 getCustomerProfiles($pageSize, $skip, $sandbox) -Get customer's activity report +List customer profiles -Fetch the summary report of a given customer in the given application, in a time range. +List all customer profiles. ### Example @@ -4200,6 +5330,11 @@ Fetch the summary report of a given customer in the given application, in a time require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4212,18 +5347,15 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$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. -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. +$sandbox = false; // bool | Indicates whether you are pointing to a sandbox or Live customer. try { - $result = $apiInstance->getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $result = $apiInstance->getCustomerProfiles($pageSize, $skip, $sandbox); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCustomerActivityReport: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getCustomerProfiles: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4233,20 +5365,17 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **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. | - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sandbox** | **bool**| Indicates whether you are pointing to a sandbox or Live customer. | [optional] [default to false] ### Return type -[**\TalonOne\Client\Model\CustomerActivityReport**](../Model/CustomerActivityReport.md) +[**\TalonOne\Client\Model\InlineResponse20024**](../Model/InlineResponse20024.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4258,13 +5387,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getCustomerActivityReportsWithoutTotalCount +## getCustomersByAttributes -> \TalonOne\Client\Model\InlineResponse20019 getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) +> \TalonOne\Client\Model\InlineResponse20023 getCustomersByAttributes($body, $pageSize, $skip, $sandbox) -Get Activity Reports for Application Customers +List customer profiles matching the given attributes -Fetch summary reports for all application customers based on a time range. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. +Get a list of the customer profiles matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. ### Example @@ -4273,6 +5402,11 @@ Fetch summary reports for all application customers based on a time range. Inste require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4285,22 +5419,16 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$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. -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$body = new \TalonOne\Client\Model\CustomerProfileSearchQuery(); // \TalonOne\Client\Model\CustomerProfileSearchQuery | body +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$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. -$name = 'name_example'; // string | Only return reports matching the customer name -$integrationId = 'integrationId_example'; // string | Filter results performing an exact matching against the profile integration identifier. -$campaignName = 'campaignName_example'; // string | Only return reports matching the campaignName -$advocateName = 'advocateName_example'; // string | Only return reports matching the current customer referrer name +$sandbox = false; // bool | Indicates whether you are pointing to a sandbox or Live customer. try { - $result = $apiInstance->getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $result = $apiInstance->getCustomersByAttributes($body, $pageSize, $skip, $sandbox); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCustomerActivityReportsWithoutTotalCount: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getCustomersByAttributes: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4310,28 +5438,22 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **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. | - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **body** | [**\TalonOne\Client\Model\CustomerProfileSearchQuery**](../Model/CustomerProfileSearchQuery.md)| body | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] - **name** | **string**| Only return reports matching the customer name | [optional] - **integrationId** | **string**| Filter results performing an exact matching against the profile integration identifier. | [optional] - **campaignName** | **string**| Only return reports matching the campaignName | [optional] - **advocateName** | **string**| Only return reports matching the current customer referrer name | [optional] + **sandbox** | **bool**| Indicates whether you are pointing to a sandbox or Live customer. | [optional] [default to false] ### Return type -[**\TalonOne\Client\Model\InlineResponse20019**](../Model/InlineResponse20019.md) +[**\TalonOne\Client\Model\InlineResponse20023**](../Model/InlineResponse20023.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -4339,13 +5461,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getCustomerAnalytics +## getEventTypes -> \TalonOne\Client\Model\CustomerAnalytics getCustomerAnalytics($applicationId, $customerId, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20036 getEventTypes($name, $includeOldVersions, $pageSize, $skip, $sort) -Get customer's analytics report +List event types -Fetch analytics for a given customer in the given application. +Fetch all event type definitions for your account. ### Example @@ -4354,6 +5476,11 @@ Fetch analytics for a given customer in the given application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4366,17 +5493,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$name = 'name_example'; // string | Filter results to event types with the given name. This parameter implies `includeOldVersions`. +$includeOldVersions = false; // bool | Include all versions of every event type. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$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. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { - $result = $apiInstance->getCustomerAnalytics($applicationId, $customerId, $pageSize, $skip, $sort); + $result = $apiInstance->getEventTypes($name, $includeOldVersions, $pageSize, $skip, $sort); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCustomerAnalytics: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getEventTypes: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4386,19 +5513,19 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **name** | **string**| Filter results to event types with the given name. This parameter implies `includeOldVersions`. | [optional] + **includeOldVersions** | **bool**| Include all versions of every event type. | [optional] [default to false] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\CustomerAnalytics**](../Model/CustomerAnalytics.md) +[**\TalonOne\Client\Model\InlineResponse20036**](../Model/InlineResponse20036.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4410,13 +5537,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getCustomerProfile +## getExports -> \TalonOne\Client\Model\CustomerProfile getCustomerProfile($customerId) +> \TalonOne\Client\Model\InlineResponse20039 getExports($pageSize, $skip, $applicationId, $campaignId, $entity) -Get customer profile +Get exports -Return the details of the specified customer profile.

Performance tips

You can retrieve the same information via the Integration API, which can save you extra API requests. consider these options: - Request the customer profile to be part of the response content using [Update Customer Session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2). - Send an empty update with the [Update Customer Profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint with `runRuleEngine=false`.
+List all past exports ### Example @@ -4425,6 +5552,11 @@ Return the details of the specified customer profile.
setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4437,13 +5569,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$customerId = 56; // int | The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$applicationId = 3.4; // float | Filter results by Application ID. +$campaignId = 56; // int | Filter by the campaign ID on which the limit counters are used. +$entity = 'entity_example'; // string | The name of the entity type that was exported. try { - $result = $apiInstance->getCustomerProfile($customerId); + $result = $apiInstance->getExports($pageSize, $skip, $applicationId, $campaignId, $entity); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCustomerProfile: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getExports: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4453,15 +5589,19 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **customerId** | **int**| The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **applicationId** | **float**| Filter results by Application ID. | [optional] + **campaignId** | **int**| Filter by the campaign ID on which the limit counters are used. | [optional] + **entity** | **string**| The name of the entity type that was exported. | [optional] ### Return type -[**\TalonOne\Client\Model\CustomerProfile**](../Model/CustomerProfile.md) +[**\TalonOne\Client\Model\InlineResponse20039**](../Model/InlineResponse20039.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4473,13 +5613,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getCustomerProfiles +## getLoyaltyCard -> \TalonOne\Client\Model\InlineResponse20018 getCustomerProfiles($pageSize, $skip) +> \TalonOne\Client\Model\LoyaltyCard getLoyaltyCard($loyaltyProgramId, $loyaltyCardId) -List customer profiles +Get loyalty card -List all customer profiles. +Get the given loyalty card. ### Example @@ -4488,6 +5628,11 @@ List all customer profiles. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4500,14 +5645,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. try { - $result = $apiInstance->getCustomerProfiles($pageSize, $skip); + $result = $apiInstance->getLoyaltyCard($loyaltyProgramId, $loyaltyCardId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCustomerProfiles: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getLoyaltyCard: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4517,16 +5662,16 @@ try { 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] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | ### Return type -[**\TalonOne\Client\Model\InlineResponse20018**](../Model/InlineResponse20018.md) +[**\TalonOne\Client\Model\LoyaltyCard**](../Model/LoyaltyCard.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4538,13 +5683,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getCustomersByAttributes +## getLoyaltyCardTransactionLogs -> \TalonOne\Client\Model\InlineResponse20018 getCustomersByAttributes($body, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20014 getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId) -List customer profiles matching the given attributes +List card's transactions -Get a list of the customer profiles matching the provided criteria. The match is successful if all the attributes of the request are found in a profile, even if the profile has more attributes that are not present on the request. +Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/loyalty-cards/loyalty-card-overview) within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. ### Example @@ -4553,6 +5698,11 @@ Get a list of the customer profiles matching the provided criteria. The match i require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4565,15 +5715,19 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\CustomerProfileSearchQuery(); // \TalonOne\Client\Model\CustomerProfileSearchQuery | -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. +$subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. try { - $result = $apiInstance->getCustomersByAttributes($body, $pageSize, $skip); + $result = $apiInstance->getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getCustomersByAttributes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getLoyaltyCardTransactionLogs: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4583,21 +5737,25 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\CustomerProfileSearchQuery**](../Model/CustomerProfileSearchQuery.md)| | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20018**](../Model/InlineResponse20018.md) +[**\TalonOne\Client\Model\InlineResponse20014**](../Model/InlineResponse20014.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -4605,13 +5763,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getEventTypes +## getLoyaltyCards -> \TalonOne\Client\Model\InlineResponse20030 getEventTypes($name, $includeOldVersions, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20013 getLoyaltyCards($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId) -List event types +List loyalty cards -Fetch all event type definitions for your account. +For the given card-based loyalty program, list the loyalty cards that match your filter criteria. ### Example @@ -4620,6 +5778,11 @@ Fetch all event type definitions for your account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4632,17 +5795,18 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$name = 'name_example'; // string | Filter results to event types with the given name. This parameter implies `includeOldVersions`. -$includeOldVersions = false; // bool | Include all versions of every event type. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$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. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$identifier = 'identifier_example'; // string | Optional query parameter to search cards by identifier. +$profileId = 56; // int | Filter by the profile ID. try { - $result = $apiInstance->getEventTypes($name, $includeOldVersions, $pageSize, $skip, $sort); + $result = $apiInstance->getLoyaltyCards($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getEventTypes: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getLoyaltyCards: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4652,19 +5816,20 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **name** | **string**| Filter results to event types with the given name. This parameter implies `includeOldVersions`. | [optional] - **includeOldVersions** | **bool**| Include all versions of every event type. | [optional] [default to false] - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **identifier** | **string**| Optional query parameter to search cards by identifier. | [optional] + **profileId** | **int**| Filter by the profile ID. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20030**](../Model/InlineResponse20030.md) +[**\TalonOne\Client\Model\InlineResponse20013**](../Model/InlineResponse20013.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4676,13 +5841,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getExports +## getLoyaltyPoints -> \TalonOne\Client\Model\InlineResponse20033 getExports($pageSize, $skip, $applicationId, $campaignId, $entity) +> \TalonOne\Client\Model\LoyaltyLedger getLoyaltyPoints($loyaltyProgramId, $integrationId) -Get exports +Get customer's full loyalty ledger -List all past exports +Get the loyalty ledger for this profile integration ID. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. **Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). ### Example @@ -4691,6 +5856,11 @@ List all past exports require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4703,17 +5873,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. -$applicationId = 3.4; // float | Filter results by Application ID. -$campaignId = 56; // int | Filter by the campaign ID on which the limit counters are used. -$entity = 'entity_example'; // string | The name of the entity type that was exported. +$loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. +$integrationId = 'integrationId_example'; // string | The identifier of the profile. try { - $result = $apiInstance->getExports($pageSize, $skip, $applicationId, $campaignId, $entity); + $result = $apiInstance->getLoyaltyPoints($loyaltyProgramId, $integrationId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getExports: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getLoyaltyPoints: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4723,19 +5890,16 @@ try { 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] - **applicationId** | **float**| Filter results by Application ID. | [optional] - **campaignId** | **int**| Filter by the campaign ID on which the limit counters are used. | [optional] - **entity** | **string**| The name of the entity type that was exported. | [optional] + **loyaltyProgramId** | **string**| The identifier for the loyalty program. | + **integrationId** | **string**| The identifier of the profile. | ### Return type -[**\TalonOne\Client\Model\InlineResponse20033**](../Model/InlineResponse20033.md) +[**\TalonOne\Client\Model\LoyaltyLedger**](../Model/LoyaltyLedger.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4747,13 +5911,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getLoyaltyPoints +## getLoyaltyProgram -> \TalonOne\Client\Model\LoyaltyLedger getLoyaltyPoints($loyaltyProgramId, $integrationId) +> \TalonOne\Client\Model\LoyaltyProgram getLoyaltyProgram($loyaltyProgramId) -Get the Loyalty Ledger for this integrationID +Get loyalty program -Get the loyalty ledger for this profile integration ID. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](/integration-api/#operation/updateCustomerSessionV2). +Get the specified [loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview). To list all loyalty programs in your Application, use [List loyalty programs](#operation/getLoyaltyPrograms). To list the loyalty programs that a customer profile is part of, use the [List customer data](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory) ### Example @@ -4762,6 +5926,11 @@ Get the loyalty ledger for this profile integration ID. To get the `integration require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4774,14 +5943,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. -$integrationId = 'integrationId_example'; // string | The identifier of the profile. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. try { - $result = $apiInstance->getLoyaltyPoints($loyaltyProgramId, $integrationId); + $result = $apiInstance->getLoyaltyProgram($loyaltyProgramId); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getLoyaltyPoints: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getLoyaltyProgram: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4791,16 +5959,15 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **string**| The identifier for the loyalty program. | - **integrationId** | **string**| The identifier of the profile. | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Return type -[**\TalonOne\Client\Model\LoyaltyLedger**](../Model/LoyaltyLedger.md) +[**\TalonOne\Client\Model\LoyaltyProgram**](../Model/LoyaltyProgram.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4812,13 +5979,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## getLoyaltyProgram +## getLoyaltyProgramTransactions -> \TalonOne\Client\Model\LoyaltyProgram getLoyaltyProgram($loyaltyProgramId) +> \TalonOne\Client\Model\InlineResponse20012 getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip) -Get loyalty program +List loyalty program transactions -Get the specified [loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview). To list all loyalty programs in your Application, use [List loyalty programs](#operation/getLoyaltyPrograms). To list the loyalty programs that a customer profile is part of, use the [List customer data](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/getCustomerInventory) +Retrieve all loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. If no filters are applied, the last 50 loyalty transactions for the given loyalty program are returned. **Important:** To get loyalty transaction logs for a given Integration ID in a loyalty program, we recommend using the Integration API's [Get customer's loyalty logs](https://docs.talon.one/integration-api#tag/Loyalty/operation/getLoyaltyProgramProfileTransactions). ### Example @@ -4827,6 +5994,11 @@ Get the specified [loyalty program](https://docs.talon.one/docs/product/loyalty- require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4839,13 +6011,19 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyTransactionType = 'loyaltyTransactionType_example'; // string | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. +$subledgerId = 'subledgerId_example'; // string | The ID of the subledger by which we filter the data. +$startDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$endDate = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. +$pageSize = 50; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. try { - $result = $apiInstance->getLoyaltyProgram($loyaltyProgramId); + $result = $apiInstance->getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->getLoyaltyProgram: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->getLoyaltyProgramTransactions: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -4855,15 +6033,21 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyTransactionType** | **string**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. | [optional] + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **startDate** | **\DateTime**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **endDate** | **\DateTime**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 50] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] ### Return type -[**\TalonOne\Client\Model\LoyaltyProgram**](../Model/LoyaltyProgram.md) +[**\TalonOne\Client\Model\InlineResponse20012**](../Model/InlineResponse20012.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4877,7 +6061,7 @@ Name | Type | Description | Notes ## getLoyaltyPrograms -> \TalonOne\Client\Model\InlineResponse2009 getLoyaltyPrograms() +> \TalonOne\Client\Model\InlineResponse20011 getLoyaltyPrograms() List loyalty programs @@ -4890,6 +6074,11 @@ List the loyalty programs of the account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4918,11 +6107,11 @@ This endpoint does not need any parameter. ### Return type -[**\TalonOne\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) +[**\TalonOne\Client\Model\InlineResponse20011**](../Model/InlineResponse20011.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -4938,9 +6127,9 @@ This endpoint does not need any parameter. > \TalonOne\Client\Model\LoyaltyStatistics getLoyaltyStatistics($loyaltyProgramId) -Get loyalty program statistics by loyalty program ID +Get loyalty program statistics -Retrieve the statistics of the specified loyalty program such as the total active points, pending points, spent points and expired points. +Retrieve the statistics of the specified loyalty program such as the total active points, pending points, spent points, and expired points. **Important:** The returned data does not include the current day. All statistics are updated daily at 11:59 PM in the loyalty program time zone. ### Example @@ -4949,6 +6138,11 @@ Retrieve the statistics of the specified loyalty program such as the total activ require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -4961,7 +6155,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. try { $result = $apiInstance->getLoyaltyStatistics($loyaltyProgramId); @@ -4977,7 +6171,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Return type @@ -4985,7 +6179,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5001,9 +6195,9 @@ Name | Type | Description | Notes > \TalonOne\Client\Model\NotificationWebhook getNotificationWebhook($applicationId, $notificationWebhookId) -Get notification webhook +Get notification about campaign-related changes -Return the given outbound notification webhook. +Return the given [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). ### Example @@ -5012,6 +6206,11 @@ Return the given outbound notification webhook. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5025,7 +6224,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$notificationWebhookId = 56; // int | +$notificationWebhookId = 56; // int | The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. try { $result = $apiInstance->getNotificationWebhook($applicationId, $notificationWebhookId); @@ -5042,7 +6241,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **notificationWebhookId** | **int**| | + **notificationWebhookId** | **int**| The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. | ### Return type @@ -5050,7 +6249,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5064,11 +6263,11 @@ Name | Type | Description | Notes ## getNotificationWebhooks -> \TalonOne\Client\Model\InlineResponse2004 getNotificationWebhooks($applicationId) +> \TalonOne\Client\Model\InlineResponse2005 getNotificationWebhooks($applicationId) -List notification webhooks +List notifications about campaign-related changes -List all outbound notification webhooks for this application. +List all [notifications about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications) for the given Application. ### Example @@ -5077,6 +6276,11 @@ List all outbound notification webhooks for this application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5109,11 +6313,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2004**](../Model/InlineResponse2004.md) +[**\TalonOne\Client\Model\InlineResponse2005**](../Model/InlineResponse2005.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5127,7 +6331,7 @@ Name | Type | Description | Notes ## getReferralsWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2008 getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate) +> \TalonOne\Client\Model\InlineResponse2009 getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate) List referrals @@ -5140,6 +6344,11 @@ List all referrals of the specified campaign. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5154,13 +6363,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $code = 'code_example'; // string | Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. $createdAfter = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. -$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the 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. +$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. $usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. $advocate = 'advocate_example'; // string | Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field @@ -5180,23 +6389,23 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **code** | **string**| Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **createdAfter** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] - **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the 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] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches referrals in which the expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. | [optional] **usable** | **string**| Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. | [optional] **advocate** | **string**| Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) +[**\TalonOne\Client\Model\InlineResponse2009**](../Model/InlineResponse2009.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5223,6 +6432,11 @@ Get the details of the specified role. To see all the roles, use [List roles](#o require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5259,7 +6473,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5286,6 +6500,11 @@ Retrieve the specified ruleset. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5300,7 +6519,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$rulesetId = 56; // int | +$rulesetId = 56; // int | The ID of the ruleset. try { $result = $apiInstance->getRuleset($applicationId, $campaignId, $rulesetId); @@ -5318,7 +6537,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **rulesetId** | **int**| | + **rulesetId** | **int**| The ID of the ruleset. | ### Return type @@ -5326,7 +6545,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5340,7 +6559,7 @@ Name | Type | Description | Notes ## getRulesets -> \TalonOne\Client\Model\InlineResponse2005 getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse2006 getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort) List campaign rulesets @@ -5353,6 +6572,11 @@ List all rulesets of this campaign. A ruleset is a revision of the rules of a ca require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5367,9 +6591,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { $result = $apiInstance->getRulesets($applicationId, $campaignId, $pageSize, $skip, $sort); @@ -5387,17 +6611,17 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2005**](../Model/InlineResponse2005.md) +[**\TalonOne\Client\Model\InlineResponse2006**](../Model/InlineResponse2006.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5424,6 +6648,11 @@ Retrieve the data (including an invitation code) for a user. Non-admin users can require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5460,7 +6689,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5474,7 +6703,7 @@ Name | Type | Description | Notes ## getUsers -> \TalonOne\Client\Model\InlineResponse20031 getUsers($pageSize, $skip, $sort) +> \TalonOne\Client\Model\InlineResponse20037 getUsers($pageSize, $skip, $sort) List users in account @@ -5487,6 +6716,11 @@ Retrieve all users in your account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5499,9 +6733,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. try { $result = $apiInstance->getUsers($pageSize, $skip, $sort); @@ -5517,17 +6751,17 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20031**](../Model/InlineResponse20031.md) +[**\TalonOne\Client\Model\InlineResponse20037**](../Model/InlineResponse20037.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5554,6 +6788,11 @@ Returns a webhook by its id. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5566,7 +6805,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$webhookId = 56; // int | +$webhookId = 56; // int | The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. try { $result = $apiInstance->getWebhook($webhookId); @@ -5582,7 +6821,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **webhookId** | **int**| | + **webhookId** | **int**| The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. | ### Return type @@ -5590,7 +6829,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5604,11 +6843,11 @@ Name | Type | Description | Notes ## getWebhookActivationLogs -> \TalonOne\Client\Model\InlineResponse20028 getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) +> \TalonOne\Client\Model\InlineResponse20034 getWebhookActivationLogs($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) List webhook activation log entries -Webhook activation log entries would be created as soon as an integration request triggered an effect with a webhook. +Webhook activation log entries are created as soon as an integration request triggers a webhook effect. See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks). ### Example @@ -5617,6 +6856,11 @@ Webhook activation log entries would be created as soon as an integration reques require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5629,9 +6873,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $integrationRequestUuid = 'integrationRequestUuid_example'; // string | Filter results by integration request UUID. $webhookId = 3.4; // float | Filter results by Webhook. $applicationId = 3.4; // float | Filter results by Application ID. @@ -5653,9 +6897,9 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **integrationRequestUuid** | **string**| Filter results by integration request UUID. | [optional] **webhookId** | **float**| Filter results by Webhook. | [optional] **applicationId** | **float**| Filter results by Application ID. | [optional] @@ -5665,11 +6909,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20028**](../Model/InlineResponse20028.md) +[**\TalonOne\Client\Model\InlineResponse20034**](../Model/InlineResponse20034.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5683,7 +6927,7 @@ Name | Type | Description | Notes ## getWebhookLogs -> \TalonOne\Client\Model\InlineResponse20029 getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) +> \TalonOne\Client\Model\InlineResponse20035 getWebhookLogs($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) List webhook log entries @@ -5696,6 +6940,11 @@ Retrieve all webhook log entries. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5708,9 +6957,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $status = 'status_example'; // string | Filter results by HTTP status codes. $webhookId = 3.4; // float | Filter results by Webhook. $applicationId = 3.4; // float | Filter results by Application ID. @@ -5733,9 +6982,9 @@ try { 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] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **status** | **string**| Filter results by HTTP status codes. | [optional] **webhookId** | **float**| Filter results by Webhook. | [optional] **applicationId** | **float**| Filter results by Application ID. | [optional] @@ -5746,11 +6995,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse20029**](../Model/InlineResponse20029.md) +[**\TalonOne\Client\Model\InlineResponse20035**](../Model/InlineResponse20035.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5764,7 +7013,7 @@ Name | Type | Description | Notes ## getWebhooks -> \TalonOne\Client\Model\InlineResponse20027 getWebhooks($applicationIds, $sort, $pageSize, $skip) +> \TalonOne\Client\Model\InlineResponse20033 getWebhooks($applicationIds, $sort, $pageSize, $skip) List webhooks @@ -5777,6 +7026,11 @@ List all webhooks. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5789,9 +7043,9 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationIds = 'applicationIds_example'; // string | Filter by one or more application ids separated by comma. -$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. -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$applicationIds = 'applicationIds_example'; // string | Filter by one or more application IDs separated by a comma. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. try { @@ -5808,18 +7062,18 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationIds** | **string**| Filter by one or more application ids separated by comma. | [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] - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **applicationIds** | **string**| Filter by one or more application IDs separated by a comma. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20027**](../Model/InlineResponse20027.md) +[**\TalonOne\Client\Model\InlineResponse20033**](../Model/InlineResponse20033.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5846,6 +7100,11 @@ Upload a CSV file containing the collection of string values that should be atta require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5858,7 +7117,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { @@ -5875,7 +7134,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -5884,7 +7143,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5902,7 +7161,7 @@ Name | Type | Description | Notes Import allowed values for attribute -Upload a CSV file containing a list of allowed values for the specified attribute. These values are also called [picklist values](/docs/product/account/dev-tools/managing-attributes/#picklist-values). The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item` (required): the values in your allowed list, for example a list of SKU's. An allowed list is limited to 500,000 items. Example: ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` +Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. The file should be sent as multipart data. The import **replaces** the previous list of allowed values for this attribute, if any. The CSV file **must** only contain the following column: - `item` (required): the values in your allowed list, for example a list of SKU's. An allowed list is limited to 500,000 items. Example: ```text item CS-VG-04032021-UP-50D-10 CS-DV-04042021-UP-49D-12 CS-DG-02082021-UP-50G-07 ``` ### Example @@ -5911,6 +7170,11 @@ Upload a CSV file containing a list of allowed values for the specified attribut require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5923,7 +7187,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$attributeId = 56; // int | +$attributeId = 56; // int | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { @@ -5940,7 +7204,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **attributeId** | **int**| | + **attributeId** | **int**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -5949,7 +7213,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -5976,6 +7240,11 @@ Upload a CSV file containing the collection of string values that should be atta require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -5990,7 +7259,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { @@ -6009,7 +7278,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -6018,7 +7287,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6036,7 +7305,7 @@ Name | Type | Description | Notes Import coupons -Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file can contain the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `limitval`: The maximum amount of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. - `discountlimit`: The amount of discounts that can be given with this coupon code. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the coupon entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. **Important:** Do not leave empty columns in the file. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). +Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the coupon entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). ### Example @@ -6045,6 +7314,11 @@ Upload a CSV file containing the coupons that should be created. The file should require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6085,7 +7359,77 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importLoyaltyCards + +> \TalonOne\Client\Model\Import importLoyaltyCards($loyaltyProgramId, $upFile) + +Import loyalty cards + +Upload a CSV file containing the loyalty cards that you want to use in your card-based loyalty program. Send the file as multipart data. It contains the following columns for each card: - `identifier` (required): The alphanumeric identifier of the loyalty card. - `state` (required): The state of the loyalty card. It can be `active` or `inactive`. - `customerprofileids` (optional): An array of strings representing the identifiers of the customer profiles linked to the loyalty card. **Note:** We recommend limiting your file size to 500MB. **Example:** ```csv identifier,state,customerprofileids 123-456-789AT,active,Alexa001;UserA ``` + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. + +try { + $result = $apiInstance->importLoyaltyCards($loyaltyProgramId, $upFile); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->importLoyaltyCards: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + +### Return type + +[**\TalonOne\Client\Model\Import**](../Model/Import.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6103,7 +7447,7 @@ Name | Type | Description | Notes Import loyalty points -Upload a CSV file containing the [loyalty](https://www.talon.one/pillar-pages/loyalty) points that should be created. The file should be sent as multipart data. **Important**: For existing customer profiles, the imported points are _added_ to their active points. Learn more about [Loyalty programs](https://docs.talon.one/docs/product/loyalty-programs/overview). The CSV file can contain the following columns: - `customerprofileid`: The integration ID of the customer profile that should receive the loyalty points. - `amount`: The amount of points to award to the customer profile. - `startdate`: The earliest date when the points can be redeemed. On this date and until the expiry date, the points are `active`. - `expirydate`: The latest date when the points can be redeemed. After this date, the points are `expired`. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): A reason why these points were awarded. **Important:** Do not leave empty columns in the file. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. **Example:** ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` +Upload a CSV file containing the loyalty points you want to import into a given loyalty program. Send the file as multipart data. Depending on the loyalty program type, you can import the points into a given customer profile or into a given _active_ loyalty card. The CSV file contains the following columns: - `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. - `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. - `amount`: The amount of points to award to the customer profile. - `startdate`: The earliest date when the points can be redeemed. On this date and until the expiration date, the points are `active`. - `expirydate`: The latest date when the points can be redeemed. After this date, the points are `expired`. - `subledgerid` (optional): The ID of the subledger that should received the points. - `reason` (optional): The reason why these points are awarded. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until the date provided for `startdate` is reached. **Note:** We recommend limiting your file size to 500MB. **Example for profile-based programs:** ```text customerprofileid,amount,startdate,expirydate,subledgerid,reason URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` **Example for card-based programs:** ```text identifier,amount,startdate,expirydate,subledgerid,reason summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` ### Example @@ -6112,6 +7456,11 @@ Upload a CSV file containing the [loyalty](https://www.talon.one/pillar-pages/lo require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6124,7 +7473,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$loyaltyProgramId = 56; // int | Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { @@ -6141,7 +7490,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **loyaltyProgramId** | **int**| Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). | + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -6150,7 +7499,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6168,7 +7517,7 @@ Name | Type | Description | Notes Import giveaway codes into a giveaway pool -Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file can contain the following columns: - `code` (required): the code of your giveaway, for instance, a gift card redemption code. - `startdate`: the start date in RFC3339 of the code redemption period. - `enddate`: the last date in RFC3339 of the code redemption period. - `attributes`: A json object describing _custom_ giveaway attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated to the giveaway entity, set it with `\"{\"\"provider\"\": \"\"myPartnerCompany\"\"}\"`. **Important:** Do not leave empty columns in the file. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. **Example:** ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` +Upload a CSV file containing the giveaway codes that should be created. Send the file as multipart data. The CSV file contains the following columns: - `code` (required): the code of your giveaway, for instance, a gift card redemption code. - `startdate`: the start date in RFC3339 of the code redemption period. - `enddate`: the last date in RFC3339 of the code redemption period. - `attributes`: A json object describing _custom_ giveaway attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated to the giveaway entity, set it with `\"{\"\"provider\"\": \"\"myPartnerCompany\"\"}\"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,enddate,attributes GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Amazon\"\"}\" GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,\"{\"\"provider\"\": \"\"Aliexpress\"\"}\" ``` ### Example @@ -6177,6 +7526,11 @@ Upload a CSV file containing the giveaway codes that should be created. Send the require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6189,7 +7543,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$poolId = 56; // int | +$poolId = 56; // int | The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. $upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. try { @@ -6206,7 +7560,79 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **poolId** | **int**| | + **poolId** | **int**| The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. | + **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + +### Return type + +[**\TalonOne\Client\Model\Import**](../Model/Import.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## importReferrals + +> \TalonOne\Client\Model\Import importReferrals($applicationId, $campaignId, $upFile) + +Import referrals + +Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the referral entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. +$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. + +try { + $result = $apiInstance->importReferrals($applicationId, $campaignId, $upFile); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->importReferrals: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | **upFile** | **string**| The file with the information about the data that should be imported. | [optional] ### Return type @@ -6215,11 +7641,87 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../../README.md#documentation-for-models) +[[Back to README]](../../README.md) + + +## listAccountCollections + +> \TalonOne\Client\Model\InlineResponse20015 listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name) + +List collections in account + +List collections in 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'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$name = 'name_example'; // string | Filter by the name of the Collection. + +try { + $result = $apiInstance->listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->listAccountCollections: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **name** | **string**| Filter by the name of the Collection. | [optional] + +### Return type + +[**\TalonOne\Client\Model\InlineResponse20015**](../Model/InlineResponse20015.md) + +### Authorization + +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers -- **Content-Type**: multipart/form-data +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -6227,13 +7729,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## importReferrals +## listCollections -> \TalonOne\Client\Model\Import importReferrals($applicationId, $campaignId, $upFile) +> \TalonOne\Client\Model\InlineResponse20017 listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) -Import referrals +List collections -Upload a CSV file containing the referrals that should be created. The file should be sent as multipart data. The CSV file can contain the following columns: - `code` (required): The referral code. - `advocateprofileintegrationid` (required): The profile ID of the advocate. - `startdate`: The start date in RFC3339 of the code redemption period. - `expirydate`: The end date in RFC3339 of the code redemption period. - `limitval`: The maximum amount of redemptions of this code. Defaults to `1` when left blank. - `attributes`: A json object describing _custom_ referral attribute names and their values. Double the double-quotes in the object. For example, if you [created a custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated to the referral entity, set it with `\"{\"\"category\"\": \"\"10_off\"\"}\"`. You can use the timezone of your choice. It is converted to UTC internally by Talon.One. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` +List collections in the campaign. ### Example @@ -6242,6 +7744,11 @@ Upload a CSV file containing the referrals that should be created. The file shou require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6256,13 +7763,17 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$upFile = 'upFile_example'; // string | The file with the information about the data that should be imported. +$pageSize = 1000; // int | The number of items in this response. +$skip = 56; // int | Skips the given number of items when paging through large result sets. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. +$withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. +$name = 'name_example'; // string | Filter by the name of the Collection. try { - $result = $apiInstance->importReferrals($applicationId, $campaignId, $upFile); + $result = $apiInstance->listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->importReferrals: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listCollections: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6274,19 +7785,23 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **upFile** | **string**| The file with the information about the data that should be imported. | [optional] + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] + **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] + **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] + **name** | **string**| Filter by the name of the Collection. | [optional] ### Return type -[**\TalonOne\Client\Model\Import**](../Model/Import.md) +[**\TalonOne\Client\Model\InlineResponse20017**](../Model/InlineResponse20017.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers -- **Content-Type**: multipart/form-data +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -6294,13 +7809,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## listAccountCollections +## listCollectionsInApplication -> \TalonOne\Client\Model\InlineResponse20010 listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name) +> \TalonOne\Client\Model\InlineResponse20017 listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) -List collections in account +List collections in application -List collections in account. +List collections from all campaigns in the Application. ### Example @@ -6309,6 +7824,11 @@ List collections in account. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6321,17 +7841,18 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( 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. +$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$sort = 'sort_example'; // string | The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $withTotalResultSize = True; // bool | When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. $name = 'name_example'; // string | Filter by the name of the Collection. try { - $result = $apiInstance->listAccountCollections($pageSize, $skip, $sort, $withTotalResultSize, $name); + $result = $apiInstance->listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->listAccountCollections: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->listCollectionsInApplication: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6341,19 +7862,20 @@ try { 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] + **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **sort** | **string**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | [optional] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **withTotalResultSize** | **bool**| When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] **name** | **string**| Filter by the name of the Collection. | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse20010**](../Model/InlineResponse20010.md) +[**\TalonOne\Client\Model\InlineResponse20017**](../Model/InlineResponse20017.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6365,13 +7887,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## listCollections +## postAddedDeductedPointsNotification -> \TalonOne\Client\Model\InlineResponse20012 listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) +> \TalonOne\Client\Model\BaseNotification postAddedDeductedPointsNotification($loyaltyProgramId, $body) -List collections +Create notification about added or deducted loyalty points -List collections in the campaign. +Create a notification about added or deducted loyalty points in a given profile-based loyalty program. A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. For more information, see [Managing notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-notifications). ### Example @@ -6380,6 +7902,11 @@ List collections in the campaign. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6392,19 +7919,14 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. -$name = 'name_example'; // string | Filter by the name of the Collection. +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$body = new \TalonOne\Client\Model\NewBaseNotification(); // \TalonOne\Client\Model\NewBaseNotification | body try { - $result = $apiInstance->listCollections($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $result = $apiInstance->postAddedDeductedPointsNotification($loyaltyProgramId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->listCollections: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->postAddedDeductedPointsNotification: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6414,25 +7936,20 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] - **name** | **string**| Filter by the name of the Collection. | [optional] + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **body** | [**\TalonOne\Client\Model\NewBaseNotification**](../Model/NewBaseNotification.md)| body | ### Return type -[**\TalonOne\Client\Model\InlineResponse20012**](../Model/InlineResponse20012.md) +[**\TalonOne\Client\Model\BaseNotification**](../Model/BaseNotification.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -6440,13 +7957,13 @@ Name | Type | Description | Notes [[Back to README]](../../README.md) -## listCollectionsInApplication +## postCatalogsStrikethroughNotification -> \TalonOne\Client\Model\InlineResponse20012 listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) +> \TalonOne\Client\Model\BaseNotification postCatalogsStrikethroughNotification($applicationId, $body) -List collections in application +Create strikethrough notification -List collections from all campaigns in the Application. +Create a notification for the in the given Application. For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). See the [payload](https://docs.talon.one/outbound-notifications) you will receive. ### Example @@ -6455,6 +7972,11 @@ List collections from all campaigns in the Application. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6468,17 +7990,13 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. -$name = 'name_example'; // string | Filter by the name of the Collection. +$body = new \TalonOne\Client\Model\NewBaseNotification(); // \TalonOne\Client\Model\NewBaseNotification | body try { - $result = $apiInstance->listCollectionsInApplication($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $result = $apiInstance->postCatalogsStrikethroughNotification($applicationId, $body); print_r($result); } catch (Exception $e) { - echo 'Exception when calling ManagementApi->listCollectionsInApplication: ', $e->getMessage(), PHP_EOL; + echo 'Exception when calling ManagementApi->postCatalogsStrikethroughNotification: ', $e->getMessage(), PHP_EOL; } ?> ``` @@ -6489,23 +8007,19 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **pageSize** | **int**| The number of items 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. | [optional] - **name** | **string**| Filter by the name of the Collection. | [optional] + **body** | [**\TalonOne\Client\Model\NewBaseNotification**](../Model/NewBaseNotification.md)| body | ### Return type -[**\TalonOne\Client\Model\InlineResponse20012**](../Model/InlineResponse20012.md) +[**\TalonOne\Client\Model\BaseNotification**](../Model/BaseNotification.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) @@ -6517,9 +8031,9 @@ Name | Type | Description | Notes > removeLoyaltyPoints($loyaltyProgramId, $integrationId, $body) -Deduct points in loyalty program for given customer +Deduct points from customer profile -Deduct points from the specified loyalty program and specified customer profile. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](/integration-api/#operation/updateCustomerSessionV2). +Deduct points from the specified loyalty program and specified customer profile. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. ### Example @@ -6528,6 +8042,11 @@ Deduct points from the specified loyalty program and specified customer profile. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6542,7 +8061,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $loyaltyProgramId = 'loyaltyProgramId_example'; // string | The identifier for the loyalty program. $integrationId = 'integrationId_example'; // string | The identifier of the profile. -$body = new \TalonOne\Client\Model\LoyaltyPoints(); // \TalonOne\Client\Model\LoyaltyPoints | +$body = new \TalonOne\Client\Model\DeductLoyaltyPoints(); // \TalonOne\Client\Model\DeductLoyaltyPoints | body try { $apiInstance->removeLoyaltyPoints($loyaltyProgramId, $integrationId, $body); @@ -6559,7 +8078,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **string**| The identifier for the loyalty program. | **integrationId** | **string**| The identifier of the profile. | - **body** | [**\TalonOne\Client\Model\LoyaltyPoints**](../Model/LoyaltyPoints.md)| | + **body** | [**\TalonOne\Client\Model\DeductLoyaltyPoints**](../Model/DeductLoyaltyPoints.md)| body | ### Return type @@ -6567,7 +8086,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6594,6 +8113,11 @@ Consumes the supplied password reset token and updates the password for the asso require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6606,7 +8130,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$body = new \TalonOne\Client\Model\NewPassword(); // \TalonOne\Client\Model\NewPassword | +$body = new \TalonOne\Client\Model\NewPassword(); // \TalonOne\Client\Model\NewPassword | body try { $result = $apiInstance->resetPassword($body); @@ -6622,7 +8146,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**\TalonOne\Client\Model\NewPassword**](../Model/NewPassword.md)| | + **body** | [**\TalonOne\Client\Model\NewPassword**](../Model/NewPassword.md)| body | ### Return type @@ -6630,7 +8154,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6644,7 +8168,7 @@ Name | Type | Description | Notes ## searchCouponsAdvancedApplicationWideWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2007 searchCouponsAdvancedApplicationWideWithoutTotalCount($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) +> \TalonOne\Client\Model\InlineResponse2008 searchCouponsAdvancedApplicationWideWithoutTotalCount($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) List coupons that match the given attributes (without total count) @@ -6657,6 +8181,11 @@ List the coupons whose attributes match the query criteria in all **active** cam require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6670,16 +8199,16 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$body = new \stdClass; // object | -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$body = new \stdClass; // object | body +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$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. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $value = 'value_example'; // string | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. $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. +$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. $usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. -$referralId = 56; // int | Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. +$referralId = 56; // int | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. $recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field $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 @@ -6700,16 +8229,16 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **body** | **object**| | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **body** | **object**| body | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **value** | **string**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **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] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] **usable** | **string**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | [optional] - **referralId** | **int**| Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] + **referralId** | **int**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] **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] @@ -6717,11 +8246,11 @@ Name | Type | Description | Notes ### Return type -[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6735,7 +8264,7 @@ Name | Type | Description | Notes ## searchCouponsAdvancedWithoutTotalCount -> \TalonOne\Client\Model\InlineResponse2007 searchCouponsAdvancedWithoutTotalCount($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) +> \TalonOne\Client\Model\InlineResponse2008 searchCouponsAdvancedWithoutTotalCount($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) List coupons that match the given attributes in campaign (without total count) @@ -6748,6 +8277,11 @@ List the coupons whose attributes match the query criteria in the given campaign require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6762,16 +8296,16 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \stdClass; // object | -$pageSize = 56; // int | The number of items to include in this response. When omitted, the maximum value of 1000 will be used. +$body = new \stdClass; // object | body +$pageSize = 1000; // int | The number of items in this response. $skip = 56; // int | Skips the given number of items when paging through large result sets. -$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. +$sort = 'sort_example'; // string | The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. $value = 'value_example'; // string | Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. $createdBefore = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. $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. +$valid = 'valid_example'; // string | Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. $usable = 'usable_example'; // string | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. -$referralId = 56; // int | Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. +$referralId = 56; // int | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. $recipientIntegrationId = 'recipientIntegrationId_example'; // string | Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field $exactMatch = false; // bool | Filter results to an exact case-insensitive matching against the coupon code $batchId = 'batchId_example'; // string | Filter results by batches of coupons @@ -6792,27 +8326,98 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | **object**| | - **pageSize** | **int**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | [optional] + **body** | **object**| body | + **pageSize** | **int**| The number of items in this response. | [optional] [default to 1000] **skip** | **int**| Skips the given number of items when paging through large result sets. | [optional] - **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] + **sort** | **string**| The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. | [optional] **value** | **string**| Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. | [optional] **createdBefore** | **\DateTime**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | [optional] **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] + **valid** | **string**| Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. | [optional] **usable** | **string**| Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | [optional] - **referralId** | **int**| Filter the results by matching them with the Id of a referral, that meaning the coupons that had been created as an effect of the usage of a referral code. | [optional] + **referralId** | **int**| Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | [optional] **recipientIntegrationId** | **string**| Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field | [optional] **exactMatch** | **bool**| Filter results to an exact case-insensitive matching against the coupon code | [optional] [default to false] **batchId** | **string**| Filter results by batches of coupons | [optional] ### Return type -[**\TalonOne\Client\Model\InlineResponse2007**](../Model/InlineResponse2007.md) +[**\TalonOne\Client\Model\InlineResponse2008**](../Model/InlineResponse2008.md) + +### Authorization + +[management_key](../../README.md#management_key), [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) + + +## transferLoyaltyCard + +> transferLoyaltyCard($loyaltyProgramId, $loyaltyCardId, $body) + +Transfer card data + +Transfer loyalty card data, such as linked customers, loyalty balances and transactions, from a given loyalty card to a new, automatically created loyalty card. **Important:** - The original card is automatically blocked once the new card is created, and it cannot be activated again. - The default status of the new card is _active_. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$body = new \TalonOne\Client\Model\TransferLoyaltyCard(); // \TalonOne\Client\Model\TransferLoyaltyCard | body + +try { + $apiInstance->transferLoyaltyCard($loyaltyProgramId, $loyaltyCardId, $body); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->transferLoyaltyCard: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **body** | [**\TalonOne\Client\Model\TransferLoyaltyCard**](../Model/TransferLoyaltyCard.md)| body | + +### Return type + +void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6839,6 +8444,11 @@ Edit the description of the account-level collection and enable or disable the c require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6851,8 +8461,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). -$body = new \TalonOne\Client\Model\UpdateCollection(); // \TalonOne\Client\Model\UpdateCollection | +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$body = new \TalonOne\Client\Model\UpdateCollection(); // \TalonOne\Client\Model\UpdateCollection | body try { $result = $apiInstance->updateAccountCollection($collectionId, $body); @@ -6868,8 +8478,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | - **body** | [**\TalonOne\Client\Model\UpdateCollection**](../Model/UpdateCollection.md)| | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **body** | [**\TalonOne\Client\Model\UpdateCollection**](../Model/UpdateCollection.md)| body | ### Return type @@ -6877,7 +8487,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6904,6 +8514,11 @@ Updates an existing additional cost. Once created, the only property of an addit require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6916,8 +8531,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$additionalCostId = 56; // int | -$body = new \TalonOne\Client\Model\NewAdditionalCost(); // \TalonOne\Client\Model\NewAdditionalCost | +$additionalCostId = 56; // int | The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. +$body = new \TalonOne\Client\Model\NewAdditionalCost(); // \TalonOne\Client\Model\NewAdditionalCost | body try { $result = $apiInstance->updateAdditionalCost($additionalCostId, $body); @@ -6933,8 +8548,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **additionalCostId** | **int**| | - **body** | [**\TalonOne\Client\Model\NewAdditionalCost**](../Model/NewAdditionalCost.md)| | + **additionalCostId** | **int**| The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. | + **body** | [**\TalonOne\Client\Model\NewAdditionalCost**](../Model/NewAdditionalCost.md)| body | ### Return type @@ -6942,7 +8557,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -6960,7 +8575,7 @@ Name | Type | Description | Notes Update custom attribute -Updates an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the title (human readable description). This restriction is in place to prevent accidentally breaking live integrations. E.g. if you have a customer profile attribute with the name `region`, and your integration is sending `attributes.region` with customer profile updates, changing the name to `locale` would cause the integration requests to begin failing. If you **really** need to change the `type` or `name` property of a custom attribute, create a new attribute and update any relevant integrations and rules to use the new attribute. Then delete the old attribute when you are confident you have migrated any needed data from the old attribute to the new one. +Update an existing custom attribute. Once created, the only property of a custom attribute that can be changed is the description. To change the `type` or `name` property of a custom attribute, create a new attribute and update any relevant integrations and rules to use the new attribute. ### Example @@ -6969,6 +8584,11 @@ Updates an existing custom attribute. Once created, the only property of a custo require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -6981,8 +8601,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( new GuzzleHttp\Client(), $config ); -$attributeId = 56; // int | -$body = new \TalonOne\Client\Model\NewAttribute(); // \TalonOne\Client\Model\NewAttribute | +$attributeId = 56; // int | The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. +$body = new \TalonOne\Client\Model\NewAttribute(); // \TalonOne\Client\Model\NewAttribute | body try { $result = $apiInstance->updateAttribute($attributeId, $body); @@ -6998,8 +8618,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **attributeId** | **int**| | - **body** | [**\TalonOne\Client\Model\NewAttribute**](../Model/NewAttribute.md)| | + **attributeId** | **int**| The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. | + **body** | [**\TalonOne\Client\Model\NewAttribute**](../Model/NewAttribute.md)| body | ### Return type @@ -7007,7 +8627,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -7034,6 +8654,11 @@ Update the given campaign. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -7048,7 +8673,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\UpdateCampaign(); // \TalonOne\Client\Model\UpdateCampaign | +$body = new \TalonOne\Client\Model\UpdateCampaign(); // \TalonOne\Client\Model\UpdateCampaign | body try { $result = $apiInstance->updateCampaign($applicationId, $campaignId, $body); @@ -7066,7 +8691,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\UpdateCampaign**](../Model/UpdateCampaign.md)| | + **body** | [**\TalonOne\Client\Model\UpdateCampaign**](../Model/UpdateCampaign.md)| body | ### Return type @@ -7074,7 +8699,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -7101,6 +8726,11 @@ Edit the description of the collection. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -7115,8 +8745,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). -$body = new \TalonOne\Client\Model\UpdateCampaignCollection(); // \TalonOne\Client\Model\UpdateCampaignCollection | +$collectionId = 56; // int | The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. +$body = new \TalonOne\Client\Model\UpdateCampaignCollection(); // \TalonOne\Client\Model\UpdateCampaignCollection | body try { $result = $apiInstance->updateCollection($applicationId, $campaignId, $collectionId, $body); @@ -7134,8 +8764,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). | - **body** | [**\TalonOne\Client\Model\UpdateCampaignCollection**](../Model/UpdateCampaignCollection.md)| | + **collectionId** | **int**| The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. | + **body** | [**\TalonOne\Client\Model\UpdateCampaignCollection**](../Model/UpdateCampaignCollection.md)| body | ### Return type @@ -7143,7 +8773,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -7161,7 +8791,7 @@ Name | Type | Description | Notes Update coupon -Update the specified coupon. +Update the specified coupon.

Important

With this PUT endpoint only, any property you do not explicitly set in your request will be set to null.

### Example @@ -7170,6 +8800,11 @@ Update the specified coupon. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -7184,8 +8819,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$couponId = 'couponId_example'; // string | The ID of the coupon code to update -$body = new \TalonOne\Client\Model\UpdateCoupon(); // \TalonOne\Client\Model\UpdateCoupon | +$couponId = 'couponId_example'; // string | The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. +$body = new \TalonOne\Client\Model\UpdateCoupon(); // \TalonOne\Client\Model\UpdateCoupon | body try { $result = $apiInstance->updateCoupon($applicationId, $campaignId, $couponId, $body); @@ -7203,8 +8838,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **couponId** | **string**| The ID of the coupon code to update | - **body** | [**\TalonOne\Client\Model\UpdateCoupon**](../Model/UpdateCoupon.md)| | + **couponId** | **string**| The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. | + **body** | [**\TalonOne\Client\Model\UpdateCoupon**](../Model/UpdateCoupon.md)| body | ### Return type @@ -7212,7 +8847,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -7230,7 +8865,7 @@ Name | Type | Description | Notes Update coupons -Update all coupons of an campaign, or a specific batch of coupons. You can find the `batchId` in the **Coupons** view of your Application in the Campaign Manager or by using [List coupons](#operation/getCouponsWithoutTotalCount). **Important**: - Only send sequential requests to this endpoint. - Requests to this endpoint timeout after 30 minutes. If you hit a timeout, reach out to our support team. To update a specific coupon, use [Update coupon](#operation/updateCoupon). +Update all coupons, or a specific batch of coupons, in a campaign. You can find the `batchId` in the **Coupons** view of your Application in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount).

Important

To update a specific coupon, use [Update coupon](#operation/updateCoupon). ### Example @@ -7239,6 +8874,11 @@ Update all coupons of an campaign, or a specific batch of coupons. You can find require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -7253,7 +8893,7 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$body = new \TalonOne\Client\Model\UpdateCouponBatch(); // \TalonOne\Client\Model\UpdateCouponBatch | +$body = new \TalonOne\Client\Model\UpdateCouponBatch(); // \TalonOne\Client\Model\UpdateCouponBatch | body try { $apiInstance->updateCouponBatch($applicationId, $campaignId, $body); @@ -7270,7 +8910,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **body** | [**\TalonOne\Client\Model\UpdateCouponBatch**](../Model/UpdateCouponBatch.md)| | + **body** | [**\TalonOne\Client\Model\UpdateCouponBatch**](../Model/UpdateCouponBatch.md)| body | ### Return type @@ -7278,7 +8918,7 @@ void (empty response body) ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -7290,13 +8930,85 @@ void (empty response body) [[Back to README]](../../README.md) +## updateLoyaltyCard + +> \TalonOne\Client\Model\LoyaltyCard updateLoyaltyCard($loyaltyProgramId, $loyaltyCardId, $body) + +Update loyalty card status + +Update the status of the given loyalty card. A card can be _active_ or _inactive_. + +### Example + +```php +setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + +// Configure API key authorization: manager_auth +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + + +$apiInstance = new TalonOne\Client\Api\ManagementApi( + // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. + // This is optional, `GuzzleHttp\Client` will be used as default. + new GuzzleHttp\Client(), + $config +); +$loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. +$loyaltyCardId = 'loyaltyCardId_example'; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. +$body = new \TalonOne\Client\Model\UpdateLoyaltyCard(); // \TalonOne\Client\Model\UpdateLoyaltyCard | body + +try { + $result = $apiInstance->updateLoyaltyCard($loyaltyProgramId, $loyaltyCardId, $body); + print_r($result); +} catch (Exception $e) { + echo 'Exception when calling ManagementApi->updateLoyaltyCard: ', $e->getMessage(), PHP_EOL; +} +?> +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | + **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | + **body** | [**\TalonOne\Client\Model\UpdateLoyaltyCard**](../Model/UpdateLoyaltyCard.md)| body | + +### Return type + +[**\TalonOne\Client\Model\LoyaltyCard**](../Model/LoyaltyCard.md) + +### Authorization + +[management_key](../../README.md#management_key), [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) + + ## updateNotificationWebhook > \TalonOne\Client\Model\NotificationWebhook updateNotificationWebhook($applicationId, $notificationWebhookId, $body) -Update notification webhook +Update notification about campaign-related changes -Update the given outbound notification webhook. +Update the given [notification about campaign-related changes](https://docs.talon.one/docs/product/applications/outbound-notifications). **Tip:** You can review the payload you will receive in the [specs](https://docs.talon.one/outbound-notifications#/paths/campaign_edited/post). ### Example @@ -7305,6 +9017,11 @@ Update the given outbound notification webhook. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -7318,8 +9035,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( $config ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. -$notificationWebhookId = 56; // int | -$body = new \TalonOne\Client\Model\NewNotificationWebhook(); // \TalonOne\Client\Model\NewNotificationWebhook | +$notificationWebhookId = 56; // int | The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. +$body = new \TalonOne\Client\Model\NewNotificationWebhook(); // \TalonOne\Client\Model\NewNotificationWebhook | body try { $result = $apiInstance->updateNotificationWebhook($applicationId, $notificationWebhookId, $body); @@ -7336,8 +9053,8 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | - **notificationWebhookId** | **int**| | - **body** | [**\TalonOne\Client\Model\NewNotificationWebhook**](../Model/NewNotificationWebhook.md)| | + **notificationWebhookId** | **int**| The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. | + **body** | [**\TalonOne\Client\Model\NewNotificationWebhook**](../Model/NewNotificationWebhook.md)| body | ### Return type @@ -7345,7 +9062,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers @@ -7372,6 +9089,11 @@ Update the specified referral. require_once(__DIR__ . '/vendor/autoload.php'); +// Configure API key authorization: management_key +$config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); +// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +// $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer'); + // Configure API key authorization: manager_auth $config = TalonOne\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed @@ -7386,8 +9108,8 @@ $apiInstance = new TalonOne\Client\Api\ManagementApi( ); $applicationId = 56; // int | The ID of the Application. It is displayed in your Talon.One deployment URL. $campaignId = 56; // int | The ID of the campaign. It is displayed in your Talon.One deployment URL. -$referralId = 'referralId_example'; // string | The ID of the referral code to delete -$body = new \TalonOne\Client\Model\UpdateReferral(); // \TalonOne\Client\Model\UpdateReferral | +$referralId = 'referralId_example'; // string | The ID of the referral code. +$body = new \TalonOne\Client\Model\UpdateReferral(); // \TalonOne\Client\Model\UpdateReferral | body try { $result = $apiInstance->updateReferral($applicationId, $campaignId, $referralId, $body); @@ -7405,8 +9127,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationId** | **int**| The ID of the Application. It is displayed in your Talon.One deployment URL. | **campaignId** | **int**| The ID of the campaign. It is displayed in your Talon.One deployment URL. | - **referralId** | **string**| The ID of the referral code to delete | - **body** | [**\TalonOne\Client\Model\UpdateReferral**](../Model/UpdateReferral.md)| | + **referralId** | **string**| The ID of the referral code. | + **body** | [**\TalonOne\Client\Model\UpdateReferral**](../Model/UpdateReferral.md)| body | ### Return type @@ -7414,7 +9136,7 @@ Name | Type | Description | Notes ### Authorization -[manager_auth](../../README.md#manager_auth) +[management_key](../../README.md#management_key), [manager_auth](../../README.md#manager_auth) ### HTTP request headers diff --git a/docs/Model/Account.md b/docs/Model/Account.md index c719525c..4cb57296 100644 --- a/docs/Model/Account.md +++ b/docs/Model/Account.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **companyName** | **string** | | **domainName** | **string** | Subdomain Name for yourcompany.talon.one. | **state** | **string** | State of the account (active, deactivated). | diff --git a/docs/Model/AccountAdditionalCost.md b/docs/Model/AccountAdditionalCost.md index f84130c2..4119c860 100644 --- a/docs/Model/AccountAdditionalCost.md +++ b/docs/Model/AccountAdditionalCost.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**name** | **string** | The additional cost name that will be used in API requests and Talang. E.g. if `name == \"shipping\"` then you would set the shipping additional cost by including an `additionalCosts.shipping` property in your request payload. | +**name** | **string** | The internal name used in API requests. | **title** | **string** | The human-readable name for the additional cost that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique. | **description** | **string** | A description of this additional cost. | **subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that are subscribed to this additional cost. | [optional] -**type** | **string** | The type of additional cost. The following options can be chosen: - `session`: Additional cost will be added per session, - `item`: Additional cost will be added per item, - `both`: Additional cost will be added per item and session. | [optional] [default to 'session'] +**type** | **string** | The type of additional cost. Possible value: - `session`: Additional cost will be added per session. - `item`: Additional cost will be added per item. - `both`: Additional cost will be added per item and session. | [optional] [default to 'session'] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AccountDashboardStatistic.md b/docs/Model/AccountDashboardStatistic.md new file mode 100644 index 00000000..8f7b0d52 --- /dev/null +++ b/docs/Model/AccountDashboardStatistic.md @@ -0,0 +1,16 @@ +# # AccountDashboardStatistic + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**revenue** | [**\TalonOne\Client\Model\AccountDashboardStatisticRevenue[]**](AccountDashboardStatisticRevenue.md) | Aggregated statistic for account revenue. | [optional] +**discounts** | [**\TalonOne\Client\Model\AccountDashboardStatisticDiscount[]**](AccountDashboardStatisticDiscount.md) | Aggregated statistic for account discount. | [optional] +**loyaltyPoints** | [**\TalonOne\Client\Model\AccountDashboardStatisticLoyaltyPoints[]**](AccountDashboardStatisticLoyaltyPoints.md) | Aggregated statistic for account loyalty points. | [optional] +**referrals** | [**\TalonOne\Client\Model\AccountDashboardStatisticReferrals[]**](AccountDashboardStatisticReferrals.md) | Aggregated statistic for account referrals. | [optional] +**apiCalls** | [**\TalonOne\Client\Model\AccountDashboardStatisticApiCalls[]**](AccountDashboardStatisticApiCalls.md) | Aggregated statistic for the number of account API calls. | [optional] +**campaigns** | [**\TalonOne\Client\Model\AccountDashboardStatisticCampaigns**](AccountDashboardStatisticCampaigns.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/AccountDashboardStatisticApiCalls.md b/docs/Model/AccountDashboardStatisticApiCalls.md new file mode 100644 index 00000000..3dc305ed --- /dev/null +++ b/docs/Model/AccountDashboardStatisticApiCalls.md @@ -0,0 +1,12 @@ +# # AccountDashboardStatisticApiCalls + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total number of API calls received. | +**datetime** | [**\DateTime**](\DateTime.md) | Values aggregated for the specified date. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/AccountDashboardStatisticCampaigns.md b/docs/Model/AccountDashboardStatisticCampaigns.md new file mode 100644 index 00000000..24a993d6 --- /dev/null +++ b/docs/Model/AccountDashboardStatisticCampaigns.md @@ -0,0 +1,12 @@ +# # AccountDashboardStatisticCampaigns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**live** | **int** | Number of campaigns that are active and live (across all Applications). | +**endingSoon** | **int** | Campaigns with a schedule ending in 7 days or with only 10% of budget left. | + +[[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/AccountDashboardStatisticDiscount.md b/docs/Model/AccountDashboardStatisticDiscount.md new file mode 100644 index 00000000..782c64a8 --- /dev/null +++ b/docs/Model/AccountDashboardStatisticDiscount.md @@ -0,0 +1,13 @@ +# # AccountDashboardStatisticDiscount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total discount value redeemed by users. | +**average** | **float** | Average discount percentage. | +**datetime** | [**\DateTime**](\DateTime.md) | Values aggregated for the specified date. | + +[[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/AccountDashboardStatisticLoyaltyPoints.md b/docs/Model/AccountDashboardStatisticLoyaltyPoints.md new file mode 100644 index 00000000..4b5ea63e --- /dev/null +++ b/docs/Model/AccountDashboardStatisticLoyaltyPoints.md @@ -0,0 +1,12 @@ +# # AccountDashboardStatisticLoyaltyPoints + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total loyalty points earned by users. | +**datetime** | [**\DateTime**](\DateTime.md) | Values aggregated for the specified date. | + +[[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/AccountDashboardStatisticReferrals.md b/docs/Model/AccountDashboardStatisticReferrals.md new file mode 100644 index 00000000..f396e315 --- /dev/null +++ b/docs/Model/AccountDashboardStatisticReferrals.md @@ -0,0 +1,12 @@ +# # AccountDashboardStatisticReferrals + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | Total number of referrals initiated by users. | +**datetime** | [**\DateTime**](\DateTime.md) | Values aggregated for the specified date. | + +[[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/AccountDashboardStatisticRevenue.md b/docs/Model/AccountDashboardStatisticRevenue.md new file mode 100644 index 00000000..7d36e108 --- /dev/null +++ b/docs/Model/AccountDashboardStatisticRevenue.md @@ -0,0 +1,13 @@ +# # AccountDashboardStatisticRevenue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total** | **float** | All revenue that went through the client's shop (including purchases that didn’t trigger an effect). | +**influenced** | **float** | The revenue that was created by a purchase that triggered an effect (excluding web hooks, notifications). | +**datetime** | [**\DateTime**](\DateTime.md) | Values aggregated for the specified date. | + +[[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/AddFreeItemEffectProps.md b/docs/Model/AddFreeItemEffectProps.md index b4fd1a75..a8371445 100644 --- a/docs/Model/AddFreeItemEffectProps.md +++ b/docs/Model/AddFreeItemEffectProps.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sku** | **string** | SKU of the item that needs to be added. | -**name** | **string** | The name/description of the effect. | +**name** | **string** | The name / description of the effect | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AddLoyaltyPoints.md b/docs/Model/AddLoyaltyPoints.md new file mode 100644 index 00000000..b482898e --- /dev/null +++ b/docs/Model/AddLoyaltyPoints.md @@ -0,0 +1,18 @@ +# # AddLoyaltyPoints + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**points** | **float** | Amount of loyalty points. | +**name** | **string** | Name / reason for the point addition. | [optional] +**validityDuration** | **string** | The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. If passed, `validUntil` should be omitted. | [optional] +**validUntil** | [**\DateTime**](\DateTime.md) | Date and time when points should expire. The value should be provided in RFC 3339 format. If passed, `validityDuration` should be omitted. | [optional] +**pendingDuration** | **string** | The amount of time before the points are considered valid. The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. | [optional] +**pendingUntil** | [**\DateTime**](\DateTime.md) | Date and time after the points are considered valid. The value should be provided in RFC 3339 format. If passed, `pendingDuration` should be omitted. | [optional] +**subledgerId** | **string** | ID of the subledger the points are added to. If there is no existing subledger with this ID, the subledger is created automatically. | [optional] +**applicationId** | **int** | ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL. | [optional] + +[[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/AddLoyaltyPointsEffectProps.md b/docs/Model/AddLoyaltyPointsEffectProps.md index b43f3ef7..fc4f50dd 100644 --- a/docs/Model/AddLoyaltyPointsEffectProps.md +++ b/docs/Model/AddLoyaltyPointsEffectProps.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The reason of the point addition. | +**name** | **string** | The name / description of this loyalty point addition. | **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 added. | @@ -15,7 +15,9 @@ Name | Type | Description | Notes **transactionUUID** | **string** | The identifier of this addition in the loyalty ledger. | **cartItemPosition** | **float** | The index of the item in the cart items list on which the loyal points addition should be applied. | [optional] **cartItemSubPosition** | **float** | The sub position is triggered when application flattening is enabled. It indicates to which item the loyalty points addition applies, for cart items with `quantity` > 1. | [optional] -**cardIdentifier** | **string** | The card on which these points were added. | [optional] +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] +**bundleIndex** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional] +**bundleName** | **string** | The name of the bundle definition. | [optional] [[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/AddedDeductedPointsNotificationPolicy.md b/docs/Model/AddedDeductedPointsNotificationPolicy.md new file mode 100644 index 00000000..498663a1 --- /dev/null +++ b/docs/Model/AddedDeductedPointsNotificationPolicy.md @@ -0,0 +1,12 @@ +# # AddedDeductedPointsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | +**scopes** | **string[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Application.md b/docs/Model/Application.md index 61b50724..a7074249 100644 --- a/docs/Model/Application.md +++ b/docs/Model/Application.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **accountId** | **int** | The ID of the account that owns this entity. | **name** | **string** | The name of this application. | **description** | **string** | A longer description of the application. | [optional] @@ -19,7 +19,7 @@ Name | Type | Description | Notes **exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder'] **defaultDiscountScope** | **string** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional] -**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). | [optional] +**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional] **attributesSettings** | [**\TalonOne\Client\Model\AttributesSettings**](AttributesSettings.md) | | [optional] **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **enablePartialDiscounts** | **bool** | Indicates if this Application supports partial discounts. | [optional] diff --git a/docs/Model/ApplicationApiHealth.md b/docs/Model/ApplicationApiHealth.md index a536cace..ac3db867 100644 --- a/docs/Model/ApplicationApiHealth.md +++ b/docs/Model/ApplicationApiHealth.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**summary** | **string** | One-word summary of the health of the API connection of an application. | +**summary** | **string** | One-word summary of the health of the API connection of an application. Possible values are: - `OK`: The Application has received only successful API requests in the last 5 minutes. - `WARNING`: The Application received at least one failed request in the last 50 minutes. - `ERROR`: More than 50% of received requests failed. - `CRITICAL`: All received requests failed. - `NONE`: During the last 5 minutes, the Application hasn't recorded any integration API requests. | **lastUsed** | [**\DateTime**](\DateTime.md) | time of last request relevant to the API health test. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ApplicationCustomer.md b/docs/Model/ApplicationCustomer.md index 60d8fe4c..889f9e4f 100644 --- a/docs/Model/ApplicationCustomer.md +++ b/docs/Model/ApplicationCustomer.md @@ -4,16 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. The exact moment this entity was created. The exact moment this entity was created. The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. The time this entity was created. The time this entity was created. | **integrationId** | **string** | The integration ID set by your integration layer. The integration ID set by your integration layer. | **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | **accountId** | **int** | The ID of the Talon.One account that owns this profile. The ID of the Talon.One account that owns this profile. | **closedSessions** | **int** | The total amount of closed sessions by a customer. A closed session is a successful purchase. | -**totalSales** | **float** | Sum of all purchases made by this customer. | +**totalSales** | **float** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. | **loyaltyMemberships** | [**\TalonOne\Client\Model\LoyaltyMembership[]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] -**audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | A list of audiences the customer belongs to. | [optional] -**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api/#operation/createCouponReservation) for a customer doesn't impact this field. | +**audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | +**sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional] **advocateIntegrationId** | **string** | The Integration ID of the Customer Profile that referred this Customer in the Application. | [optional] [[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/ApplicationEvent.md b/docs/Model/ApplicationEvent.md index 11d46c27..eebec9fe 100644 --- a/docs/Model/ApplicationEvent.md +++ b/docs/Model/ApplicationEvent.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **int** | The globally unique Talon.One ID of the customer that created this entity. | [optional] **sessionId** | **int** | The globally unique Talon.One ID of the session that contains this event. | [optional] **type** | **string** | A string representing the event. Must not be a reserved event name. | **attributes** | [**object**](.md) | Additional JSON serialized data associated with the event. | -**effects** | **object[]** | An array containing the effects that were applied as a result of this event. | +**effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | 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/ApplicationSession.md b/docs/Model/ApplicationSession.md index 0f7946be..bf72efad 100644 --- a/docs/Model/ApplicationSession.md +++ b/docs/Model/ApplicationSession.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **int** | The globally unique Talon.One ID of the customer that created this entity. | [optional] **integrationId** | **string** | The integration ID set by your integration layer. | **profileintegrationid** | **string** | Integration ID of the customer for the session. | [optional] **coupon** | **string** | Any coupon code entered. | **referral** | **string** | Any referral code entered. | -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). | +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | Serialized JSON representation. | **discounts** | **map[string,float]** | **API V1 only.** A map of labeled discount values, in the same currency as the session. If you are using the V2 endpoints, refer to the `totalDiscounts` property instead. | **totalDiscounts** | **float** | The total sum of the discounts applied to this session. | diff --git a/docs/Model/Attribute.md b/docs/Model/Attribute.md index 0695f171..6c471869 100644 --- a/docs/Model/Attribute.md +++ b/docs/Model/Attribute.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | **entity** | **string** | The name of the entity that can have this attribute. When creating or updating the entities of a given type, you can include an `attributes` object with keys corresponding to the `name` of the custom attributes for that type. | **eventType** | **string** | | [optional] diff --git a/docs/Model/Audience.md b/docs/Model/Audience.md index 7344ea9e..26b57549 100644 --- a/docs/Model/Audience.md +++ b/docs/Model/Audience.md @@ -5,14 +5,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **accountId** | **int** | The ID of the account that owns this entity. | -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **name** | **string** | The human-friendly display name for this audience. | **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **description** | **string** | A description of the audience. | [optional] **integration** | **string** | The Talon.One-supported [3rd-party platform](https://docs.talon.one/docs/dev/technology-partners/overview) that this audience was created in. For example, `mParticle`, `Segment`, `Selligent`, `Braze`, or `Iterable`. **Note:** If you do not integrate with any of these platforms, do not use this property. | [optional] **integrationId** | **string** | The ID of this audience in the third-party integration. **Note:** To create an audience that doesn't come from a 3rd party platform, do not use this property. | [optional] **createdIn3rdParty** | **bool** | Determines if this audience is a 3rd party audience or not. | [optional] +**lastUpdate** | [**\DateTime**](\DateTime.md) | The last time that the audience memberships changed. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/AudienceCustomer.md b/docs/Model/AudienceCustomer.md new file mode 100644 index 00000000..e6134238 --- /dev/null +++ b/docs/Model/AudienceCustomer.md @@ -0,0 +1,23 @@ +# # AudienceCustomer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. | +**integrationId** | **string** | The integration ID set by your integration layer. | +**attributes** | [**object**](.md) | Arbitrary properties associated with this item. | +**accountId** | **int** | The ID of the Talon.One account that owns this profile. | +**closedSessions** | **int** | The total amount of closed sessions by a customer. A closed session is a successful purchase. | +**totalSales** | **float** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. | +**loyaltyMemberships** | [**\TalonOne\Client\Model\LoyaltyMembership[]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] +**audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | +**sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional] +**connectedApplicationsIds** | **int[]** | A list of the IDs of the Applications that are connected to this customer profile. | [optional] +**connectedAudiences** | **int[]** | A list of the IDs of the audiences that are connected to this customer profile. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/BaseLoyaltyProgram.md b/docs/Model/BaseLoyaltyProgram.md index 777cb1c2..574abf65 100644 --- a/docs/Model/BaseLoyaltyProgram.md +++ b/docs/Model/BaseLoyaltyProgram.md @@ -7,10 +7,11 @@ Name | Type | Description | Notes **title** | **string** | The display title for the Loyalty Program. | [optional] **description** | **string** | Description of our Loyalty Program. | [optional] **subscribedApplications** | **int[]** | A list containing the IDs of all applications that are subscribed to this Loyalty Program. | [optional] -**defaultValidity** | **string** | Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. | [optional] -**defaultPending** | **string** | Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. | [optional] +**defaultValidity** | **string** | The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | [optional] +**defaultPending** | **string** | The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | [optional] **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | [optional] **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] +**sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/BaseNotification.md b/docs/Model/BaseNotification.md new file mode 100644 index 00000000..ce1b9bb1 --- /dev/null +++ b/docs/Model/BaseNotification.md @@ -0,0 +1,13 @@ +# # BaseNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**policy** | [**object**](.md) | | +**webhook** | [**\TalonOne\Client\Model\BaseNotificationWebhook**](BaseNotificationWebhook.md) | | +**id** | **int** | Unique ID for this entity. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/BaseNotificationEntity.md b/docs/Model/BaseNotificationEntity.md new file mode 100644 index 00000000..1bc4cb9d --- /dev/null +++ b/docs/Model/BaseNotificationEntity.md @@ -0,0 +1,11 @@ +# # BaseNotificationEntity + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**policy** | [**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/BaseNotificationWebhook.md b/docs/Model/BaseNotificationWebhook.md new file mode 100644 index 00000000..cd162a0c --- /dev/null +++ b/docs/Model/BaseNotificationWebhook.md @@ -0,0 +1,15 @@ +# # BaseNotificationWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | +**url** | **string** | API URL for the given webhook-based notification. | +**headers** | **string[]** | List of API HTTP headers for the given webhook-based notification. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/BaseNotifications.md b/docs/Model/BaseNotifications.md new file mode 100644 index 00000000..ab5e76cb --- /dev/null +++ b/docs/Model/BaseNotifications.md @@ -0,0 +1,11 @@ +# # BaseNotifications + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\TalonOne\Client\Model\BaseNotification[]**](BaseNotification.md) | List of notifications. | [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/Campaign.md b/docs/Model/Campaign.md index de26fb53..720b2ffa 100644 --- a/docs/Model/Campaign.md +++ b/docs/Model/Campaign.md @@ -7,20 +7,20 @@ Name | Type | Description | Notes **id** | **int** | Unique ID for this entity. | **created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | -**userId** | **int** | The ID of the account that owns this entity. | +**userId** | **int** | The ID of the user associated with this entity. | **name** | **string** | A user-facing name for this campaign. | **description** | **string** | A detailed description of the campaign. | **startTime** | [**\DateTime**](\DateTime.md) | Timestamp when the campaign will become active. | [optional] **endTime** | [**\DateTime**](\DateTime.md) | Timestamp the campaign will become inactive. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] -**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api/#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] **tags** | **string[]** | A list of tags for the campaign. | **features** | **string[]** | The features enabled in this campaign. | **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] -**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/) for this campaign. | -**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this campaign belongs to. | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] **couponRedemptionCount** | **int** | Number of coupons redeemed in the campaign. | [optional] **referralRedemptionCount** | **int** | Number of referral codes redeemed in the campaign. | [optional] **discountCount** | **float** | Total amount of discounts redeemed in the campaign. | [optional] @@ -35,6 +35,7 @@ Name | Type | Description | Notes **redeemedLoyaltyPointsCount** | **float** | Total number of loyalty points redeemed by rules in this campaign. | [optional] **redeemedLoyaltyPointsEffectCount** | **int** | Total number of loyalty point redemption effects triggered by rules in this campaign. | [optional] **callApiEffectCount** | **int** | Total number of webhook triggered by rules in this campaign. | [optional] +**reservecouponEffectCount** | **int** | Total number of reserve coupon effects triggered by rules in this campaign. | [optional] **lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received by this campaign. | [optional] **updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign's property. Updates to external entities used in this campaign are **not** registered by this property, such as collection or coupon updates. | [optional] **createdBy** | **string** | Name of the user who created this campaign if available. | [optional] diff --git a/docs/Model/CampaignCollection.md b/docs/Model/CampaignCollection.md index 02cf440a..da8757b4 100644 --- a/docs/Model/CampaignCollection.md +++ b/docs/Model/CampaignCollection.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **description** | **string** | A short description of the purpose of this collection. | [optional] **name** | **string** | The name of this collection. | **modifiedBy** | **int** | ID of the user who last updated this effect if available. | [optional] diff --git a/docs/Model/CampaignCollectionWithoutPayload.md b/docs/Model/CampaignCollectionWithoutPayload.md index 5a2671a9..3fcdea47 100644 --- a/docs/Model/CampaignCollectionWithoutPayload.md +++ b/docs/Model/CampaignCollectionWithoutPayload.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **description** | **string** | A short description of the purpose of this collection. | [optional] **name** | **string** | The name of this collection. | **modifiedBy** | **int** | ID of the user who last updated this effect if available. | [optional] diff --git a/docs/Model/CampaignCreatedNotification.md b/docs/Model/CampaignCreatedNotification.md index 1b5181b8..0f16e04d 100644 --- a/docs/Model/CampaignCreatedNotification.md +++ b/docs/Model/CampaignCreatedNotification.md @@ -4,7 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | +**campaign** | [**Campaign**](Campaign.md) | | +**ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] +**priority** | [**\TalonOne\Client\Model\PriorityPosition**](PriorityPosition.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignDeletedNotification.md b/docs/Model/CampaignDeletedNotification.md index c03ca6d6..8ad96511 100644 --- a/docs/Model/CampaignDeletedNotification.md +++ b/docs/Model/CampaignDeletedNotification.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | +**campaign** | [**Campaign**](Campaign.md) | | +**deletedAt** | [**\DateTime**](\DateTime.md) | Time when the campaign was deleted. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignEditedNotification.md b/docs/Model/CampaignEditedNotification.md index 45af845b..81c97510 100644 --- a/docs/Model/CampaignEditedNotification.md +++ b/docs/Model/CampaignEditedNotification.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | -**oldCampaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | +**campaign** | [**Campaign**](Campaign.md) | | +**oldCampaign** | [**Campaign**](Campaign.md) | | +**ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignGroup.md b/docs/Model/CampaignGroup.md index aabcf2fc..87bd9128 100644 --- a/docs/Model/CampaignGroup.md +++ b/docs/Model/CampaignGroup.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **accountId** | **int** | The ID of the account that owns this entity. | **name** | **string** | The name of this campaign group. | **description** | **string** | A longer description of the campaign group. | [optional] diff --git a/docs/Model/CampaignPrioritiesChangedNotification.md b/docs/Model/CampaignPrioritiesChangedNotification.md index 2d02b122..dddfe744 100644 --- a/docs/Model/CampaignPrioritiesChangedNotification.md +++ b/docs/Model/CampaignPrioritiesChangedNotification.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**application** | [**\TalonOne\Client\Model\Application**](Application.md) | | -**oldPriorities** | [**map[string,int[]]**](array.md) | Campaign IDs for each priority. The priority can be one of: ['universal', 'stackable', 'exclusive'] | [optional] -**priorities** | [**map[string,int[]]**](array.md) | Campaign IDs for each priority. The priority can be one of: ['universal', 'stackable', 'exclusive'] | +**applicationId** | **int** | The ID of the Application whose campaigns' priorities changed. | +**oldPriorities** | [**\TalonOne\Client\Model\CampaignSet**](CampaignSet.md) | | [optional] +**priorities** | [**\TalonOne\Client\Model\CampaignSet**](CampaignSet.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignRulesetChangedNotification.md b/docs/Model/CampaignRulesetChangedNotification.md index e3ad42e9..12e2601d 100644 --- a/docs/Model/CampaignRulesetChangedNotification.md +++ b/docs/Model/CampaignRulesetChangedNotification.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**campaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | +**campaign** | [**Campaign**](Campaign.md) | | **oldRuleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] -**ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | +**ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignSet.md b/docs/Model/CampaignSet.md index 2baf7280..371c02b7 100644 --- a/docs/Model/CampaignSet.md +++ b/docs/Model/CampaignSet.md @@ -4,11 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **version** | **int** | Version of the campaign set. | **set** | [**\TalonOne\Client\Model\CampaignSetBranchNode**](CampaignSetBranchNode.md) | | +**updatedBy** | **string** | Name of the user who last updated this campaign set, if available. | [optional] [[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/CampaignSetV2.md b/docs/Model/CampaignSetV2.md index 3137ec21..1f3c31a6 100644 --- a/docs/Model/CampaignSetV2.md +++ b/docs/Model/CampaignSetV2.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **version** | **int** | Version of the campaign set. | **set** | [**\TalonOne\Client\Model\CampaignPrioritiesV2**](CampaignPrioritiesV2.md) | | diff --git a/docs/Model/CampaignStateChangedNotification.md b/docs/Model/CampaignStateChangedNotification.md index 71670821..a513b60a 100644 --- a/docs/Model/CampaignStateChangedNotification.md +++ b/docs/Model/CampaignStateChangedNotification.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **campaign** | [**\TalonOne\Client\Model\Campaign**](Campaign.md) | | **oldState** | **string** | The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | **newState** | **string** | The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | +**ruleset** | [**\TalonOne\Client\Model\Ruleset**](Ruleset.md) | | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CampaignTemplate.md b/docs/Model/CampaignTemplate.md index acdc59fa..20d2b50c 100644 --- a/docs/Model/CampaignTemplate.md +++ b/docs/Model/CampaignTemplate.md @@ -4,29 +4,29 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time 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. | +**userId** | **int** | The ID of the user associated with this entity. | **name** | **string** | The campaign template name. | **description** | **string** | Customer-facing text that explains the objective of the template. | **instructions** | **string** | Customer-facing text that explains how to use the template. For example, you can use this property to explain the available attributes of this template, and how they can be modified when a user uses this template to create a new campaign. | -**campaignAttributes** | [**object**](.md) | The Campaign Attributes that Campaigns created from this template will have by default. | [optional] -**couponAttributes** | [**object**](.md) | The Campaign Attributes that Coupons created from this template will have by default. | [optional] -**state** | **string** | Only Campaign Templates in 'available' state may be used to create Campaigns. | -**activeRulesetId** | **int** | The ID of the Ruleset this Campaign Template will use. | [optional] +**campaignAttributes** | [**object**](.md) | The campaign attributes that campaigns created from this template will have by default. | [optional] +**couponAttributes** | [**object**](.md) | The campaign attributes that coupons created from this template will have by default. | [optional] +**state** | **string** | Only campaign templates in 'available' state may be used to create campaigns. | +**activeRulesetId** | **int** | The ID of the ruleset this campaign template will use. | [optional] **tags** | **string[]** | A list of tags for the campaign template. | [optional] **features** | **string[]** | A list of features for the campaign template. | [optional] **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] -**limits** | [**\TalonOne\Client\Model\TemplateLimitConfig[]**](TemplateLimitConfig.md) | The set of limits that will operate for this campaign template. | [optional] -**templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Template parameters are fields which can be used to replace values in a rule. | [optional] -**applicationsIds** | **int[]** | A list of the IDs of the applications that are subscribed to this campaign template. A list of the IDs of the applications that are subscribed to this campaign template. | +**limits** | [**\TalonOne\Client\Model\TemplateLimitConfig[]**](TemplateLimitConfig.md) | The set of limits that operate for this campaign template. | [optional] +**templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional] +**applicationsIds** | **int[]** | A list of IDs of the Applications that are subscribed to this campaign template. | **campaignCollections** | [**\TalonOne\Client\Model\CampaignTemplateCollection[]**](CampaignTemplateCollection.md) | The campaign collections from the blueprint campaign for the template. | [optional] -**defaultCampaignGroupId** | **int** | The default campaignGroupId. | [optional] +**defaultCampaignGroupId** | **int** | The default campaign group ID. | [optional] **updated** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the campaign template or any of its elements. | [optional] -**updatedBy** | **string** | Name of the user who last updated this campaign template if available. | [optional] -**validApplicationIds** | **int[]** | The IDs of the applications that are related to this entity. | +**updatedBy** | **string** | Name of the user who last updated this campaign template, if available. | [optional] +**validApplicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | [[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/CardLedgerTransactionLogEntry.md b/docs/Model/CardLedgerTransactionLogEntry.md index 49e72907..40621d29 100644 --- a/docs/Model/CardLedgerTransactionLogEntry.md +++ b/docs/Model/CardLedgerTransactionLogEntry.md @@ -6,13 +6,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty card transaction occurred. | **programId** | **int** | ID of the loyalty program. | -**cardIdentifier** | **string** | Identifier of the loyalty card. | +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | **applicationId** | **int** | The ID of the Application that owns this entity. | [optional] **sessionId** | **int** | The **internal** ID of the session. | [optional] -**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | -**type** | **string** | Type of transaction. Possible values are: - `addition`: Points were added. - `subtraction`: Points were subtracted. | +**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | [optional] +**type** | **string** | Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. | **name** | **string** | Name or reason of the loyalty ledger transaction. | -**startDate** | **string** | Date when points become active. Possible values are: - `immediate`: Points are active immediately. - `timestamp value`: Points become active from the given date. | +**startDate** | **string** | When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time. | **expiryDate** | **string** | Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points become active from the given date. | **subledgerId** | **string** | ID of the subledger. | **amount** | **float** | Amount of loyalty points added or deducted in the transaction. | diff --git a/docs/Model/CardLedgerTransactionLogEntryIntegrationAPI.md b/docs/Model/CardLedgerTransactionLogEntryIntegrationAPI.md index 1f9f654f..70495919 100644 --- a/docs/Model/CardLedgerTransactionLogEntryIntegrationAPI.md +++ b/docs/Model/CardLedgerTransactionLogEntryIntegrationAPI.md @@ -6,11 +6,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty card transaction occurred. | **programId** | **int** | ID of the loyalty program. | -**cardIdentifier** | **string** | Identifier of the loyalty card. | -**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | -**type** | **string** | Type of transaction. Possible values are: - `addition`: Points were added. - `subtraction`: Points were subtracted. | +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | +**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | [optional] +**type** | **string** | Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. | **name** | **string** | Name or reason of the loyalty ledger transaction. | -**startDate** | **string** | Date when points become active. Possible values are: - `immediate`: Points are active immediately. - `timestamp value`: Points become active from the given date. | +**startDate** | **string** | When points become active. Possible values: - `immediate`: Points are active immediately. - a timestamp value: Points become active at a given date and time. | **expiryDate** | **string** | Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date. | **subledgerId** | **string** | ID of the subledger. | **amount** | **float** | Amount of loyalty points added or deducted in the transaction. | diff --git a/docs/Model/CartItem.md b/docs/Model/CartItem.md index 8493fc1f..caebb05a 100644 --- a/docs/Model/CartItem.md +++ b/docs/Model/CartItem.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | Name of item. | +**name** | **string** | Name of item. | [optional] **sku** | **string** | Stock keeping unit of item. | -**quantity** | **int** | Quantity of item. **Important:** If you enabled [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items), the quantity is always one and the same cart item might receive multiple per-item discounts. Ensure you can process multiple discounts on one cart item correctly. | +**quantity** | **int** | Quantity of item. **Important:** If you enabled [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening), the quantity is always one and the same cart item might receive multiple per-item discounts. Ensure you can process multiple discounts on one cart item correctly. | **returnedQuantity** | **int** | Number of returned items, calculated internally based on returns of this item. | [optional] **remainingQuantity** | **int** | Remaining quantity of the item, calculated internally based on returns of this item. | [optional] -**price** | **float** | Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/). If it is part of a catalog, setting a price here overrides the price from the catalog. | +**price** | **float** | Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). If it is part of a catalog, setting a price here overrides the price from the catalog. | [optional] **category** | **string** | Type, group or model of the item. | [optional] **weight** | **float** | Weight of item in grams. | [optional] **height** | **float** | Height of item in mm. | [optional] @@ -17,7 +17,7 @@ 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) | Use this property to set a value for the attributes of your choice. [Attributes](https://docs.talon.one/docs/dev/concepts/attributes) represent any information to attach to this cart item. Custom _cart item_ attributes must be created in the Campaign Manager before you set them with this property. | [optional] -**additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs/). | [optional] +**additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] **catalogItemID** | **int** | The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-cart-item-catalogs). | [optional] [[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/Catalog.md b/docs/Model/Catalog.md index 29492cfb..3064111f 100644 --- a/docs/Model/Catalog.md +++ b/docs/Model/Catalog.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **name** | **string** | The cart item catalog name. | **description** | **string** | A description of this cart item catalog. | **subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that are subscribed to this catalog. | [optional] diff --git a/docs/Model/CatalogItem.md b/docs/Model/CatalogItem.md index 938a9bca..7209942d 100644 --- a/docs/Model/CatalogItem.md +++ b/docs/Model/CatalogItem.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **sku** | **string** | The stock keeping unit of the item. | **price** | **float** | Price of the item. | [optional] **catalogid** | **int** | The ID of the catalog the item belongs to. | diff --git a/docs/Model/CatalogsStrikethroughNotificationPolicy.md b/docs/Model/CatalogsStrikethroughNotificationPolicy.md new file mode 100644 index 00000000..0d700ccc --- /dev/null +++ b/docs/Model/CatalogsStrikethroughNotificationPolicy.md @@ -0,0 +1,11 @@ +# # CatalogsStrikethroughNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Change.md b/docs/Model/Change.md index 80886e46..c3d23178 100644 --- a/docs/Model/Change.md +++ b/docs/Model/Change.md @@ -4,13 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**userId** | **int** | The ID of the account that owns this entity. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**userId** | **int** | The ID of the user associated with 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] +**managementKeyId** | **int** | ID of management key used to perform changes. | [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/CodeGeneratorSettings.md b/docs/Model/CodeGeneratorSettings.md index 7be4e96f..14ec52f9 100644 --- a/docs/Model/CodeGeneratorSettings.md +++ b/docs/Model/CodeGeneratorSettings.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**validCharacters** | **string[]** | List of characters used to generate the random parts of a code. Defaults to a list equivalent to the `[A-Z, 0-9]` regexp. | +**validCharacters** | **string[]** | List of characters used to generate the random parts of a code. | **couponPattern** | **string** | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [[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/Collection.md b/docs/Model/Collection.md index dc6cd0a4..a0bc41e5 100644 --- a/docs/Model/Collection.md +++ b/docs/Model/Collection.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **description** | **string** | A short description of the purpose of this collection. | [optional] **subscribedApplicationsIds** | **int[]** | A list of the IDs of the Applications where this collection is enabled. | [optional] **name** | **string** | The name of this collection. | diff --git a/docs/Model/CollectionWithoutPayload.md b/docs/Model/CollectionWithoutPayload.md index 3628f585..74732be3 100644 --- a/docs/Model/CollectionWithoutPayload.md +++ b/docs/Model/CollectionWithoutPayload.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **description** | **string** | A short description of the purpose of this collection. | [optional] **subscribedApplicationsIds** | **int[]** | A list of the IDs of the Applications where this collection is enabled. | [optional] **name** | **string** | The name of this collection. | diff --git a/docs/Model/Coupon.md b/docs/Model/Coupon.md index e29ef950..0f6011a3 100644 --- a/docs/Model/Coupon.md +++ b/docs/Model/Coupon.md @@ -4,24 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **campaignId** | **int** | The ID of the campaign that owns this entity. | **value** | **string** | The coupon code. | **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] -**usageCounter** | **int** | The number of times this coupon has been successfully used. | +**usageCounter** | **int** | The number of times the coupon has been successfully redeemed. | **discountCounter** | **float** | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] **discountRemainder** | **float** | The remaining discount this coupon can give. | [optional] +**reservationCounter** | **float** | The number of times this coupon has been reserved. | [optional] **attributes** | [**object**](.md) | Custom attributes associated with this coupon. | [optional] **referralId** | **int** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **recipientIntegrationId** | **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **importId** | **int** | The ID of the Import which created this coupon. | [optional] -**reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation endpoint](/integration-api/#operation/createCouponReservation). - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons endpoint](/management-api/#operation/createCoupons) or [Create coupons for multiple recipients endpoint](/management-api/#operation/createCouponsForMultipleRecipients). | [optional] [default to true] +**reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] **batchId** | **string** | The id of the batch the coupon belongs to. | [optional] +**isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] [[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/CouponConstraints.md b/docs/Model/CouponConstraints.md index 17bea9d5..98e4a5c6 100644 --- a/docs/Model/CouponConstraints.md +++ b/docs/Model/CouponConstraints.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | [optional] -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [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/CouponCreationJob.md b/docs/Model/CouponCreationJob.md index f66ecb6a..98177fb2 100644 --- a/docs/Model/CouponCreationJob.md +++ b/docs/Model/CouponCreationJob.md @@ -4,16 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **campaignId** | **int** | The ID of the campaign that owns this entity. | **applicationId** | **int** | The ID of the application that owns this entity. | **accountId** | **int** | The ID of the account that owns this entity. | **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] -**numberOfCoupons** | **int** | The number of new coupon codes to generate for the campaign. Must be between 20,001 and 5,000,000. | +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**numberOfCoupons** | **int** | The number of new coupon codes to generate for the campaign. | **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with coupons. | **batchId** | **string** | The batch ID coupons created by this job will bear. | diff --git a/docs/Model/CouponsNotificationPolicy.md b/docs/Model/CouponsNotificationPolicy.md new file mode 100644 index 00000000..07130877 --- /dev/null +++ b/docs/Model/CouponsNotificationPolicy.md @@ -0,0 +1,12 @@ +# # CouponsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | +**scopes** | **string[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CreateManagementKey.md b/docs/Model/CreateManagementKey.md index 34e8a793..4d7afb8e 100644 --- a/docs/Model/CreateManagementKey.md +++ b/docs/Model/CreateManagementKey.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **name** | **string** | Name for management key. | **expiryDate** | [**\DateTime**](\DateTime.md) | The date the management key expires. | **endpoints** | [**\TalonOne\Client\Model\Endpoint[]**](Endpoint.md) | The list of endpoints that can be accessed with the key | +**allowedApplicationIds** | **int[]** | A list of Application IDs that you can access with the management key. An empty or missing list means the management key can be used for all Applications in the account. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CreateTemplateCampaign.md b/docs/Model/CreateTemplateCampaign.md index 6fc9f7df..92b0afa7 100644 --- a/docs/Model/CreateTemplateCampaign.md +++ b/docs/Model/CreateTemplateCampaign.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **campaignAttributesOverrides** | [**object**](.md) | Custom Campaign Attributes. If the Campaign Template defines the same values, they will be overridden. | [optional] **templateParamValues** | [**\TalonOne\Client\Model\Binding[]**](Binding.md) | Actual values to replace the template placeholder values in the Ruleset bindings. Values for all Template Parameters must be provided. | [optional] **limitOverrides** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits for this Campaign. If the Campaign Template or Application define default values for the same limits, they will be overridden. | [optional] -**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this campaign belongs to. | [optional] +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] **tags** | **string[]** | A list of tags for the campaign. If the campaign template has tags, they will be overridden by this list. | [optional] [[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/CustomEffect.md b/docs/Model/CustomEffect.md index 342eaa9a..ba53d57b 100644 --- a/docs/Model/CustomEffect.md +++ b/docs/Model/CustomEffect.md @@ -4,11 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | -**applicationIds** | **int[]** | The IDs of the applications that are related to this entity. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | +**isPerItem** | **bool** | Indicates if this effect is per item or not. | [optional] **name** | **string** | The name of this effect. | **title** | **string** | The title of this effect. | **payload** | **string** | The JSON payload of this effect. | diff --git a/docs/Model/CustomEffectProps.md b/docs/Model/CustomEffectProps.md index bf0ad79f..997b4f27 100644 --- a/docs/Model/CustomEffectProps.md +++ b/docs/Model/CustomEffectProps.md @@ -6,6 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **effectId** | **int** | The ID of the custom effect that was triggered. | **name** | **string** | The type of the custom effect. | +**cartItemPosition** | **float** | The index of the item in the cart item list to which the custom effect is applied. | [optional] +**cartItemSubPosition** | **float** | When cart item flattening is enabled, the sub position indicates to which item unit the custom effect is applied, for cart items with quantity > 1. | [optional] +**bundleIndex** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional] +**bundleName** | **string** | The name of the bundle definition. | [optional] **payload** | [**object**](.md) | The JSON payload of the custom effect. | [[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/CustomerActivityReport.md b/docs/Model/CustomerActivityReport.md index 9168b592..5608bd35 100644 --- a/docs/Model/CustomerActivityReport.md +++ b/docs/Model/CustomerActivityReport.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **integrationId** | **string** | The integration ID set by your integration layer. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **name** | **string** | The name for this customer profile. | **customerId** | **int** | The internal Talon.One ID of the customer. | **lastActivity** | [**\DateTime**](\DateTime.md) | The last activity of the customer. | [optional] diff --git a/docs/Model/CustomerProfile.md b/docs/Model/CustomerProfile.md index ef26ef69..4fa4f884 100644 --- a/docs/Model/CustomerProfile.md +++ b/docs/Model/CustomerProfile.md @@ -4,16 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. | **integrationId** | **string** | The integration ID set by your integration layer. | **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | **accountId** | **int** | The ID of the Talon.One account that owns this profile. | **closedSessions** | **int** | The total amount of closed sessions by a customer. A closed session is a successful purchase. | -**totalSales** | **float** | Sum of all purchases made by this customer. | +**totalSales** | **float** | The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. | **loyaltyMemberships** | [**\TalonOne\Client\Model\LoyaltyMembership[]**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] -**audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | A list of audiences the customer belongs to. | [optional] -**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api/#operation/createCouponReservation) for a customer doesn't impact this field. | +**audienceMemberships** | [**\TalonOne\Client\Model\AudienceMembership[]**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] +**lastActivity** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. | +**sandbox** | **bool** | Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/CustomerProfileIntegrationRequestV2.md b/docs/Model/CustomerProfileIntegrationRequestV2.md index fe21dbb7..b76ca1b5 100644 --- a/docs/Model/CustomerProfileIntegrationRequestV2.md +++ b/docs/Model/CustomerProfileIntegrationRequestV2.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] +**evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] **audiencesChanges** | [**\TalonOne\Client\Model\ProfileAudiencesChanges**](ProfileAudiencesChanges.md) | | [optional] -**responseContent** | **string[]** | Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. **Note:** `ruleFailureReasons` is always part of the response when the [Application type](https://docs.talon.one/docs/product/applications/overview#application-types) is `sandbox`. | [optional] +**responseContent** | **string[]** | Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer profile_ request instead of sending extra requests to other endpoints. | [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/CustomerProfileUpdateV2Response.md b/docs/Model/CustomerProfileUpdateV2Response.md new file mode 100644 index 00000000..9dffa2da --- /dev/null +++ b/docs/Model/CustomerProfileUpdateV2Response.md @@ -0,0 +1,11 @@ +# # CustomerProfileUpdateV2Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**customerProfile** | [**\TalonOne\Client\Model\CustomerProfile**](CustomerProfile.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/CustomerSession.md b/docs/Model/CustomerSession.md index c2f73e0b..2e8fb826 100644 --- a/docs/Model/CustomerSession.md +++ b/docs/Model/CustomerSession.md @@ -5,14 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **integrationId** | **string** | The integration ID set by your integration layer. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | **coupon** | **string** | Any coupon code entered. | **referral** | **string** | Any referral code entered. | -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). | [default to 'open'] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [default to 'open'] **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | Serialized JSON representation. | -**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). | [optional] +**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). | [optional] **total** | **float** | The total sum of the cart in one session. | **attributes** | [**object**](.md) | A key-value map of the sessions attributes. The potentially valid attributes are configured in your accounts developer settings. | **firstSession** | **bool** | Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions. | diff --git a/docs/Model/CustomerSessionV2.md b/docs/Model/CustomerSessionV2.md index 9b13ddab..477d0a7c 100644 --- a/docs/Model/CustomerSessionV2.md +++ b/docs/Model/CustomerSessionV2.md @@ -4,18 +4,19 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. The time this entity was created. | **integrationId** | **string** | The integration ID set by your integration layer. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | +**evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] **couponCodes** | **string[]** | Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. | [optional] **referralCode** | **string** | Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. | [optional] **loyaltyCards** | **string[]** | Any loyalty cards used. | [optional] -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). | [default to 'open'] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [default to 'open'] **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | -**additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs/). | [optional] -**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). **Important**: If you [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains an identifier by the time you close it. | [optional] +**additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] +**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). | [optional] **attributes** | [**object**](.md) | Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property. | **firstSession** | **bool** | Indicates whether this is the first session for the customer's profile. Will always be true for anonymous sessions. | **total** | **float** | The total sum of cart-items, as well as additional costs, before any discounts applied. | diff --git a/docs/Model/DeductLoyaltyPoints.md b/docs/Model/DeductLoyaltyPoints.md new file mode 100644 index 00000000..097ac661 --- /dev/null +++ b/docs/Model/DeductLoyaltyPoints.md @@ -0,0 +1,14 @@ +# # DeductLoyaltyPoints + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**points** | **float** | Amount of loyalty points. | +**name** | **string** | Name / reason for the point deduction. | [optional] +**subledgerId** | **string** | ID of the subledger the points are deducted from. | [optional] +**applicationId** | **int** | ID of the Application that is connected to the loyalty program. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/DeductLoyaltyPointsEffectProps.md b/docs/Model/DeductLoyaltyPointsEffectProps.md index f998d0ae..253af0a1 100644 --- a/docs/Model/DeductLoyaltyPointsEffectProps.md +++ b/docs/Model/DeductLoyaltyPointsEffectProps.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **value** | **float** | The amount of points that were deducted. | **transactionUUID** | **string** | The identifier of this deduction in the loyalty ledger. | **name** | **string** | The name property gets one of the following two values. It can be the loyalty program name or it can represent a reason for the respective deduction of loyalty points. The latter is an optional value defined in a deduction rule. | -**cardIdentifier** | **string** | The card on which these points were added. | [optional] +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Effect.md b/docs/Model/Effect.md index 168a76b3..6b9c9a34 100644 --- a/docs/Model/Effect.md +++ b/docs/Model/Effect.md @@ -8,10 +8,10 @@ Name | Type | Description | Notes **rulesetId** | **int** | The ID of the ruleset that was active in the campaign when this effect was triggered. | **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. | +**effectType** | **string** | The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | **triggeredByCoupon** | **int** | The ID of the coupon that was being evaluated when this effect was triggered. | [optional] **triggeredForCatalogItem** | **int** | The ID of the catalog item that was being evaluated when this effect was triggered. | [optional] -**props** | [**object**](.md) | | +**props** | [**object**](.md) | The properties of the effect. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/EffectEntity.md b/docs/Model/EffectEntity.md index 1e854dfe..6885ae3c 100644 --- a/docs/Model/EffectEntity.md +++ b/docs/Model/EffectEntity.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **rulesetId** | **int** | The ID of the ruleset that was active in the campaign when this effect was triggered. | **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. | +**effectType** | **string** | The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | **triggeredByCoupon** | **int** | The ID of the coupon that was being evaluated when this effect was triggered. | [optional] **triggeredForCatalogItem** | **int** | The ID of the catalog item that was being evaluated when this effect was triggered. | [optional] diff --git a/docs/Model/Entity.md b/docs/Model/Entity.md index b3fd5792..d0660242 100644 --- a/docs/Model/Entity.md +++ b/docs/Model/Entity.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | [[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/Environment.md b/docs/Model/Environment.md index d500423c..6fe01532 100644 --- a/docs/Model/Environment.md +++ b/docs/Model/Environment.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **slots** | [**\TalonOne\Client\Model\SlotDef[]**](SlotDef.md) | The slots defined for this application. | **functions** | [**\TalonOne\Client\Model\FunctionDef[]**](FunctionDef.md) | The functions defined for this application. | diff --git a/docs/Model/EvaluableCampaignIds.md b/docs/Model/EvaluableCampaignIds.md new file mode 100644 index 00000000..18060fe4 --- /dev/null +++ b/docs/Model/EvaluableCampaignIds.md @@ -0,0 +1,11 @@ +# # EvaluableCampaignIds + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Event.md b/docs/Model/Event.md index 493b0560..78e97a76 100644 --- a/docs/Model/Event.md +++ b/docs/Model/Event.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] **type** | **string** | A string representing the event. Must not be a reserved event name. | **attributes** | [**object**](.md) | Arbitrary additional JSON data associated with the event. | **sessionId** | **string** | The ID of the session that this event occurred in. | [optional] -**effects** | **object[]** | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](/docs/dev/integration-api/api-effects). | +**effects** | **object[]** | An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | **ledgerEntries** | [**\TalonOne\Client\Model\LedgerEntry[]**](LedgerEntry.md) | Ledger entries for the event. | **meta** | [**\TalonOne\Client\Model\Meta**](Meta.md) | | [optional] diff --git a/docs/Model/EventType.md b/docs/Model/EventType.md index 43a9caa1..6ce8ef2f 100644 --- a/docs/Model/EventType.md +++ b/docs/Model/EventType.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**title** | **string** | The human-friendly display name for this event type. Use a short, past-tense, description of the event. | -**name** | **string** | The machine-friendly canonical name for this event type. This will be used in URLs, and cannot be changed after an event type has been created. | -**description** | **string** | An explanation of when the event type is triggered. Write this with a campaign manager in mind. For example: > The \"Payment Accepted\" event is triggered after successful processing of a payment by our payment gateway. | [optional] +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**title** | **string** | The human-friendly name for this event type. | +**name** | **string** | The integration name for this event type. This will be used in URLs and cannot be changed after an event type has been created. | +**description** | **string** | A description of what the event represents. | [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/EventV2.md b/docs/Model/EventV2.md index 7cc8e104..76e42f09 100644 --- a/docs/Model/EventV2.md +++ b/docs/Model/EventV2.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] -**type** | **string** | A string representing the event. Must not be a reserved event name. | -**attributes** | [**object**](.md) | Arbitrary additional JSON data associated with the event. | [optional] +**evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] +**type** | **string** | A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. | +**attributes** | [**object**](.md) | Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). | [optional] [[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/ExpiringPointsNotificationPolicy.md b/docs/Model/ExpiringPointsNotificationPolicy.md new file mode 100644 index 00000000..38b7d79f --- /dev/null +++ b/docs/Model/ExpiringPointsNotificationPolicy.md @@ -0,0 +1,12 @@ +# # ExpiringPointsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Notification name. | +**triggers** | [**\TalonOne\Client\Model\ExpiringPointsNotificationTrigger[]**](ExpiringPointsNotificationTrigger.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/ExpiringPointsNotificationTrigger.md b/docs/Model/ExpiringPointsNotificationTrigger.md new file mode 100644 index 00000000..caf00452 --- /dev/null +++ b/docs/Model/ExpiringPointsNotificationTrigger.md @@ -0,0 +1,12 @@ +# # ExpiringPointsNotificationTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **int** | The amount of period. | +**period** | **string** | Notification period indicated by a letter; \"w\" means week, \"d\" means day. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Export.md b/docs/Model/Export.md index 4fac527e..10fa7786 100644 --- a/docs/Model/Export.md +++ b/docs/Model/Export.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time 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. | +**userId** | **int** | The ID of the user associated with this entity. | **entity** | **string** | The name of the entity that was exported. | **filter** | [**object**](.md) | Map of keys and values that were used to filter the exported rows. | diff --git a/docs/Model/FeatureFlag.md b/docs/Model/FeatureFlag.md index a9090f62..7967b422 100644 --- a/docs/Model/FeatureFlag.md +++ b/docs/Model/FeatureFlag.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name for the featureflag. | -**value** | **string** | The value for the featureflag. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last created. | [optional] -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | [optional] +**name** | **string** | The name of the feature flag. | +**value** | **string** | The value of the feature flag. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was last created. | [optional] +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | [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/FrontendState.md b/docs/Model/FrontendState.md new file mode 100644 index 00000000..c108dd73 --- /dev/null +++ b/docs/Model/FrontendState.md @@ -0,0 +1,10 @@ +# # FrontendState + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[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/Giveaway.md b/docs/Model/Giveaway.md index 872c0836..f77ad143 100644 --- a/docs/Model/Giveaway.md +++ b/docs/Model/Giveaway.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **code** | **string** | The code value of this giveaway. | **poolId** | **int** | The ID of the pool to return giveaway codes from. | **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the giveaway becomes valid. | [optional] @@ -13,6 +13,8 @@ Name | Type | Description | Notes **attributes** | [**object**](.md) | Arbitrary properties associated with this giveaway. | [optional] **used** | **bool** | Indicates whether this giveaway code was given before. | [optional] **importId** | **int** | The ID of the Import which created this giveaway. | [optional] +**profileIntegrationId** | **string** | The third-party integration ID of the customer profile that was awarded the giveaway, if the giveaway was awarded. | [optional] +**profileId** | **int** | The internal ID of the customer profile that was awarded the giveaway, if the giveaway was awarded and an internal ID exists. | [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/GiveawaysPool.md b/docs/Model/GiveawaysPool.md index 9fe8c416..ec8c63d4 100644 --- a/docs/Model/GiveawaysPool.md +++ b/docs/Model/GiveawaysPool.md @@ -4,12 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **accountId** | **int** | The ID of the account that owns this entity. | **name** | **string** | The name of this giveaways pool. | **description** | **string** | The description of this giveaways pool. | [optional] **subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that this giveaways pool is enabled for. | [optional] +**sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | **modified** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update to the giveaways pool. | [optional] **createdBy** | **int** | ID of the user who created this giveaways pool. | **modifiedBy** | **int** | ID of the user who last updated this giveaways pool if available. | [optional] diff --git a/docs/Model/Import.md b/docs/Model/Import.md index fcb7dc67..78c679ec 100644 --- a/docs/Model/Import.md +++ b/docs/Model/Import.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time 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. | +**userId** | **int** | The ID of the user associated with this entity. | **entity** | **string** | The name of the entity that was imported. | **amount** | **int** | The number of values that were imported. | diff --git a/docs/Model/InlineResponse2001.md b/docs/Model/InlineResponse2001.md index 53da0fe2..1010e879 100644 --- a/docs/Model/InlineResponse2001.md +++ b/docs/Model/InlineResponse2001.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[]**](LedgerTransactionLogEntryIntegrationAPI.md) | | +**data** | [**\TalonOne\Client\Model\CardLedgerTransactionLogEntryIntegrationAPI[]**](CardLedgerTransactionLogEntryIntegrationAPI.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/InlineResponse20010.md b/docs/Model/InlineResponse20010.md index 8ffa7cc3..41cdbbec 100644 --- a/docs/Model/InlineResponse20010.md +++ b/docs/Model/InlineResponse20010.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\CollectionWithoutPayload[]**](CollectionWithoutPayload.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CampaignTemplate[]**](CampaignTemplate.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20011.md b/docs/Model/InlineResponse20011.md index 549a5a80..fc96adde 100644 --- a/docs/Model/InlineResponse20011.md +++ b/docs/Model/InlineResponse20011.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\CollectionItem[]**](CollectionItem.md) | | +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\LoyaltyProgram[]**](LoyaltyProgram.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20012.md b/docs/Model/InlineResponse20012.md index 218068ce..b729534c 100644 --- a/docs/Model/InlineResponse20012.md +++ b/docs/Model/InlineResponse20012.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\Collection[]**](Collection.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\LoyaltyProgramTransaction[]**](LoyaltyProgramTransaction.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20013.md b/docs/Model/InlineResponse20013.md index b99ba156..39879f94 100644 --- a/docs/Model/InlineResponse20013.md +++ b/docs/Model/InlineResponse20013.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | +**data** | [**\TalonOne\Client\Model\LoyaltyCard[]**](LoyaltyCard.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20014.md b/docs/Model/InlineResponse20014.md index a510120f..3626ed85 100644 --- a/docs/Model/InlineResponse20014.md +++ b/docs/Model/InlineResponse20014.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | +**hasMore** | **bool** | true means there is more data in the source collection to request.. | +**data** | [**\TalonOne\Client\Model\CardLedgerTransactionLogEntry[]**](CardLedgerTransactionLogEntry.md) | List of loyalty card transaction logs. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20015.md b/docs/Model/InlineResponse20015.md index 9a0f3615..530285f8 100644 --- a/docs/Model/InlineResponse20015.md +++ b/docs/Model/InlineResponse20015.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\CampaignAnalytics[]**](CampaignAnalytics.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\CollectionWithoutPayload[]**](CollectionWithoutPayload.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20016.md b/docs/Model/InlineResponse20016.md index 166b64c8..6ec3e58b 100644 --- a/docs/Model/InlineResponse20016.md +++ b/docs/Model/InlineResponse20016.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | [optional] -**hasMore** | **bool** | | [optional] -**data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CollectionItem[]**](CollectionItem.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20017.md b/docs/Model/InlineResponse20017.md index f00ae247..2dd30d74 100644 --- a/docs/Model/InlineResponse20017.md +++ b/docs/Model/InlineResponse20017.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\Collection[]**](Collection.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20018.md b/docs/Model/InlineResponse20018.md index 48ca0f81..7d061e06 100644 --- a/docs/Model/InlineResponse20018.md +++ b/docs/Model/InlineResponse20018.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\CustomerProfile[]**](CustomerProfile.md) | | +**data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20019.md b/docs/Model/InlineResponse20019.md index 51a200a7..75225bb0 100644 --- a/docs/Model/InlineResponse20019.md +++ b/docs/Model/InlineResponse20019.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\CustomerActivityReport[]**](CustomerActivityReport.md) | | +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\AccessLogEntry[]**](AccessLogEntry.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2002.md b/docs/Model/InlineResponse2002.md index 17077206..d7dfdfe1 100644 --- a/docs/Model/InlineResponse2002.md +++ b/docs/Model/InlineResponse2002.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Application[]**](Application.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[]**](LedgerTransactionLogEntryIntegrationAPI.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20020.md b/docs/Model/InlineResponse20020.md index 9424a819..8b27c316 100644 --- a/docs/Model/InlineResponse20020.md +++ b/docs/Model/InlineResponse20020.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | [optional] -**data** | [**\TalonOne\Client\Model\ApplicationSession[]**](ApplicationSession.md) | | +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\CampaignAnalytics[]**](CampaignAnalytics.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20021.md b/docs/Model/InlineResponse20021.md index 4bf5ae7b..05275f88 100644 --- a/docs/Model/InlineResponse20021.md +++ b/docs/Model/InlineResponse20021.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\ApplicationEvent[]**](ApplicationEvent.md) | | +**totalResultSize** | **int** | | [optional] +**hasMore** | **bool** | | [optional] +**data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20022.md b/docs/Model/InlineResponse20022.md index a9a2702c..28ace40b 100644 --- a/docs/Model/InlineResponse20022.md +++ b/docs/Model/InlineResponse20022.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | **string[]** | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\ApplicationCustomer[]**](ApplicationCustomer.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20023.md b/docs/Model/InlineResponse20023.md index 48efbca7..c9df127a 100644 --- a/docs/Model/InlineResponse20023.md +++ b/docs/Model/InlineResponse20023.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | [optional] **totalResultSize** | **int** | | [optional] -**data** | [**\TalonOne\Client\Model\Audience[]**](Audience.md) | | +**data** | [**\TalonOne\Client\Model\CustomerProfile[]**](CustomerProfile.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20024.md b/docs/Model/InlineResponse20024.md index 7fe2f70b..a7ff7486 100644 --- a/docs/Model/InlineResponse20024.md +++ b/docs/Model/InlineResponse20024.md @@ -5,8 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\ApplicationReferee[]**](ApplicationReferee.md) | | +**data** | [**\TalonOne\Client\Model\CustomerProfile[]**](CustomerProfile.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20025.md b/docs/Model/InlineResponse20025.md index f2ba6e16..de58dfdd 100644 --- a/docs/Model/InlineResponse20025.md +++ b/docs/Model/InlineResponse20025.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Attribute[]**](Attribute.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\CustomerActivityReport[]**](CustomerActivityReport.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20026.md b/docs/Model/InlineResponse20026.md index 1539f3c2..a3858d11 100644 --- a/docs/Model/InlineResponse20026.md +++ b/docs/Model/InlineResponse20026.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\AccountAdditionalCost[]**](AccountAdditionalCost.md) | | +**hasMore** | **bool** | | [optional] +**data** | [**\TalonOne\Client\Model\ApplicationSession[]**](ApplicationSession.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20027.md b/docs/Model/InlineResponse20027.md index a80767b9..513ccef8 100644 --- a/docs/Model/InlineResponse20027.md +++ b/docs/Model/InlineResponse20027.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Webhook[]**](Webhook.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\ApplicationEvent[]**](ApplicationEvent.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20028.md b/docs/Model/InlineResponse20028.md index 9e4411ad..c515043d 100644 --- a/docs/Model/InlineResponse20028.md +++ b/docs/Model/InlineResponse20028.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\WebhookActivationLogEntry[]**](WebhookActivationLogEntry.md) | | +**data** | **string[]** | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20029.md b/docs/Model/InlineResponse20029.md index 98a9b466..7372c29a 100644 --- a/docs/Model/InlineResponse20029.md +++ b/docs/Model/InlineResponse20029.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\WebhookLogEntry[]**](WebhookLogEntry.md) | | +**hasMore** | **bool** | | [optional] +**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/InlineResponse2003.md b/docs/Model/InlineResponse2003.md index fd4ec787..5ce408da 100644 --- a/docs/Model/InlineResponse2003.md +++ b/docs/Model/InlineResponse2003.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | +**data** | [**\TalonOne\Client\Model\Application[]**](Application.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20030.md b/docs/Model/InlineResponse20030.md index 549057e6..588e5446 100644 --- a/docs/Model/InlineResponse20030.md +++ b/docs/Model/InlineResponse20030.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\EventType[]**](EventType.md) | | +**hasMore** | **bool** | | [optional] +**totalResultSize** | **int** | | [optional] +**data** | [**\TalonOne\Client\Model\ApplicationReferee[]**](ApplicationReferee.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20031.md b/docs/Model/InlineResponse20031.md index 9242a239..bd2a8bca 100644 --- a/docs/Model/InlineResponse20031.md +++ b/docs/Model/InlineResponse20031.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\User[]**](User.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/InlineResponse20032.md b/docs/Model/InlineResponse20032.md index 1c7671eb..e7e6e303 100644 --- a/docs/Model/InlineResponse20032.md +++ b/docs/Model/InlineResponse20032.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\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/InlineResponse20033.md b/docs/Model/InlineResponse20033.md index b274a0dd..c85e6088 100644 --- a/docs/Model/InlineResponse20033.md +++ b/docs/Model/InlineResponse20033.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Export[]**](Export.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/InlineResponse20034.md b/docs/Model/InlineResponse20034.md index 6cfd828d..0f92f492 100644 --- a/docs/Model/InlineResponse20034.md +++ b/docs/Model/InlineResponse20034.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Role[]**](Role.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/InlineResponse20035.md b/docs/Model/InlineResponse20035.md new file mode 100644 index 00000000..08f13f5c --- /dev/null +++ b/docs/Model/InlineResponse20035.md @@ -0,0 +1,12 @@ +# # InlineResponse20035 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totalResultSize** | **int** | | +**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/InlineResponse20036.md b/docs/Model/InlineResponse20036.md new file mode 100644 index 00000000..3269ad1a --- /dev/null +++ b/docs/Model/InlineResponse20036.md @@ -0,0 +1,12 @@ +# # InlineResponse20036 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\EventType[]**](EventType.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse20037.md b/docs/Model/InlineResponse20037.md new file mode 100644 index 00000000..744a5ca4 --- /dev/null +++ b/docs/Model/InlineResponse20037.md @@ -0,0 +1,12 @@ +# # InlineResponse20037 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/InlineResponse20038.md b/docs/Model/InlineResponse20038.md new file mode 100644 index 00000000..b7ac2174 --- /dev/null +++ b/docs/Model/InlineResponse20038.md @@ -0,0 +1,13 @@ +# # InlineResponse20038 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**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/InlineResponse20039.md b/docs/Model/InlineResponse20039.md new file mode 100644 index 00000000..15f7193c --- /dev/null +++ b/docs/Model/InlineResponse20039.md @@ -0,0 +1,12 @@ +# # InlineResponse20039 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\Export[]**](Export.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse2004.md b/docs/Model/InlineResponse2004.md index 58f50934..b7e3da74 100644 --- a/docs/Model/InlineResponse2004.md +++ b/docs/Model/InlineResponse2004.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\NotificationWebhook[]**](NotificationWebhook.md) | | +**data** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse20040.md b/docs/Model/InlineResponse20040.md new file mode 100644 index 00000000..f1b5502b --- /dev/null +++ b/docs/Model/InlineResponse20040.md @@ -0,0 +1,12 @@ +# # InlineResponse20040 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**totalResultSize** | **int** | | +**data** | [**\TalonOne\Client\Model\Role[]**](Role.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/InlineResponse2005.md b/docs/Model/InlineResponse2005.md index 1bb934c1..7571af27 100644 --- a/docs/Model/InlineResponse2005.md +++ b/docs/Model/InlineResponse2005.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Ruleset[]**](Ruleset.md) | | +**data** | [**\TalonOne\Client\Model\NotificationWebhook[]**](NotificationWebhook.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2006.md b/docs/Model/InlineResponse2006.md index 72b8000e..cf9f04ec 100644 --- a/docs/Model/InlineResponse2006.md +++ b/docs/Model/InlineResponse2006.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | +**data** | [**\TalonOne\Client\Model\Ruleset[]**](Ruleset.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2007.md b/docs/Model/InlineResponse2007.md index d7477c2d..3e5529b0 100644 --- a/docs/Model/InlineResponse2007.md +++ b/docs/Model/InlineResponse2007.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**hasMore** | **bool** | | +**totalResultSize** | **int** | | **data** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2008.md b/docs/Model/InlineResponse2008.md index 3ce0af7a..327b486d 100644 --- a/docs/Model/InlineResponse2008.md +++ b/docs/Model/InlineResponse2008.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **hasMore** | **bool** | | -**data** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | +**data** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/InlineResponse2009.md b/docs/Model/InlineResponse2009.md index 2e681a33..b12fadd3 100644 --- a/docs/Model/InlineResponse2009.md +++ b/docs/Model/InlineResponse2009.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**totalResultSize** | **int** | | -**data** | [**\TalonOne\Client\Model\LoyaltyProgram[]**](LoyaltyProgram.md) | | +**hasMore** | **bool** | | +**data** | [**\TalonOne\Client\Model\Referral[]**](Referral.md) | | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IntegrationCoupon.md b/docs/Model/IntegrationCoupon.md new file mode 100644 index 00000000..152ebaf9 --- /dev/null +++ b/docs/Model/IntegrationCoupon.md @@ -0,0 +1,32 @@ +# # IntegrationCoupon + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**campaignId** | **int** | The ID of the campaign that owns this entity. | +**value** | **string** | The coupon code. | +**usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] +**startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] +**usageCounter** | **int** | The number of times the coupon has been successfully redeemed. | +**discountCounter** | **float** | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] +**discountRemainder** | **float** | The remaining discount this coupon can give. | [optional] +**reservationCounter** | **float** | The number of times this coupon has been reserved. | [optional] +**attributes** | [**object**](.md) | Custom attributes associated with this coupon. | [optional] +**referralId** | **int** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] +**recipientIntegrationId** | **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] +**importId** | **int** | The ID of the Import which created this coupon. | [optional] +**reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**batchId** | **string** | The id of the batch the coupon belongs to. | [optional] +**isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**profileRedemptionCount** | **int** | The number of times the coupon was redeemed by the profile. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/IntegrationEntity.md b/docs/Model/IntegrationEntity.md index a9d68248..1cfe659f 100644 --- a/docs/Model/IntegrationEntity.md +++ b/docs/Model/IntegrationEntity.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **integrationId** | **string** | The integration ID set by your integration layer. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | [[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/IntegrationEventV2Request.md b/docs/Model/IntegrationEventV2Request.md index 6e7af61e..c1c2fab5 100644 --- a/docs/Model/IntegrationEventV2Request.md +++ b/docs/Model/IntegrationEventV2Request.md @@ -5,8 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] -**type** | **string** | A string representing the event. Must not be a reserved event name. | -**attributes** | [**object**](.md) | Arbitrary additional JSON data associated with the event. | [optional] +**evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] +**type** | **string** | A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. | +**attributes** | [**object**](.md) | Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). | [optional] **responseContent** | **string[]** | Optional list of requested information to be present on the response related to the tracking custom event. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/IntegrationRequest.md b/docs/Model/IntegrationRequest.md index b543f166..403a628a 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 extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. **Note:** `ruleFailureReasons` is always part of the response when the [Application type](https://docs.talon.one/docs/product/applications/overview#application-types) is `sandbox`. | [optional] +**responseContent** | **string[]** | Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. | [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 29c99ed2..2cd34243 100644 --- a/docs/Model/IntegrationStateV2.md +++ b/docs/Model/IntegrationStateV2.md @@ -9,9 +9,9 @@ Name | Type | Description | Notes **event** | [**\TalonOne\Client\Model\Event**](Event.md) | | [optional] **loyalty** | [**\TalonOne\Client\Model\Loyalty**](Loyalty.md) | | [optional] **referral** | [**\TalonOne\Client\Model\InventoryReferral**](InventoryReferral.md) | | [optional] -**coupons** | [**\TalonOne\Client\Model\Coupon[]**](Coupon.md) | | [optional] +**coupons** | [**\TalonOne\Client\Model\IntegrationCoupon[]**](IntegrationCoupon.md) | | [optional] **triggeredCampaigns** | [**\TalonOne\Client\Model\Campaign[]**](Campaign.md) | | [optional] -**effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | | +**effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | **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/InventoryCoupon.md b/docs/Model/InventoryCoupon.md index fe5e5b7c..fe394333 100644 --- a/docs/Model/InventoryCoupon.md +++ b/docs/Model/InventoryCoupon.md @@ -4,24 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **campaignId** | **int** | The ID of the campaign that owns this entity. | **value** | **string** | The coupon code. | **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] -**usageCounter** | **int** | The number of times this coupon has been successfully used. | +**usageCounter** | **int** | The number of times the coupon has been successfully redeemed. | **discountCounter** | **float** | The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. | [optional] **discountRemainder** | **float** | The remaining discount this coupon can give. | [optional] +**reservationCounter** | **float** | The number of times this coupon has been reserved. | [optional] **attributes** | [**object**](.md) | Custom attributes associated with this coupon. | [optional] **referralId** | **int** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **recipientIntegrationId** | **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **importId** | **int** | The ID of the Import which created this coupon. | [optional] -**reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation endpoint](/integration-api/#operation/createCouponReservation). - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons endpoint](/management-api/#operation/createCoupons) or [Create coupons for multiple recipients endpoint](/management-api/#operation/createCouponsForMultipleRecipients). | [optional] [default to true] +**reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] **batchId** | **string** | The id of the batch the coupon belongs to. | [optional] +**isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] **profileRedemptionCount** | **int** | The number of times the coupon was redeemed by the profile. | **state** | **string** | Can be: - `active`: The coupon can be used. It is a reserved coupon that is neither pending, used nor expired, and has a non-exhausted limit counter. - `used`: The coupon has been redeemed and cannot be used again. It is not pending and has reached its redemption limit or was redeemed by the profile before expiration. - `expired`: The coupon was never redeemed and it is now expired. It is non-pending, non-active and non-used by the profile. - `pending`: The coupon will be usable in the future. - `disabled`: The coupon is part of a non-active campaign. | diff --git a/docs/Model/InventoryReferral.md b/docs/Model/InventoryReferral.md index 50f49096..f17ec5d1 100644 --- a/docs/Model/InventoryReferral.md +++ b/docs/Model/InventoryReferral.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | **campaignId** | **int** | ID of the campaign from which the referral received the referral code. | **advocateProfileIntegrationId** | **string** | The Integration ID of the Advocate's Profile. | diff --git a/docs/Model/LedgerEntry.md b/docs/Model/LedgerEntry.md index fb99a1ce..c87fda6b 100644 --- a/docs/Model/LedgerEntry.md +++ b/docs/Model/LedgerEntry.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | **accountId** | **int** | The ID of the Talon.One account that owns this profile. | **loyaltyProgramId** | **int** | ID of the ledger. | **eventId** | **int** | ID of the related event. | **amount** | **int** | Amount of loyalty points. | **reason** | **string** | reason for awarding/deducting points. | -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the points. | +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the points. | **referenceId** | **int** | The ID of the balancing ledgerEntry. | [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/LedgerInfo.md b/docs/Model/LedgerInfo.md index f1673ff6..d4e67e92 100644 --- a/docs/Model/LedgerInfo.md +++ b/docs/Model/LedgerInfo.md @@ -6,12 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currentBalance** | **float** | Sum of currently active points. | **pendingBalance** | **float** | Sum of pending points. | -**expiredBalance** | **float** | Sum of expired points. | -**spentBalance** | **float** | Sum of spent points. | -**tentativeCurrentBalance** | **float** | Sum of currently active points, including points added and deducted in open sessions. | +**expiredBalance** | **float** | **DEPRECATED** Value is shown as 0. | +**spentBalance** | **float** | **DEPRECATED** Value is shown as 0. | +**tentativeCurrentBalance** | **float** | Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied. | +**tentativePendingBalance** | **float** | Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied. | [optional] **currentTier** | [**\TalonOne\Client\Model\Tier**](Tier.md) | | [optional] **pointsToNextTier** | **float** | Points required to move up a tier. | [optional] -**projection** | [**\TalonOne\Client\Model\LoyaltyProjection**](LoyaltyProjection.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/LedgerTransactionLogEntryIntegrationAPI.md b/docs/Model/LedgerTransactionLogEntryIntegrationAPI.md index 3eb0df3c..add36a11 100644 --- a/docs/Model/LedgerTransactionLogEntryIntegrationAPI.md +++ b/docs/Model/LedgerTransactionLogEntryIntegrationAPI.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty card transaction occurred. | +**created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty transaction occurred. | **programId** | **int** | ID of the loyalty program. | -**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | -**type** | **string** | Type of transaction. Possible values are: - `addition`: Points were added. - `subtraction`: Points were subtracted. | +**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | [optional] +**type** | **string** | Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. | **name** | **string** | Name or reason of the loyalty ledger transaction. | -**startDate** | **string** | Date when points become active. Possible values are: - `immediate`: Points are active immediately. - `timestamp value`: Points become active from the given date. | +**startDate** | **string** | When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time. | **expiryDate** | **string** | Date when points expire. Possible values are: - `unlimited`: Points have no expiration date. - `timestamp value`: Points expire on the given date. | **subledgerId** | **string** | ID of the subledger. | **amount** | **float** | Amount of loyalty points added or deducted in the transaction. | diff --git a/docs/Model/LimitCounter.md b/docs/Model/LimitCounter.md index 8b89df11..1385deb9 100644 --- a/docs/Model/LimitCounter.md +++ b/docs/Model/LimitCounter.md @@ -11,11 +11,11 @@ Name | Type | Description | Notes **action** | **string** | The limitable action of the limit counter. | **profileId** | **int** | The profile ID for which this limit counter is used. | [optional] **profileIntegrationId** | **string** | The profile integration ID for which this limit counter is used. | [optional] -**couponId** | **int** | The coupon ID for which this limit counter is used. | [optional] +**couponId** | **int** | The internal coupon ID for which this limit counter is used. | [optional] **couponValue** | **string** | The coupon value for which this limit counter is used. | [optional] **referralId** | **int** | The referral ID for which this limit counter is used. | [optional] **referralValue** | **string** | The referral value for which this limit counter is used. | [optional] -**identifier** | **int** | The arbitrary identifier for which this limit counter is used. | [optional] +**identifier** | **string** | The arbitrary identifier for which this limit counter is used. | [optional] **period** | **string** | The time period for which this limit counter is used. | [optional] **limit** | **float** | The highest possible value for this limit counter. | **counter** | **float** | The current value for this limit counter. | diff --git a/docs/Model/LoyaltyCard.md b/docs/Model/LoyaltyCard.md index d5137d11..614c9161 100644 --- a/docs/Model/LoyaltyCard.md +++ b/docs/Model/LoyaltyCard.md @@ -4,16 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **programID** | **int** | The ID of the loyalty program that owns this entity. | -**status** | **string** | Status of the loyalty card. Can be one of: ['active', 'disabled'] | +**status** | **string** | Status of the loyalty card. Can be one of: ['active', 'inactive'] | **identifier** | **string** | The alphanumeric identifier of the loyalty card. | -**usersPerCardLimit** | **int** | The max amount of user profiles a card can be shared with. 0 means unlimited. | -**profiles** | [**\TalonOne\Client\Model\LoyaltyCardProfileRegistration[]**](LoyaltyCardProfileRegistration.md) | Integration IDs of the customers associated with the card. | [optional] +**usersPerCardLimit** | **int** | The max amount of customer profiles that can be linked to the card. 0 means unlimited. | +**profiles** | [**\TalonOne\Client\Model\LoyaltyCardProfileRegistration[]**](LoyaltyCardProfileRegistration.md) | Integration IDs of the customers profiles linked to the card. | [optional] **ledger** | [**\TalonOne\Client\Model\LedgerInfo**](LedgerInfo.md) | | [optional] **subledgers** | [**map[string,\TalonOne\Client\Model\LedgerInfo]**](LedgerInfo.md) | Displays point balances of the card in the subledgers of the loyalty program. | [optional] **modified** | [**\DateTime**](\DateTime.md) | Timestamp of the most recent update of the loyalty card. | [optional] +**oldCardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] +**newCardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/LoyaltyCardProfileRegistration.md b/docs/Model/LoyaltyCardProfileRegistration.md index b91d6d77..0d29d649 100644 --- a/docs/Model/LoyaltyCardProfileRegistration.md +++ b/docs/Model/LoyaltyCardProfileRegistration.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**integrationId** | **string** | Integration ID of the customer associated with the card. | +**integrationId** | **string** | Integration ID of the customer profile linked to the card. | **timestamp** | [**\DateTime**](\DateTime.md) | Timestamp of the registration to the card. | [[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/LoyaltyLedgerEntry.md b/docs/Model/LoyaltyLedgerEntry.md index 8848ab7f..a6bf24f5 100644 --- a/docs/Model/LoyaltyLedgerEntry.md +++ b/docs/Model/LoyaltyLedgerEntry.md @@ -10,13 +10,14 @@ Name | Type | Description | Notes **cardID** | **int** | | [optional] **customerSessionID** | **string** | | [optional] **eventID** | **int** | | [optional] -**type** | **string** | The type of the ledger transaction. Possible values are addition, subtraction, expire or expiring (for expiring points ledgers) | +**type** | **string** | The type of the ledger transaction. Possible values are: - `addition` - `subtraction` - `expire` - `expiring` (for expiring points ledgers) | **amount** | **float** | | **startDate** | [**\DateTime**](\DateTime.md) | | [optional] **expiryDate** | [**\DateTime**](\DateTime.md) | | [optional] **name** | **string** | A name referencing the condition or effect that added this entry, or the specific name provided in an API call. | **subLedgerID** | **string** | This specifies if we are adding loyalty points to the main ledger or a subledger. | **userID** | **int** | This is the ID of the user who created this entry, if the addition or subtraction was done manually. | [optional] +**archived** | **bool** | Indicates if the entry belongs to the archived session. | [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/LoyaltyPoints.md b/docs/Model/LoyaltyPoints.md deleted file mode 100644 index 24057ae7..00000000 --- a/docs/Model/LoyaltyPoints.md +++ /dev/null @@ -1,15 +0,0 @@ -# # LoyaltyPoints - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**points** | **float** | Amount of loyalty points. | -**name** | **string** | Allows to specify a name/reason for the point addition or deduction. | [optional] -**validityDuration** | **string** | Indicates the duration after which the added loyalty points should expire. The format is a number followed by one letter indicating the time unit, like '1h' or '40m' (defined by Go time package). | [optional] -**pendingDuration** | **string** | Indicates the amount of time before the points are considered valid. The format is a number followed by one letter indicating the time unit, like '1h' or '40m' (defined by Go time package). | [optional] -**subLedgerID** | **string** | This specifies if we are adding loyalty points to the main ledger or a subledger. | [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/LoyaltyProgram.md b/docs/Model/LoyaltyProgram.md index 1c912e1f..4f76244e 100644 --- a/docs/Model/LoyaltyProgram.md +++ b/docs/Model/LoyaltyProgram.md @@ -4,15 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | The ID of loyalty program. Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | The ID of loyalty program. Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **title** | **string** | The display title for the Loyalty Program. | **description** | **string** | Description of our Loyalty Program. | **subscribedApplications** | **int[]** | A list containing the IDs of all applications that are subscribed to this Loyalty Program. | -**defaultValidity** | **string** | Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. | -**defaultPending** | **string** | Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. | +**defaultValidity** | **string** | The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | +**defaultPending** | **string** | The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] +**sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | **accountID** | **int** | The ID of the Talon.One account that owns this program. | **name** | **string** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**\TalonOne\Client\Model\LoyaltyTier[]**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional] diff --git a/docs/Model/LoyaltyProgramBalance.md b/docs/Model/LoyaltyProgramBalance.md index ea9a1a67..c3fd3d69 100644 --- a/docs/Model/LoyaltyProgramBalance.md +++ b/docs/Model/LoyaltyProgramBalance.md @@ -6,9 +6,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **currentBalance** | **float** | Sum of currently active points. | **pendingBalance** | **float** | Sum of pending points. | -**expiredBalance** | **float** | Sum of expired points. | -**spentBalance** | **float** | Sum of spent points. | -**tentativeCurrentBalance** | **float** | Sum of currently active points, including points added and deducted in open sessions. | +**expiredBalance** | **float** | **DEPRECATED** Value is shown as 0. | +**spentBalance** | **float** | **DEPRECATED** Value is shown as 0. | +**tentativeCurrentBalance** | **float** | Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied. | +**tentativePendingBalance** | **float** | Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied. | [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/LoyaltyProgramTransaction.md b/docs/Model/LoyaltyProgramTransaction.md new file mode 100644 index 00000000..3bea8061 --- /dev/null +++ b/docs/Model/LoyaltyProgramTransaction.md @@ -0,0 +1,27 @@ +# # LoyaltyProgramTransaction + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | ID of the loyalty ledger transaction. | +**programId** | **int** | ID of the loyalty program. | +**created** | [**\DateTime**](\DateTime.md) | Date and time the loyalty transaction occurred. | +**type** | **string** | Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. | +**amount** | **float** | Amount of loyalty points added or deducted in the transaction. | +**name** | **string** | Name or reason for the loyalty ledger transaction. | +**startDate** | **string** | When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time. | +**expiryDate** | **string** | When points expire. Possible values: - `unlimited`: Points have no expiration date. - a timestamp value: Points expire at a given date and time. | +**customerProfileId** | **string** | Customer profile integration ID used in the loyalty program. | [optional] +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] +**subledgerId** | **string** | ID of the subledger. | +**customerSessionId** | **string** | ID of the customer session where the transaction occurred. | [optional] +**importId** | **int** | ID of the import where the transaction occurred. | [optional] +**userId** | **int** | ID of the user who manually added or deducted points. Applies only for manual transactions. | [optional] +**userEmail** | **string** | The email of the user who manually added or deducted points. Applies only for manual transactions. | [optional] +**rulesetId** | **int** | ID of the ruleset containing the rule that triggered the effect. Applies only for transactions that resulted from a customer session. | [optional] +**ruleName** | **string** | Name of the rule that triggered the effect. Applies only for transactions that resulted from a customer session. | [optional] + +[[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/LoyaltyProjection.md b/docs/Model/LoyaltyProjection.md deleted file mode 100644 index a7af3dbc..00000000 --- a/docs/Model/LoyaltyProjection.md +++ /dev/null @@ -1,13 +0,0 @@ -# # LoyaltyProjection - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**projections** | [**\TalonOne\Client\Model\LoyaltyProjectionData[]**](LoyaltyProjectionData.md) | | [optional] -**totalExpiringPoints** | **float** | Sum of points to be expired by the projection date set in the query parameter. | -**totalActivatingPoints** | **float** | Sum of points to be active by the projection date set in the query parameter. | - -[[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/LoyaltyProjectionData.md b/docs/Model/LoyaltyProjectionData.md deleted file mode 100644 index d65d7c20..00000000 --- a/docs/Model/LoyaltyProjectionData.md +++ /dev/null @@ -1,14 +0,0 @@ -# # LoyaltyProjectionData - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**date** | [**\DateTime**](\DateTime.md) | Specific date of projection. | -**expiringPoints** | **float** | Points that will be expired by the specified date. | -**activatingPoints** | **float** | Points that will be active by the specified date. | -**projectedBalance** | **float** | Current balance plus projected active points, minus expiring points. | - -[[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/LoyaltyTier.md b/docs/Model/LoyaltyTier.md index ed275b26..e6ce402b 100644 --- a/docs/Model/LoyaltyTier.md +++ b/docs/Model/LoyaltyTier.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **programID** | **int** | The ID of the loyalty program that owns this entity. | **name** | **string** | The name of the tier | **minPoints** | **float** | The minimum amount of points required to be eligible for the tier. | diff --git a/docs/Model/ManagementKey.md b/docs/Model/ManagementKey.md index 6ac50b72..d5aa177a 100644 --- a/docs/Model/ManagementKey.md +++ b/docs/Model/ManagementKey.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **name** | **string** | Name for management key. | **expiryDate** | [**\DateTime**](\DateTime.md) | The date the management key expires. | **endpoints** | [**\TalonOne\Client\Model\Endpoint[]**](Endpoint.md) | The list of endpoints that can be accessed with the key | +**allowedApplicationIds** | **int[]** | A list of Application IDs that you can access with the management key. An empty or missing list means the management key can be used for all Applications in the account. | [optional] **id** | **int** | ID of the management key. | **createdBy** | **int** | ID of the user who created it. | **accountID** | **int** | ID of account the key is used for. | diff --git a/docs/Model/ModelReturn.md b/docs/Model/ModelReturn.md index ec617bc1..09d9eeed 100644 --- a/docs/Model/ModelReturn.md +++ b/docs/Model/ModelReturn.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **accountId** | **int** | The ID of the account that owns this entity. | **returnedCartItems** | [**\TalonOne\Client\Model\ReturnedCartItem[]**](ReturnedCartItem.md) | List of cart items to be returned. | diff --git a/docs/Model/MultiApplicationEntity.md b/docs/Model/MultiApplicationEntity.md index 6657fa4c..67645e2d 100644 --- a/docs/Model/MultiApplicationEntity.md +++ b/docs/Model/MultiApplicationEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**applicationIds** | **int[]** | The IDs of the applications that are related to this entity. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | [[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/MultipleAudiencesItem.md b/docs/Model/MultipleAudiencesItem.md index 12e38a73..29d24776 100644 --- a/docs/Model/MultipleAudiencesItem.md +++ b/docs/Model/MultipleAudiencesItem.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **name** | **string** | The human-friendly display name for this audience. | **integrationId** | **string** | The ID of this audience in the third-party integration. | **status** | **string** | Indicates whether the audience is new, updated or unmodified by the request. | diff --git a/docs/Model/MultipleCustomerProfileIntegrationRequestItem.md b/docs/Model/MultipleCustomerProfileIntegrationRequestItem.md index 3e5153c3..daf9ef5a 100644 --- a/docs/Model/MultipleCustomerProfileIntegrationRequestItem.md +++ b/docs/Model/MultipleCustomerProfileIntegrationRequestItem.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] -**integrationId** | **string** | The identifier of this profile, set by your integration layer. It must be unique within the account. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](/integration-api/#operation/updateCustomerSessionV2). | +**integrationId** | **string** | The identifier of this profile, set by your integration layer. It must be unique within the account. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2). | [[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/MultipleCustomerProfileIntegrationResponseV2.md b/docs/Model/MultipleCustomerProfileIntegrationResponseV2.md index 0fb581b3..3f0aac78 100644 --- a/docs/Model/MultipleCustomerProfileIntegrationResponseV2.md +++ b/docs/Model/MultipleCustomerProfileIntegrationResponseV2.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**integrationStates** | [**\TalonOne\Client\Model\IntegrationStateV2[]**](IntegrationStateV2.md) | | [optional] +**integrationStates** | [**\TalonOne\Client\Model\CustomerProfileUpdateV2Response[]**](CustomerProfileUpdateV2Response.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/MutableEntity.md b/docs/Model/MutableEntity.md index cf0f41aa..25c20311 100644 --- a/docs/Model/MutableEntity.md +++ b/docs/Model/MutableEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | [[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/NewAdditionalCost.md b/docs/Model/NewAdditionalCost.md index 6969c7e7..71c8490e 100644 --- a/docs/Model/NewAdditionalCost.md +++ b/docs/Model/NewAdditionalCost.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The additional cost name that will be used in API requests and Talang. E.g. if `name == \"shipping\"` then you would set the shipping additional cost by including an `additionalCosts.shipping` property in your request payload. | +**name** | **string** | The internal name used in API requests. | **title** | **string** | The human-readable name for the additional cost that will be shown in the Campaign Manager. Like `name`, the combination of entity and title must also be unique. | **description** | **string** | A description of this additional cost. | **subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that are subscribed to this additional cost. | [optional] -**type** | **string** | The type of additional cost. The following options can be chosen: - `session`: Additional cost will be added per session, - `item`: Additional cost will be added per item, - `both`: Additional cost will be added per item and session. | [optional] [default to 'session'] +**type** | **string** | The type of additional cost. Possible value: - `session`: Additional cost will be added per session. - `item`: Additional cost will be added per item. - `both`: Additional cost will be added per item and session. | [optional] [default to 'session'] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewApplication.md b/docs/Model/NewApplication.md index 27363076..b8dc2736 100644 --- a/docs/Model/NewApplication.md +++ b/docs/Model/NewApplication.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder'] **defaultDiscountScope** | **string** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional] -**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). | [optional] +**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional] **attributesSettings** | [**\TalonOne\Client\Model\AttributesSettings**](AttributesSettings.md) | | [optional] **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **enablePartialDiscounts** | **bool** | Indicates if this Application supports partial discounts. | [optional] diff --git a/docs/Model/NewAudience.md b/docs/Model/NewAudience.md index ceee6f02..22618707 100644 --- a/docs/Model/NewAudience.md +++ b/docs/Model/NewAudience.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **integration** | **string** | The Talon.One-supported [3rd-party platform](https://docs.talon.one/docs/dev/technology-partners/overview) that this audience was created in. For example, `mParticle`, `Segment`, `Selligent`, `Braze`, or `Iterable`. **Note:** If you do not integrate with any of these platforms, do not use this property. | [optional] **integrationId** | **string** | The ID of this audience in the third-party integration. **Note:** To create an audience that doesn't come from a 3rd party platform, do not use this property. | [optional] **createdIn3rdParty** | **bool** | Determines if this audience is a 3rd party audience or not. | [optional] +**lastUpdate** | [**\DateTime**](\DateTime.md) | The last time that the audience memberships changed. | [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/NewBaseNotification.md b/docs/Model/NewBaseNotification.md new file mode 100644 index 00000000..3a883d98 --- /dev/null +++ b/docs/Model/NewBaseNotification.md @@ -0,0 +1,12 @@ +# # NewBaseNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**policy** | [**object**](.md) | | +**webhook** | [**\TalonOne\Client\Model\NewNotificationWebhook**](NewNotificationWebhook.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/NewCampaign.md b/docs/Model/NewCampaign.md index 48a48f5b..2cecae69 100644 --- a/docs/Model/NewCampaign.md +++ b/docs/Model/NewCampaign.md @@ -10,13 +10,13 @@ Name | Type | Description | Notes **endTime** | [**\DateTime**](\DateTime.md) | Timestamp the campaign will become inactive. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this campaign. | [optional] **state** | **string** | A disabled or archived campaign is not evaluated for rules or coupons. | [default to 'enabled'] -**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api/#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**activeRulesetId** | **int** | [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] **tags** | **string[]** | A list of tags for the campaign. | **features** | **string[]** | The features enabled in this campaign. | **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] -**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/) for this campaign. | -**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this campaign belongs to. | [optional] +**limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | +**campaignGroups** | **int[]** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCampaignTemplate.md b/docs/Model/NewCampaignTemplate.md index 8c96f8dc..38d2a513 100644 --- a/docs/Model/NewCampaignTemplate.md +++ b/docs/Model/NewCampaignTemplate.md @@ -7,17 +7,17 @@ Name | Type | Description | Notes **name** | **string** | The campaign template name. | **description** | **string** | Customer-facing text that explains the objective of the template. | **instructions** | **string** | Customer-facing text that explains how to use the template. For example, you can use this property to explain the available attributes of this template, and how they can be modified when a user uses this template to create a new campaign. | -**campaignAttributes** | [**object**](.md) | The Campaign Attributes that Campaigns created from this template will have by default. | [optional] -**couponAttributes** | [**object**](.md) | The Campaign Attributes that Coupons created from this template will have by default. | [optional] +**campaignAttributes** | [**object**](.md) | The campaign attributes that campaigns created from this template will have by default. | [optional] +**couponAttributes** | [**object**](.md) | The campaign attributes that coupons created from this template will have by default. | [optional] **state** | **string** | Only Campaign Templates in 'available' state may be used to create Campaigns. | **tags** | **string[]** | A list of tags for the campaign template. | [optional] **features** | **string[]** | A list of features for the campaign template. | [optional] **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **limits** | [**\TalonOne\Client\Model\TemplateLimitConfig[]**](TemplateLimitConfig.md) | The set of limits that will operate for this campaign template. | [optional] -**templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Template parameters are fields which can be used to replace values in a rule. | [optional] +**templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional] **campaignCollections** | [**\TalonOne\Client\Model\CampaignTemplateCollection[]**](CampaignTemplateCollection.md) | The campaign collections from the blueprint campaign for the template. | [optional] -**defaultCampaignGroupId** | **int** | The default campaignGroupId. | [optional] +**defaultCampaignGroupId** | **int** | The default campaign group ID. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewCouponCreationJob.md b/docs/Model/NewCouponCreationJob.md index bd3f1551..b13caf39 100644 --- a/docs/Model/NewCouponCreationJob.md +++ b/docs/Model/NewCouponCreationJob.md @@ -5,10 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] -**numberOfCoupons** | **int** | The number of new coupon codes to generate for the campaign. Must be between 20,001 and 5,000,000. | +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**numberOfCoupons** | **int** | The number of new coupon codes to generate for the campaign. | **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with coupons. | diff --git a/docs/Model/NewCoupons.md b/docs/Model/NewCoupons.md index 82f2fc06..341dd0d3 100644 --- a/docs/Model/NewCoupons.md +++ b/docs/Model/NewCoupons.md @@ -5,16 +5,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **numberOfCoupons** | **int** | The number of new coupon codes to generate for the campaign. Must be at least 1. | -**uniquePrefix** | **string** | **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously endpoint](https://docs.talon.one/management-api/#operation/createCouponsAsync). | [optional] +**uniquePrefix** | **string** | **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#operation/createCouponsAsync) endpoint. | [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[]** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] **couponPattern** | **string** | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [optional] +**isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] [[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 index f5c4527b..1f1ea66f 100644 --- a/docs/Model/NewCouponsForMultipleRecipients.md +++ b/docs/Model/NewCouponsForMultipleRecipients.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] **recipientsIntegrationIds** | **string[]** | The integration IDs for recipients. | **validCharacters** | **string[]** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] diff --git a/docs/Model/NewCustomEffect.md b/docs/Model/NewCustomEffect.md index e72ac6b6..dc67a5af 100644 --- a/docs/Model/NewCustomEffect.md +++ b/docs/Model/NewCustomEffect.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**applicationIds** | **int[]** | The IDs of the applications that are related to this entity. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | +**isPerItem** | **bool** | Indicates if this effect is per item or not. | [optional] **name** | **string** | The name of this effect. | **title** | **string** | The title of this effect. | **payload** | **string** | The JSON payload of this effect. | diff --git a/docs/Model/NewCustomerSession.md b/docs/Model/NewCustomerSession.md index 9d0cf056..dfc5c1f4 100644 --- a/docs/Model/NewCustomerSession.md +++ b/docs/Model/NewCustomerSession.md @@ -7,9 +7,9 @@ Name | Type | Description | Notes **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] **coupon** | **string** | Any coupon code entered. | [optional] **referral** | **string** | Any referral code entered. | [optional] -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). | [optional] [default to 'open'] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [optional] [default to 'open'] **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | Serialized JSON representation. | [optional] -**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). | [optional] +**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). | [optional] **total** | **float** | The total sum of the cart in one session. | [optional] **attributes** | [**object**](.md) | A key-value map of the sessions attributes. The potentially valid attributes are configured in your accounts developer settings. | [optional] diff --git a/docs/Model/NewCustomerSessionV2.md b/docs/Model/NewCustomerSessionV2.md index a9b8c3cb..eaaec907 100644 --- a/docs/Model/NewCustomerSessionV2.md +++ b/docs/Model/NewCustomerSessionV2.md @@ -5,13 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **profileId** | **string** | ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. | [optional] +**evaluableCampaignIds** | **int[]** | When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. | [optional] **couponCodes** | **string[]** | Any coupon codes entered. **Important**: If you [create a coupon budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a coupon code by the time you close it. | [optional] **referralCode** | **string** | Any referral code entered. **Important**: If you [create a referral budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains a referral code by the time you close it. | [optional] **loyaltyCards** | **string[]** | Any loyalty cards used. | [optional] -**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). | [optional] [default to 'open'] +**state** | **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). | [optional] [default to 'open'] **cartItems** | [**\TalonOne\Client\Model\CartItem[]**](CartItem.md) | The items to add to this sessions. - If cart item flattening is disabled: **Do not exceed 1000 items** (regardless of their `quantity`) per request. - If cart item flattening is enabled: **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | [optional] -**additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs/). | [optional] -**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). **Important**: If you [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains an identifier by the time you close it. | [optional] +**additionalCosts** | [**map[string,\TalonOne\Client\Model\AdditionalCost]**](AdditionalCost.md) | Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). | [optional] +**identifiers** | **string[]** | Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). | [optional] **attributes** | [**object**](.md) | Use this property to set a value for the attributes of your choice. Attributes represent any information to attach to your session, like the shipping city. You can use [built-in attributes](https://docs.talon.one/docs/dev/concepts/attributes#built-in-attributes) or [custom ones](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes). Custom attributes must be created in the Campaign Manager before you set them with this property. | [optional] [[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/NewEventType.md b/docs/Model/NewEventType.md index bdef6e96..b930f689 100644 --- a/docs/Model/NewEventType.md +++ b/docs/Model/NewEventType.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **string** | The human-friendly display name for this event type. Use a short, past-tense, description of the event. | -**name** | **string** | The machine-friendly canonical name for this event type. This will be used in URLs, and cannot be changed after an event type has been created. | -**description** | **string** | An explanation of when the event type is triggered. Write this with a campaign manager in mind. For example: > The \"Payment Accepted\" event is triggered after successful processing of a payment by our payment gateway. | [optional] +**title** | **string** | The human-friendly name for this event type. | +**name** | **string** | The integration name for this event type. This will be used in URLs and cannot be changed after an event type has been created. | +**description** | **string** | A description of what the event represents. | [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/NewGiveawaysPool.md b/docs/Model/NewGiveawaysPool.md index a59593e9..1d7b3e4f 100644 --- a/docs/Model/NewGiveawaysPool.md +++ b/docs/Model/NewGiveawaysPool.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **name** | **string** | The name of this giveaways pool. | **description** | **string** | The description of this giveaways pool. | [optional] **subscribedApplicationsIds** | **int[]** | A list of the IDs of the applications that this giveaways pool is enabled for. | [optional] +**sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [[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/NewInvitation.md b/docs/Model/NewInvitation.md index 82632168..27c3c961 100644 --- a/docs/Model/NewInvitation.md +++ b/docs/Model/NewInvitation.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of the user being invited. | [optional] **email** | **string** | | -**acl** | **string** | The `Access Control List` json defining the role of the user. This represents the actual access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` | +**acl** | **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` | **roles** | **int[]** | An array of roleIDs to assign the new user to. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewLoyaltyProgram.md b/docs/Model/NewLoyaltyProgram.md index f6e8fce0..8df8ddcd 100644 --- a/docs/Model/NewLoyaltyProgram.md +++ b/docs/Model/NewLoyaltyProgram.md @@ -7,10 +7,11 @@ Name | Type | Description | Notes **title** | **string** | The display title for the Loyalty Program. | **description** | **string** | Description of our Loyalty Program. | [optional] **subscribedApplications** | **int[]** | A list containing the IDs of all applications that are subscribed to this Loyalty Program. | [optional] -**defaultValidity** | **string** | Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. | -**defaultPending** | **string** | Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. | +**defaultValidity** | **string** | The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | +**defaultPending** | **string** | The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] +**sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | **name** | **string** | The internal name for the Loyalty Program. This is an immutable value. | **tiers** | [**\TalonOne\Client\Model\NewLoyaltyTier[]**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] **timezone** | **string** | A string containing an IANA timezone descriptor. | diff --git a/docs/Model/NewManagementKey.md b/docs/Model/NewManagementKey.md index bebee566..44374c8e 100644 --- a/docs/Model/NewManagementKey.md +++ b/docs/Model/NewManagementKey.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **name** | **string** | Name for management key. | **expiryDate** | [**\DateTime**](\DateTime.md) | The date the management key expires. | **endpoints** | [**\TalonOne\Client\Model\Endpoint[]**](Endpoint.md) | The list of endpoints that can be accessed with the key | +**allowedApplicationIds** | **int[]** | A list of Application IDs that you can access with the management key. An empty or missing list means the management key can be used for all Applications in the account. | [optional] **id** | **int** | ID of the management key. | **createdBy** | **int** | ID of the user who created it. | **accountID** | **int** | ID of account the key is used for. | diff --git a/docs/Model/NewNotificationWebhook.md b/docs/Model/NewNotificationWebhook.md index b2ce977d..f53eb3ff 100644 --- a/docs/Model/NewNotificationWebhook.md +++ b/docs/Model/NewNotificationWebhook.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **string** | API url for this notification webhook. | -**headers** | **string[]** | List of API HTTP headers for this notification webhook. | +**url** | **string** | API URL for the given webhook-based notification. | +**headers** | **string[]** | List of API HTTP headers for the given webhook-based notification. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/NewOutgoingIntegrationWebhook.md b/docs/Model/NewOutgoingIntegrationWebhook.md new file mode 100644 index 00000000..49b533c2 --- /dev/null +++ b/docs/Model/NewOutgoingIntegrationWebhook.md @@ -0,0 +1,12 @@ +# # NewOutgoingIntegrationWebhook + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**title** | **string** | Webhook title. | +**applicationIds** | **int[]** | IDs of the Applications to which a webhook must be linked. | + +[[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/NewPicklist.md b/docs/Model/NewPicklist.md new file mode 100644 index 00000000..8a1bc95f --- /dev/null +++ b/docs/Model/NewPicklist.md @@ -0,0 +1,12 @@ +# # NewPicklist + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. | +**values** | **string[]** | The list of allowed values provided by this picklist. | + +[[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/NewReferral.md b/docs/Model/NewReferral.md index 04eef7c5..dca249ce 100644 --- a/docs/Model/NewReferral.md +++ b/docs/Model/NewReferral.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | [optional] **campaignId** | **int** | ID of the campaign from which the referral received the referral code. | **advocateProfileIntegrationId** | **string** | The Integration ID of the Advocate's Profile. | diff --git a/docs/Model/NewReferralsForMultipleAdvocates.md b/docs/Model/NewReferralsForMultipleAdvocates.md index 2f4b775f..f6a372a9 100644 --- a/docs/Model/NewReferralsForMultipleAdvocates.md +++ b/docs/Model/NewReferralsForMultipleAdvocates.md @@ -5,11 +5,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | **campaignId** | **int** | The ID of the campaign from which the referral received the referral code. | **advocateProfileIntegrationIds** | **string[]** | An array containing all the respective advocate profiles. | -**attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] +**attributes** | [**object**](.md) | Arbitrary properties associated with this referral code. | [optional] **validCharacters** | **string[]** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] **referralPattern** | **string** | The pattern used to generate referrals. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [optional] diff --git a/docs/Model/NewRole.md b/docs/Model/NewRole.md index a94aa4e4..cc2c2cd8 100644 --- a/docs/Model/NewRole.md +++ b/docs/Model/NewRole.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of the role. | **description** | **string** | Description of the role. | [optional] -**acl** | **string** | Role Policy this should be a stringified blob of json. | +**acl** | **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. | **members** | **int[]** | An array of user identifiers. | [[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/NewRuleset.md b/docs/Model/NewRuleset.md index 850a3be0..41f7d955 100644 --- a/docs/Model/NewRuleset.md +++ b/docs/Model/NewRuleset.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **rules** | [**\TalonOne\Client\Model\Rule[]**](Rule.md) | Set of rules to apply. | +**strikethroughRules** | [**\TalonOne\Client\Model\Rule[]**](Rule.md) | Set of rules to apply for strikethrough. | [optional] **bindings** | [**\TalonOne\Client\Model\Binding[]**](Binding.md) | An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array. | **rbVersion** | **string** | The version of the rulebuilder used to create this ruleset. | [optional] **activate** | **bool** | Indicates whether this created ruleset should be activated for the campaign that owns it. | [optional] diff --git a/docs/Model/NewWebhook.md b/docs/Model/NewWebhook.md index 65757f05..11773692 100644 --- a/docs/Model/NewWebhook.md +++ b/docs/Model/NewWebhook.md @@ -4,14 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**applicationIds** | **int[]** | The IDs of the applications that are related to this entity. | -**title** | **string** | Friendly title for this webhook. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | +**title** | **string** | Name or title for this webhook. | **verb** | **string** | API method for this webhook. | -**url** | **string** | API url (supports templating using parameters) for this webhook. | +**url** | **string** | API URL (supports templating using parameters) for this webhook. | **headers** | **string[]** | List of API HTTP headers for this webhook. | **payload** | **string** | API payload (supports templating using parameters) for this webhook. | [optional] **params** | [**\TalonOne\Client\Model\TemplateArgDef[]**](TemplateArgDef.md) | Array of template argument definitions. | -**enabled** | **bool** | Enables or disables webhook from showing in rule builder. | +**enabled** | **bool** | Enables or disables webhook from showing in the Rule Builder. | [[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/NotificationWebhook.md b/docs/Model/NotificationWebhook.md index e1256a6d..f944d003 100644 --- a/docs/Model/NotificationWebhook.md +++ b/docs/Model/NotificationWebhook.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **applicationId** | **int** | The ID of the application that owns this entity. | -**url** | **string** | API url for this notification webhook. | -**headers** | **string[]** | List of API HTTP headers for this notification webhook. | +**url** | **string** | API URL for the given webhook-based notification. | +**headers** | **string[]** | List of API HTTP headers for the given webhook-based notification. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/OutgoingIntegrationBrazePolicy.md b/docs/Model/OutgoingIntegrationBrazePolicy.md new file mode 100644 index 00000000..4dcf5ad9 --- /dev/null +++ b/docs/Model/OutgoingIntegrationBrazePolicy.md @@ -0,0 +1,12 @@ +# # OutgoingIntegrationBrazePolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**baseUrl** | **string** | The base URL of your Braze deployment. | +**apiKey** | **string** | The API key of your Braze deployment. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/OutgoingIntegrationConfiguration.md b/docs/Model/OutgoingIntegrationConfiguration.md new file mode 100644 index 00000000..00b5769a --- /dev/null +++ b/docs/Model/OutgoingIntegrationConfiguration.md @@ -0,0 +1,14 @@ +# # OutgoingIntegrationConfiguration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. | +**accountId** | **int** | The ID of the account to which this configuration belongs. | +**typeId** | **int** | The outgoing integration type ID. | +**policy** | [**object**](.md) | | + +[[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/OutgoingIntegrationType.md b/docs/Model/OutgoingIntegrationType.md new file mode 100644 index 00000000..166a0eeb --- /dev/null +++ b/docs/Model/OutgoingIntegrationType.md @@ -0,0 +1,15 @@ +# # OutgoingIntegrationType + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique ID for this entity. | +**name** | **string** | Name of the outgoing integration. | +**description** | **string** | Description of the outgoing integration. | [optional] +**category** | **string** | Category of the outgoing integration. | [optional] +**documentationLink** | **string** | Http link to the outgoing integration's documentation. | [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/OutgoingIntegrationTypes.md b/docs/Model/OutgoingIntegrationTypes.md new file mode 100644 index 00000000..45c15f40 --- /dev/null +++ b/docs/Model/OutgoingIntegrationTypes.md @@ -0,0 +1,11 @@ +# # OutgoingIntegrationTypes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\TalonOne\Client\Model\OutgoingIntegrationType[]**](OutgoingIntegrationType.md) | List of outgoing integrations. | [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/OutgoingIntegrationWebhookTemplate.md b/docs/Model/OutgoingIntegrationWebhookTemplate.md new file mode 100644 index 00000000..b51fbf56 --- /dev/null +++ b/docs/Model/OutgoingIntegrationWebhookTemplate.md @@ -0,0 +1,16 @@ +# # OutgoingIntegrationWebhookTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique Id for this entity. | +**integrationType** | **int** | Unique Id of outgoing integration type. | +**title** | **string** | Title of the webhook template. | +**description** | **string** | General description for the specific outgoing integration webhook template. | +**payload** | **string** | API payload (supports templating using parameters) for this webhook template. | +**method** | **string** | API method for this webhook. | + +[[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/OutgoingIntegrationWebhookTemplates.md b/docs/Model/OutgoingIntegrationWebhookTemplates.md new file mode 100644 index 00000000..c01eda78 --- /dev/null +++ b/docs/Model/OutgoingIntegrationWebhookTemplates.md @@ -0,0 +1,11 @@ +# # OutgoingIntegrationWebhookTemplates + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**\TalonOne\Client\Model\OutgoingIntegrationWebhookTemplate[]**](OutgoingIntegrationWebhookTemplate.md) | The list of webhook templates for a given outgoing integration type. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/Picklist.md b/docs/Model/Picklist.md new file mode 100644 index 00000000..92b99228 --- /dev/null +++ b/docs/Model/Picklist.md @@ -0,0 +1,18 @@ +# # Picklist + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**type** | **string** | The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. | +**values** | **string[]** | The list of allowed values provided by this picklist. | +**modifiedBy** | **int** | ID of the user who last updated this effect if available. | [optional] +**createdBy** | **int** | ID of the user who created this effect. | +**accountId** | **int** | The ID of the account that owns this entity. | [optional] +**imported** | **bool** | Imported flag shows that a picklist is imported by a CSV file or not | [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/PriorityPosition.md b/docs/Model/PriorityPosition.md new file mode 100644 index 00000000..1ec8c367 --- /dev/null +++ b/docs/Model/PriorityPosition.md @@ -0,0 +1,12 @@ +# # PriorityPosition + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**set** | **string** | The name of the priority set where the campaign is located. | [default to 'universal'] +**position** | **int** | The position of the campaign in the priority order starting from 1. | + +[[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/Referral.md b/docs/Model/Referral.md index 38c5726f..6dbc9975 100644 --- a/docs/Model/Referral.md +++ b/docs/Model/Referral.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | **campaignId** | **int** | ID of the campaign from which the referral received the referral code. | **advocateProfileIntegrationId** | **string** | The Integration ID of the Advocate's Profile. | diff --git a/docs/Model/ReferralConstraints.md b/docs/Model/ReferralConstraints.md index ff18e9b4..5f13e59a 100644 --- a/docs/Model/ReferralConstraints.md +++ b/docs/Model/ReferralConstraints.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. `0` means no limit but any campaign usage limits will still apply. | [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/ReopenSessionResponse.md b/docs/Model/ReopenSessionResponse.md new file mode 100644 index 00000000..09eb41fb --- /dev/null +++ b/docs/Model/ReopenSessionResponse.md @@ -0,0 +1,11 @@ +# # ReopenSessionResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effects** | [**\TalonOne\Client\Model\Effect[]**](Effect.md) | The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). | + +[[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/ReserveCouponEffectProps.md b/docs/Model/ReserveCouponEffectProps.md new file mode 100644 index 00000000..173ac330 --- /dev/null +++ b/docs/Model/ReserveCouponEffectProps.md @@ -0,0 +1,13 @@ +# # ReserveCouponEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**couponValue** | **string** | The value of the coupon currently on scope. | +**profileIntegrationId** | **string** | The ID of this customer profile in the third-party integration. | +**isNewReservation** | **bool** | Indicates whether this is a new coupon reservation or not. | + +[[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/ReturnIntegrationRequest.md b/docs/Model/ReturnIntegrationRequest.md index 7422a4be..f7d85829 100644 --- a/docs/Model/ReturnIntegrationRequest.md +++ b/docs/Model/ReturnIntegrationRequest.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **return** | [**\TalonOne\Client\Model\NewReturn**](NewReturn.md) | | -**responseContent** | **string[]** | Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. **Note:** `ruleFailureReasons` is always part of the response when the [Application type](https://docs.talon.one/docs/product/applications/overview#application-types) is `sandbox`. | [optional] +**responseContent** | **string[]** | Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ReturnedCartItem.md b/docs/Model/ReturnedCartItem.md index 7879d169..4ad09f80 100644 --- a/docs/Model/ReturnedCartItem.md +++ b/docs/Model/ReturnedCartItem.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **position** | **int** | The index of the cart item in the provided customer session's `cartItems` property. | -**quantity** | **int** | Number of cart items to return. It is only available when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. If cart item flattening is disabled, the cart item can only be returned in its entirety. | [optional] +**quantity** | **int** | Number of cart items to return. It is only available when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. If cart item flattening is disabled, the cart item can only be returned in its entirety. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Role.md b/docs/Model/Role.md index be27379e..b5ed5b06 100644 --- a/docs/Model/Role.md +++ b/docs/Model/Role.md @@ -4,15 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **accountId** | **int** | The ID of the account that owns this entity. | -**campaignGroupID** | **int** | The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this role was created for. | [optional] +**campaignGroupID** | **int** | The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/managing-campaign-groups) this role was created for. | [optional] **name** | **string** | Name of the role. | **description** | **string** | Description of the role. | [optional] **members** | **int[]** | A list of user identifiers assigned to this role. | [optional] -**acl** | [**object**](.md) | Role ACL Policy. | +**acl** | [**object**](.md) | The `Access Control List` json defining the role of the user. This represents the access control on the user level. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RoleV2.md b/docs/Model/RoleV2.md new file mode 100644 index 00000000..973806eb --- /dev/null +++ b/docs/Model/RoleV2.md @@ -0,0 +1,15 @@ +# # RoleV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the role. | [optional] +**description** | **string** | Description of the role. | [optional] +**isAdmin** | **bool** | Indicates whether the role grants admin permissions. | [optional] +**permissions** | [**\TalonOne\Client\Model\RoleV2Permissions**](RoleV2Permissions.md) | | [optional] +**members** | **int[]** | An array of user identifiers. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RoleV2ApplicationDetails.md b/docs/Model/RoleV2ApplicationDetails.md new file mode 100644 index 00000000..3cbc003d --- /dev/null +++ b/docs/Model/RoleV2ApplicationDetails.md @@ -0,0 +1,13 @@ +# # RoleV2ApplicationDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**application** | **string** | Name of the Application-level permission set. | [optional] +**campaign** | **string** | Name of the campaign-level permission set. | [optional] +**draftCampaign** | **string** | Name of the draft campaign-level permission set. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RoleV2PermissionSet.md b/docs/Model/RoleV2PermissionSet.md new file mode 100644 index 00000000..2fe263e4 --- /dev/null +++ b/docs/Model/RoleV2PermissionSet.md @@ -0,0 +1,12 @@ +# # RoleV2PermissionSet + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | Name of the permission set. | +**operationIds** | **string[]** | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RoleV2Permissions.md b/docs/Model/RoleV2Permissions.md new file mode 100644 index 00000000..248ac1e8 --- /dev/null +++ b/docs/Model/RoleV2Permissions.md @@ -0,0 +1,12 @@ +# # RoleV2Permissions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**permissionSets** | [**\TalonOne\Client\Model\RoleV2PermissionSet[]**](RoleV2PermissionSet.md) | List of grouped operation IDs to use as a reference in the roles section. Each group of operation IDs has a name. | [optional] +**roles** | [**\TalonOne\Client\Model\RoleV2PermissionsRoles**](RoleV2PermissionsRoles.md) | | [optional] + +[[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/RoleV2PermissionsRoles.md b/docs/Model/RoleV2PermissionsRoles.md new file mode 100644 index 00000000..b51c329d --- /dev/null +++ b/docs/Model/RoleV2PermissionsRoles.md @@ -0,0 +1,13 @@ +# # RoleV2PermissionsRoles + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applications** | [**map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]**](RoleV2ApplicationDetails.md) | | [optional] +**loyaltyPrograms** | **map[string,string]** | | [optional] +**campaignAccessGroups** | **map[string,string]** | | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md b/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md index e83a39aa..b2e44ad3 100644 --- a/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md +++ b/docs/Model/RollbackAddedLoyaltyPointsEffectProps.md @@ -10,8 +10,8 @@ Name | Type | Description | Notes **recipientIntegrationId** | **string** | The user for whom these points were originally added. | **transactionUUID** | **string** | The identifier of 'deduction' entry added to the ledger as the `addLoyaltyPoints` effect is rolled back. | **cartItemPosition** | **float** | The index of the item in the cart items for which the loyalty points were rolled back. | [optional] -**cartItemSubPosition** | **float** | The sub-position is returned when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. It indicates to which item the loyalty points were rolled back, for cart items with `quantity` > 1. | [optional] -**cardIdentifier** | **string** | The card on which these points were originally added. | [optional] +**cartItemSubPosition** | **float** | The sub-position is returned when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. It indicates to which item the loyalty points were rolled back, for cart items with `quantity` > 1. | [optional] +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md b/docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md index f183ccf7..8946dafd 100644 --- a/docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md +++ b/docs/Model/RollbackDeductedLoyaltyPointsEffectProps.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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. | -**cardIdentifier** | **string** | The card on which these points were added. | [optional] +**cardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Rule.md b/docs/Model/Rule.md index d9039673..d4262322 100644 --- a/docs/Model/Rule.md +++ b/docs/Model/Rule.md @@ -4,6 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | **string** | A unique identifier for the rule. | [optional] +**parentId** | **string** | The ID of the rule that was copied to create this rule. | [optional] **title** | **string** | A short description of the rule. | **description** | **string** | A longer, more detailed description of the rule. | [optional] **bindings** | [**\TalonOne\Client\Model\Binding[]**](Binding.md) | An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array. | [optional] diff --git a/docs/Model/Ruleset.md b/docs/Model/Ruleset.md index ce95ba9a..544be246 100644 --- a/docs/Model/Ruleset.md +++ b/docs/Model/Ruleset.md @@ -4,10 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**userId** | **int** | The ID of the account that owns this entity. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**userId** | **int** | The ID of the user associated with this entity. | **rules** | [**\TalonOne\Client\Model\Rule[]**](Rule.md) | Set of rules to apply. | +**strikethroughRules** | [**\TalonOne\Client\Model\Rule[]**](Rule.md) | Set of rules to apply for strikethrough. | [optional] **bindings** | [**\TalonOne\Client\Model\Binding[]**](Binding.md) | An array that provides objects with variable names (name) and talang expressions to whose result they are bound (expression) during rule evaluation. The order of the evaluation is decided by the position in the array. | **rbVersion** | **string** | The version of the rulebuilder used to create this ruleset. | [optional] **activate** | **bool** | Indicates whether this created ruleset should be activated for the campaign that owns it. | [optional] diff --git a/docs/Model/SamlConnection.md b/docs/Model/SamlConnection.md index fe8111a5..6a3821cd 100644 --- a/docs/Model/SamlConnection.md +++ b/docs/Model/SamlConnection.md @@ -13,8 +13,8 @@ Name | Type | Description | Notes **signOutURL** | **string** | Single Sign-Out URL. | [optional] **metadataURL** | **string** | Metadata URL. | [optional] **audienceURI** | **string** | The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. | -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | [[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/SetDiscountEffectProps.md b/docs/Model/SetDiscountEffectProps.md index 7ab41d82..645fc6dd 100644 --- a/docs/Model/SetDiscountEffectProps.md +++ b/docs/Model/SetDiscountEffectProps.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name/description of this discount. | +**name** | **string** | The name / description of this discount | **value** | **float** | The total monetary value of the discount. | **scope** | **string** | The scope which the discount was applied on, can be one of (cartItems,additionalCosts,sessionTotal). | [optional] **desiredValue** | **float** | The original value of the discount. | [optional] diff --git a/docs/Model/SetDiscountPerAdditionalCostEffectProps.md b/docs/Model/SetDiscountPerAdditionalCostEffectProps.md index 7e999431..edd86560 100644 --- a/docs/Model/SetDiscountPerAdditionalCostEffectProps.md +++ b/docs/Model/SetDiscountPerAdditionalCostEffectProps.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name/description of this discount. | +**name** | **string** | The name / description of this discount | **additionalCostId** | **int** | The ID of the additional cost. | **additionalCost** | **string** | The name of the additional cost. | **value** | **float** | The total monetary value of the discount. | diff --git a/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md b/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md index c06e909d..83235e4c 100644 --- a/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md +++ b/docs/Model/SetDiscountPerAdditionalCostPerItemEffectProps.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **string** | The name/description of this discount. | +**name** | **string** | The name / description of this discount | **additionalCostId** | **int** | The ID of the additional cost. | **value** | **float** | The total monetary value of the discount. | **position** | **float** | The index of the item in the cart item list containing the additional cost to be discounted. | -**subPosition** | **float** | Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. | [optional] +**subPosition** | **float** | Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. | [optional] **additionalCost** | **string** | The name of the additional cost. | **desiredValue** | **float** | Only with [partial discounts enabled](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#partial-discounts). Represents the monetary value of the discount to be applied to additional discount without considering budget limitations. | [optional] diff --git a/docs/Model/SetDiscountPerItemEffectProps.md b/docs/Model/SetDiscountPerItemEffectProps.md index 1647970d..242b925d 100644 --- a/docs/Model/SetDiscountPerItemEffectProps.md +++ b/docs/Model/SetDiscountPerItemEffectProps.md @@ -7,13 +7,13 @@ Name | Type | Description | Notes **name** | **string** | The name of the discount. Contains a hashtag character indicating the index of the position of the item the discount applies to. It is identical to the value of the `position` property. | **value** | **float** | The total monetary value of the discount. | **position** | **float** | The index of the item in the cart items list on which this discount should be applied. | -**subPosition** | **float** | Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. | [optional] +**subPosition** | **float** | Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. | [optional] **desiredValue** | **float** | The original value of the discount. | [optional] **scope** | **string** | The scope of the discount: - `additionalCosts`: The discount applies to all the additional costs of the item. - `itemTotal`: The discount applies to the price of the item + the additional costs of the item. - `price`: The discount applies to the price of the item. | [optional] **totalDiscount** | **float** | The total discount given if this effect is a result of a prorated discount. | [optional] **desiredTotalDiscount** | **float** | The original total discount to give if this effect is a result of a prorated discount. | [optional] **bundleIndex** | **int** | The position of the bundle in a list of item bundles created from the same bundle definition. | [optional] -**bundleName** | **string** | The name of the bundle binding. | [optional] +**bundleName** | **string** | The name of the bundle definition. | [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/StrikethroughChangedItem.md b/docs/Model/StrikethroughChangedItem.md new file mode 100644 index 00000000..45324ec2 --- /dev/null +++ b/docs/Model/StrikethroughChangedItem.md @@ -0,0 +1,17 @@ +# # StrikethroughChangedItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the event that triggered the strikethrough labeling. | +**catalogId** | **int** | The ID of the catalog that the changed item belongs to. | +**sku** | **string** | The unique SKU of the changed item. | +**version** | **int** | The version of the changed item. | +**price** | **float** | The price of the changed item. | +**evaluatedAt** | [**\DateTime**](\DateTime.md) | The evaluation time of the changed item. | +**effects** | [**\TalonOne\Client\Model\StrikethroughEffect[]**](StrikethroughEffect.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/StrikethroughCustomEffectPerItemProps.md b/docs/Model/StrikethroughCustomEffectPerItemProps.md new file mode 100644 index 00000000..4e00f505 --- /dev/null +++ b/docs/Model/StrikethroughCustomEffectPerItemProps.md @@ -0,0 +1,13 @@ +# # StrikethroughCustomEffectPerItemProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effectId** | **int** | ID of the effect. | +**name** | **string** | The type of the custom effect. | +**payload** | [**object**](.md) | The JSON payload of the custom effect. | + +[[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/StrikethroughEffect.md b/docs/Model/StrikethroughEffect.md new file mode 100644 index 00000000..994fc158 --- /dev/null +++ b/docs/Model/StrikethroughEffect.md @@ -0,0 +1,16 @@ +# # StrikethroughEffect + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**campaignId** | **int** | The ID of the campaign that effect belongs to. | +**rulesetId** | **int** | The ID of the ruleset containing the rule that triggered this effect. | +**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. | +**type** | **string** | The type of this effect. | +**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/StrikethroughLabelingNotification.md b/docs/Model/StrikethroughLabelingNotification.md new file mode 100644 index 00000000..95725d9e --- /dev/null +++ b/docs/Model/StrikethroughLabelingNotification.md @@ -0,0 +1,15 @@ +# # StrikethroughLabelingNotification + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**applicationId** | **int** | The ID of the application that catalog items labels belongs to. | +**currentBatch** | **int** | The batch number of the notification. Notifications might be sent in different batches. | +**totalBatches** | **int** | The total number of batches for the notification. | +**trigger** | [**\TalonOne\Client\Model\StrikethroughTrigger**](StrikethroughTrigger.md) | | +**changedItems** | [**\TalonOne\Client\Model\StrikethroughChangedItem[]**](StrikethroughChangedItem.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/StrikethroughSetDiscountPerItemEffectProps.md b/docs/Model/StrikethroughSetDiscountPerItemEffectProps.md new file mode 100644 index 00000000..c99550ae --- /dev/null +++ b/docs/Model/StrikethroughSetDiscountPerItemEffectProps.md @@ -0,0 +1,12 @@ +# # StrikethroughSetDiscountPerItemEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **string** | effect name. | +**value** | [**object**](.md) | discount value. | + +[[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/StrikethroughTrigger.md b/docs/Model/StrikethroughTrigger.md new file mode 100644 index 00000000..69dc8108 --- /dev/null +++ b/docs/Model/StrikethroughTrigger.md @@ -0,0 +1,15 @@ +# # StrikethroughTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | The ID of the event that triggered the strikethrough labeling. | +**type** | **string** | The type of event that triggered the strikethrough labeling. | +**triggeredAt** | [**\DateTime**](\DateTime.md) | The creation time of the event that triggered the strikethrough labeling. | +**totalAffectedItems** | **int** | The total number of items affected by the event that triggered the strikethrough labeling. | +**payload** | [**object**](.md) | The arbitrary properties associated with this trigger type. | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TalangAttribute.md b/docs/Model/TalangAttribute.md new file mode 100644 index 00000000..f1dcb56b --- /dev/null +++ b/docs/Model/TalangAttribute.md @@ -0,0 +1,19 @@ +# # TalangAttribute + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**entity** | **string** | The name of the entity of the attribute. | [optional] +**name** | **string** | The attribute name that will be used in API requests and Talang. E.g. if `name == \"region\"` then you would set the region attribute by including an `attributes.region` property in your request payload. | +**title** | **string** | The name of the attribute that is displayed to the user in the Campaign Manager. | [optional] +**type** | **string** | The talang type of the attribute. | +**description** | **string** | A description of the attribute. | [optional] +**visible** | **bool** | Indicates whether the attribute is visible in the UI or not. | [default to true] +**kind** | **string** | Indicate the kind of the attribute. | +**campaignsCount** | **int** | The number of campaigns that refer to the attribute. | +**exampleValue** | **string[]** | Examples of values that can be assigned to the attribute. | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + + diff --git a/docs/Model/TalangAttributeVisibility.md b/docs/Model/TalangAttributeVisibility.md new file mode 100644 index 00000000..118bc248 --- /dev/null +++ b/docs/Model/TalangAttributeVisibility.md @@ -0,0 +1,12 @@ +# # TalangAttributeVisibility + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**invisible** | **string[]** | List of attribute names to hide in the UI. | [optional] +**visible** | **string[]** | List of attribute names to show in the UI. | [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/TemplateArgDef.md b/docs/Model/TemplateArgDef.md index 78bfb8e0..627994de 100644 --- a/docs/Model/TemplateArgDef.md +++ b/docs/Model/TemplateArgDef.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **description** | **string** | A campaigner-friendly description of the argument, this will also be shown in the rule editor. | **title** | **string** | A campaigner friendly name for the argument, this will be shown in the rule editor. | **ui** | [**object**](.md) | Arbitrary metadata that may be used to render an input for this argument. | +**picklistID** | **int** | ID of the picklist linked to a template. | [optional] +**restrictedByPicklist** | **bool** | Whether or not this attribute's value is restricted by picklist (`picklist` property) | [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/TemplateDef.md b/docs/Model/TemplateDef.md index d246b79b..5488548a 100644 --- a/docs/Model/TemplateDef.md +++ b/docs/Model/TemplateDef.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | **applicationId** | **int** | The ID of the application that owns this entity. | **title** | **string** | Campaigner-friendly name for the template that will be shown in the rule editor. | **description** | **string** | A short description of the template that will be shown in the rule editor. | diff --git a/docs/Model/TransferLoyaltyCard.md b/docs/Model/TransferLoyaltyCard.md new file mode 100644 index 00000000..c0d64b1f --- /dev/null +++ b/docs/Model/TransferLoyaltyCard.md @@ -0,0 +1,11 @@ +# # TransferLoyaltyCard + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**newCardIdentifier** | **string** | The alphanumeric identifier of the loyalty card. | + +[[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 fa277c63..283c9242 100644 --- a/docs/Model/UpdateApplication.md +++ b/docs/Model/UpdateApplication.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **exclusiveCampaignsStrategy** | **string** | The strategy used when choosing exclusive campaigns for evaluation. | [optional] [default to 'listOrder'] **defaultDiscountScope** | **string** | The default scope to apply `setDiscount` effects on if no scope was provided with the effect. | [optional] **enableCascadingDiscounts** | **bool** | Indicates if discounts should cascade for this Application. | [optional] -**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). | [optional] +**enableFlattenedCartItems** | **bool** | Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). | [optional] **attributesSettings** | [**\TalonOne\Client\Model\AttributesSettings**](AttributesSettings.md) | | [optional] **sandbox** | **bool** | Indicates if this is a live or sandbox Application. | [optional] **enablePartialDiscounts** | **bool** | Indicates if this Application supports partial discounts. | [optional] diff --git a/docs/Model/UpdateCampaignTemplate.md b/docs/Model/UpdateCampaignTemplate.md index ab262489..b41656e2 100644 --- a/docs/Model/UpdateCampaignTemplate.md +++ b/docs/Model/UpdateCampaignTemplate.md @@ -7,19 +7,19 @@ Name | Type | Description | Notes **name** | **string** | The campaign template name. | **description** | **string** | Customer-facing text that explains the objective of the template. | **instructions** | **string** | Customer-facing text that explains how to use the template. For example, you can use this property to explain the available attributes of this template, and how they can be modified when a user uses this template to create a new campaign. | -**campaignAttributes** | [**object**](.md) | The Campaign Attributes that Campaigns created from this template will have by default. | [optional] -**couponAttributes** | [**object**](.md) | The Campaign Attributes that Coupons created from this template will have by default. | [optional] -**state** | **string** | Only Campaign Templates in 'available' state may be used to create Campaigns. | -**activeRulesetId** | **int** | The ID of the Ruleset this Campaign Template will use. | [optional] +**campaignAttributes** | [**object**](.md) | The campaign attributes that campaigns created from this template will have by default. | [optional] +**couponAttributes** | [**object**](.md) | The campaign attributes that coupons created from this template will have by default. | [optional] +**state** | **string** | Only campaign templates in 'available' state may be used to create campaigns. | +**activeRulesetId** | **int** | The ID of the ruleset this campaign template will use. | [optional] **tags** | **string[]** | A list of tags for the campaign template. | [optional] **features** | **string[]** | A list of features for the campaign template. | [optional] **couponSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **referralSettings** | [**\TalonOne\Client\Model\CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] -**limits** | [**\TalonOne\Client\Model\TemplateLimitConfig[]**](TemplateLimitConfig.md) | The set of limits that will operate for this campaign template. | [optional] -**templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Template parameters are fields which can be used to replace values in a rule. | [optional] -**applicationsIds** | **int[]** | A list of the IDs of the applications that are subscribed to this campaign template. | +**limits** | [**\TalonOne\Client\Model\TemplateLimitConfig[]**](TemplateLimitConfig.md) | The set of limits that operate for this campaign template. | [optional] +**templateParams** | [**\TalonOne\Client\Model\CampaignTemplateParams[]**](CampaignTemplateParams.md) | Fields which can be used to replace values in a rule. | [optional] +**applicationsIds** | **int[]** | A list of IDs of the Applications that are subscribed to this campaign template. | **campaignCollections** | [**\TalonOne\Client\Model\CampaignTemplateCollection[]**](CampaignTemplateCollection.md) | The campaign collections from the blueprint campaign for the template. | [optional] -**defaultCampaignGroupId** | **int** | The default campaignGroupId. | [optional] +**defaultCampaignGroupId** | **int** | The default campaign group ID. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCoupon.md b/docs/Model/UpdateCoupon.md index 5af996d1..a03621e3 100644 --- a/docs/Model/UpdateCoupon.md +++ b/docs/Model/UpdateCoupon.md @@ -5,12 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | [optional] -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] **limits** | [**\TalonOne\Client\Model\LimitConfig[]**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **recipientIntegrationId** | **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] +**isReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateCouponBatch.md b/docs/Model/UpdateCouponBatch.md index 705daecb..470bb7e4 100644 --- a/docs/Model/UpdateCouponBatch.md +++ b/docs/Model/UpdateCouponBatch.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **usageLimit** | **int** | The number of times the coupon code can be redeemed. `0` means unlimited redemptions but any campaign usage limits will still apply. | [optional] -**discountLimit** | **float** | The amount of discounts that can be given with this coupon code. | [optional] +**discountLimit** | **float** | The total discount value that the code can give. Typically used to represent a gift card value. | [optional] +**reservationLimit** | **int** | The number of reservations that can be made with this coupon code. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the coupon becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] **batchID** | **string** | The id of the batch the coupon belongs to. | [optional] diff --git a/docs/Model/UpdateCustomEffect.md b/docs/Model/UpdateCustomEffect.md index 4e95f56e..0ec46b71 100644 --- a/docs/Model/UpdateCustomEffect.md +++ b/docs/Model/UpdateCustomEffect.md @@ -4,7 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**applicationIds** | **int[]** | The IDs of the applications that are related to this entity. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. | +**isPerItem** | **bool** | Indicates if this effect is per item or not. | [optional] **name** | **string** | The name of this effect. | **title** | **string** | The title of this effect. | **payload** | **string** | The JSON payload of this effect. | diff --git a/docs/Model/UpdateLoyaltyCard.md b/docs/Model/UpdateLoyaltyCard.md index 3355c2bb..412902b9 100644 --- a/docs/Model/UpdateLoyaltyCard.md +++ b/docs/Model/UpdateLoyaltyCard.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | Status of the loyalty card. Can be one of: ['active', 'disabled'] | +**status** | **string** | Status of the loyalty card. Can be one of: ['active', 'inactive'] | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateLoyaltyProgram.md b/docs/Model/UpdateLoyaltyProgram.md index e66987e1..b0d7fbfe 100644 --- a/docs/Model/UpdateLoyaltyProgram.md +++ b/docs/Model/UpdateLoyaltyProgram.md @@ -7,10 +7,11 @@ Name | Type | Description | Notes **title** | **string** | The display title for the Loyalty Program. | [optional] **description** | **string** | Description of our Loyalty Program. | [optional] **subscribedApplications** | **int[]** | A list containing the IDs of all applications that are subscribed to this Loyalty Program. | [optional] -**defaultValidity** | **string** | Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. | [optional] -**defaultPending** | **string** | Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. | [optional] +**defaultValidity** | **string** | The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | [optional] +**defaultPending** | **string** | The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. | [optional] **allowSubledger** | **bool** | Indicates if this program supports subledgers inside the program. | [optional] **usersPerCardLimit** | **int** | The max amount of user profiles with whom a card can be shared. This can be set to 0 for no limit. This property is only used when `cardBased` is `true`. | [optional] +**sandbox** | **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] **tiers** | [**\TalonOne\Client\Model\NewLoyaltyTier[]**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdatePicklist.md b/docs/Model/UpdatePicklist.md new file mode 100644 index 00000000..688660b0 --- /dev/null +++ b/docs/Model/UpdatePicklist.md @@ -0,0 +1,12 @@ +# # UpdatePicklist + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **string** | The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. | +**values** | **string[]** | The list of allowed values provided by this picklist. | + +[[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/UpdateReferral.md b/docs/Model/UpdateReferral.md index 15355d34..c4a0f04c 100644 --- a/docs/Model/UpdateReferral.md +++ b/docs/Model/UpdateReferral.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **friendProfileIntegrationId** | **string** | An optional Integration ID of the Friend's Profile. | [optional] **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. | [optional] **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] diff --git a/docs/Model/UpdateReferralBatch.md b/docs/Model/UpdateReferralBatch.md index 3bd1149a..5a86fc87 100644 --- a/docs/Model/UpdateReferralBatch.md +++ b/docs/Model/UpdateReferralBatch.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **attributes** | [**object**](.md) | Arbitrary properties associated with this item. | [optional] **batchID** | **string** | The id of the batch the referral belongs to. | **startDate** | [**\DateTime**](\DateTime.md) | Timestamp at which point the referral code becomes valid. | [optional] -**expiryDate** | [**\DateTime**](\DateTime.md) | Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] +**expiryDate** | [**\DateTime**](\DateTime.md) | Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. | [optional] **usageLimit** | **int** | The number of times a referral code can be used. This can be set to 0 for no limit, but any campaign usage limits will still apply. | [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/UpdateRole.md b/docs/Model/UpdateRole.md index d51f8a73..e0587994 100644 --- a/docs/Model/UpdateRole.md +++ b/docs/Model/UpdateRole.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | Name of the role. | [optional] **description** | **string** | Description of the role. | [optional] -**acl** | **string** | Role Policy this should be a stringified blob of json. | [optional] +**acl** | **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. | [optional] **members** | **int[]** | An array of user identifiers. | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateUser.md b/docs/Model/UpdateUser.md index d51e4805..7b38ae95 100644 --- a/docs/Model/UpdateUser.md +++ b/docs/Model/UpdateUser.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **string** | The user name. | [optional] -**policy** | **string** | ACL Json. | [optional] +**policy** | **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. | [optional] **state** | **string** | New state (\"deactivated\" or \"active\") for the user. Only usable by admins for the user. | [optional] **roles** | **int[]** | List of roles to assign to the user. | [optional] **applicationNotificationSubscriptions** | [**object**](.md) | | [optional] diff --git a/docs/Model/User.md b/docs/Model/User.md index caf2cd21..d01ff1fe 100644 --- a/docs/Model/User.md +++ b/docs/Model/User.md @@ -4,9 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | **email** | **string** | The email address associated with your account. | **accountId** | **int** | The ID of the account that owns this entity. | **inviteToken** | **string** | Invite token, empty if the user as already accepted their invite. | diff --git a/docs/Model/UserEntity.md b/docs/Model/UserEntity.md index f1487df2..58ef09e8 100644 --- a/docs/Model/UserEntity.md +++ b/docs/Model/UserEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**userId** | **int** | The ID of the account that owns this entity. | +**userId** | **int** | The ID of the user associated with this entity. | [[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/Webhook.md b/docs/Model/Webhook.md index aeb7ff0d..cd26a4dc 100644 --- a/docs/Model/Webhook.md +++ b/docs/Model/Webhook.md @@ -4,17 +4,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. | -**created** | [**\DateTime**](\DateTime.md) | The exact moment this entity was created. | -**modified** | [**\DateTime**](\DateTime.md) | The exact moment this entity was last modified. | -**applicationIds** | **int[]** | The IDs of the applications that are related to this entity. The IDs of the applications that are related to this entity. | -**title** | **string** | Friendly title for this webhook. | +**id** | **int** | Internal ID of this entity. | +**created** | [**\DateTime**](\DateTime.md) | The time this entity was created. | +**modified** | [**\DateTime**](\DateTime.md) | The time this entity was last modified. | +**applicationIds** | **int[]** | The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. | +**title** | **string** | Name or title for this webhook. | **verb** | **string** | API method for this webhook. | -**url** | **string** | API url (supports templating using parameters) for this webhook. | +**url** | **string** | API URL (supports templating using parameters) for this webhook. | **headers** | **string[]** | List of API HTTP headers for this webhook. | **payload** | **string** | API payload (supports templating using parameters) for this webhook. | [optional] **params** | [**\TalonOne\Client\Model\TemplateArgDef[]**](TemplateArgDef.md) | Array of template argument definitions. | -**enabled** | **bool** | Enables or disables webhook from showing in rule builder. | +**enabled** | **bool** | Enables or disables webhook from showing in the Rule Builder. | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/lib/Api/IntegrationApi.php b/lib/Api/IntegrationApi.php index 4ee5d9c7..6a882b72 100644 --- a/lib/Api/IntegrationApi.php +++ b/lib/Api/IntegrationApi.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -137,7 +137,7 @@ public function createAudienceV2($body) * * Create audience * - * @param \TalonOne\Client\Model\NewAudience $body (required) + * @param \TalonOne\Client\Model\NewAudience $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -285,7 +285,7 @@ public function createAudienceV2WithHttpInfo($body) * * Create audience * - * @param \TalonOne\Client\Model\NewAudience $body (required) + * @param \TalonOne\Client\Model\NewAudience $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -305,7 +305,7 @@ function ($response) { * * Create audience * - * @param \TalonOne\Client\Model\NewAudience $body (required) + * @param \TalonOne\Client\Model\NewAudience $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -352,7 +352,7 @@ function ($exception) { /** * Create request for operation 'createAudienceV2' * - * @param \TalonOne\Client\Model\NewAudience $body (required) + * @param \TalonOne\Client\Model\NewAudience $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -472,7 +472,7 @@ public function createCouponReservation($couponValue, $body) * Create coupon reservation * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -621,7 +621,7 @@ public function createCouponReservationWithHttpInfo($couponValue, $body) * Create coupon reservation * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -642,7 +642,7 @@ function ($response) { * Create coupon reservation * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -690,7 +690,7 @@ function ($exception) { * Create request for operation 'createCouponReservation' * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -822,7 +822,7 @@ public function createReferral($body) * * Create referral code for an advocate * - * @param \TalonOne\Client\Model\NewReferral $body (required) + * @param \TalonOne\Client\Model\NewReferral $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -950,7 +950,7 @@ public function createReferralWithHttpInfo($body) * * Create referral code for an advocate * - * @param \TalonOne\Client\Model\NewReferral $body (required) + * @param \TalonOne\Client\Model\NewReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -970,7 +970,7 @@ function ($response) { * * Create referral code for an advocate * - * @param \TalonOne\Client\Model\NewReferral $body (required) + * @param \TalonOne\Client\Model\NewReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1017,7 +1017,7 @@ function ($exception) { /** * Create request for operation 'createReferral' * - * @param \TalonOne\Client\Model\NewReferral $body (required) + * @param \TalonOne\Client\Model\NewReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1119,7 +1119,7 @@ protected function createReferralRequest($body) * Create referral codes for multiple advocates * * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1136,8 +1136,8 @@ public function createReferralsForMultipleAdvocates($body, $silent = 'yes') * * Create referral codes for multiple advocates * - * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1265,8 +1265,8 @@ public function createReferralsForMultipleAdvocatesWithHttpInfo($body, $silent = * * Create referral codes for multiple advocates * - * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1286,8 +1286,8 @@ function ($response) { * * Create referral codes for multiple advocates * - * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1334,8 +1334,8 @@ function ($exception) { /** * Create request for operation 'createReferralsForMultipleAdvocates' * - * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewReferralsForMultipleAdvocates $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1961,7 +1961,7 @@ public function deleteCouponReservation($couponValue, $body) * Delete coupon reservations * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2038,7 +2038,7 @@ public function deleteCouponReservationWithHttpInfo($couponValue, $body) * Delete coupon reservations * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2059,7 +2059,7 @@ function ($response) { * Delete coupon reservations * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2096,7 +2096,7 @@ function ($exception) { * Create request for operation 'deleteCouponReservation' * * @param string $couponValue The code of the coupon. (required) - * @param \TalonOne\Client\Model\CouponReservations $body (required) + * @param \TalonOne\Client\Model\CouponReservations $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2211,7 +2211,7 @@ protected function deleteCouponReservationRequest($couponValue, $body) * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2227,7 +2227,7 @@ public function deleteCustomerData($integrationId) * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2295,7 +2295,7 @@ public function deleteCustomerDataWithHttpInfo($integrationId) * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2315,7 +2315,7 @@ function ($response) { * * Delete customer's personal data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -2351,7 +2351,7 @@ function ($exception) { /** * Create request for operation 'deleteCustomerData' * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -2457,21 +2457,20 @@ protected function deleteCustomerDataRequest($integrationId) * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) * @param bool $loyalty Set to `true` to include loyalty information in the response. (optional) * @param bool $giveaways Set to `true` to include giveaways information in the response. (optional) - * @param \DateTime $loyaltyProjectionEndDate Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\CustomerInventory|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCustomerInventory($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null, $loyaltyProjectionEndDate = null) + public function getCustomerInventory($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null) { - list($response) = $this->getCustomerInventoryWithHttpInfo($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways, $loyaltyProjectionEndDate); + list($response) = $this->getCustomerInventoryWithHttpInfo($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways); return $response; } @@ -2480,21 +2479,20 @@ public function getCustomerInventory($integrationId, $profile = null, $referrals * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) * @param bool $loyalty Set to `true` to include loyalty information in the response. (optional) * @param bool $giveaways Set to `true` to include giveaways information in the response. (optional) - * @param \DateTime $loyaltyProjectionEndDate Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\CustomerInventory|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerInventoryWithHttpInfo($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null, $loyaltyProjectionEndDate = null) + public function getCustomerInventoryWithHttpInfo($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null) { - $request = $this->getCustomerInventoryRequest($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways, $loyaltyProjectionEndDate); + $request = $this->getCustomerInventoryRequest($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways); try { $options = $this->createHttpClientOption(); @@ -2614,20 +2612,19 @@ public function getCustomerInventoryWithHttpInfo($integrationId, $profile = null * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) * @param bool $loyalty Set to `true` to include loyalty information in the response. (optional) * @param bool $giveaways Set to `true` to include giveaways information in the response. (optional) - * @param \DateTime $loyaltyProjectionEndDate Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerInventoryAsync($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null, $loyaltyProjectionEndDate = null) + public function getCustomerInventoryAsync($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null) { - return $this->getCustomerInventoryAsyncWithHttpInfo($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways, $loyaltyProjectionEndDate) + return $this->getCustomerInventoryAsyncWithHttpInfo($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways) ->then( function ($response) { return $response[0]; @@ -2640,21 +2637,20 @@ function ($response) { * * List customer data * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) * @param bool $loyalty Set to `true` to include loyalty information in the response. (optional) * @param bool $giveaways Set to `true` to include giveaways information in the response. (optional) - * @param \DateTime $loyaltyProjectionEndDate Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerInventoryAsyncWithHttpInfo($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null, $loyaltyProjectionEndDate = null) + public function getCustomerInventoryAsyncWithHttpInfo($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null) { $returnType = '\TalonOne\Client\Model\CustomerInventory'; - $request = $this->getCustomerInventoryRequest($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways, $loyaltyProjectionEndDate); + $request = $this->getCustomerInventoryRequest($integrationId, $profile, $referrals, $coupons, $loyalty, $giveaways); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2693,18 +2689,17 @@ function ($exception) { /** * Create request for operation 'getCustomerInventory' * - * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session endpoint](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2). - The Management API with the [List application's customers endpoint](https://docs.talon.one/management-api/#operation/getApplicationCustomers). (required) + * @param string $integrationId The integration ID of the customer profile. You can get the `integrationId` of a profile using: - A customer session integration Id with the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - The Management API with the [List application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * @param bool $profile Set to `true` to include customer profile information in the response. (optional) * @param bool $referrals Set to `true` to include referral information in the response. (optional) * @param bool $coupons Set to `true` to include coupon information in the response. (optional) * @param bool $loyalty Set to `true` to include loyalty information in the response. (optional) * @param bool $giveaways Set to `true` to include giveaways information in the response. (optional) - * @param \DateTime $loyaltyProjectionEndDate Set an end date to query the projected loyalty balances. You can project results up to 31 days from today. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerInventoryRequest($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null, $loyaltyProjectionEndDate = null) + protected function getCustomerInventoryRequest($integrationId, $profile = null, $referrals = null, $coupons = null, $loyalty = null, $giveaways = null) { // verify the required parameter 'integrationId' is set if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { @@ -2755,13 +2750,6 @@ protected function getCustomerInventoryRequest($integrationId, $profile = null, if ($giveaways !== null) { $queryParams['giveaways'] = $giveaways; } - // query params - if (is_array($loyaltyProjectionEndDate)) { - $loyaltyProjectionEndDate = ObjectSerializer::serializeCollection($loyaltyProjectionEndDate, '', true); - } - if ($loyaltyProjectionEndDate !== null) { - $queryParams['loyaltyProjectionEndDate'] = $loyaltyProjectionEndDate; - } // path params @@ -2847,7 +2835,7 @@ protected function getCustomerInventoryRequest($integrationId, $profile = null, * * Get customer session * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2864,7 +2852,7 @@ public function getCustomerSession($customerSessionId) * * Get customer session * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -2872,7 +2860,1919 @@ public function getCustomerSession($customerSessionId) */ public function getCustomerSessionWithHttpInfo($customerSessionId) { - $request = $this->getCustomerSessionRequest($customerSessionId); + $request = $this->getCustomerSessionRequest($customerSessionId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\IntegrationCustomerSessionResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationCustomerSessionResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\IntegrationCustomerSessionResponse'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\IntegrationCustomerSessionResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getCustomerSessionAsync + * + * Get customer session + * + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCustomerSessionAsync($customerSessionId) + { + return $this->getCustomerSessionAsyncWithHttpInfo($customerSessionId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getCustomerSessionAsyncWithHttpInfo + * + * Get customer session + * + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getCustomerSessionAsyncWithHttpInfo($customerSessionId) + { + $returnType = '\TalonOne\Client\Model\IntegrationCustomerSessionResponse'; + $request = $this->getCustomerSessionRequest($customerSessionId); + + 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 'getCustomerSession' + * + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getCustomerSessionRequest($customerSessionId) + { + // verify the required parameter 'customerSessionId' is set + if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $customerSessionId when calling getCustomerSession' + ); + } + + $resourcePath = '/v2/customer_sessions/{customerSessionId}'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($customerSessionId !== null) { + $resourcePath = str_replace( + '{' . 'customerSessionId' . '}', + ObjectSerializer::toPathValue($customerSessionId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLoyaltyBalances + * + * Get customer's loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\LoyaltyBalances|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function getLoyaltyBalances($loyaltyProgramId, $integrationId, $endDate = null) + { + list($response) = $this->getLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $integrationId, $endDate); + return $response; + } + + /** + * Operation getLoyaltyBalancesWithHttpInfo + * + * Get customer's loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\LoyaltyBalances|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function getLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $integrationId, $endDate = null) + { + $request = $this->getLoyaltyBalancesRequest($loyaltyProgramId, $integrationId, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\LoyaltyBalances' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyBalances', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\LoyaltyBalances'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\LoyaltyBalances', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getLoyaltyBalancesAsync + * + * Get customer's loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyBalancesAsync($loyaltyProgramId, $integrationId, $endDate = null) + { + return $this->getLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLoyaltyBalancesAsyncWithHttpInfo + * + * Get customer's loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $endDate = null) + { + $returnType = '\TalonOne\Client\Model\LoyaltyBalances'; + $request = $this->getLoyaltyBalancesRequest($loyaltyProgramId, $integrationId, $endDate); + + 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 'getLoyaltyBalances' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getLoyaltyBalancesRequest($loyaltyProgramId, $integrationId, $endDate = null) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyBalances' + ); + } + // 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 getLoyaltyBalances' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/balances'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLoyaltyCardBalances + * + * Get card's point balances + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\LoyaltyBalances|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function getLoyaltyCardBalances($loyaltyProgramId, $loyaltyCardId, $endDate = null) + { + list($response) = $this->getLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $endDate); + return $response; + } + + /** + * Operation getLoyaltyCardBalancesWithHttpInfo + * + * Get card's point balances + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\LoyaltyBalances|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function getLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $endDate = null) + { + $request = $this->getLoyaltyCardBalancesRequest($loyaltyProgramId, $loyaltyCardId, $endDate); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\LoyaltyBalances' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyBalances', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\LoyaltyBalances'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\LoyaltyBalances', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getLoyaltyCardBalancesAsync + * + * Get card's point balances + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyCardBalancesAsync($loyaltyProgramId, $loyaltyCardId, $endDate = null) + { + return $this->getLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $endDate) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLoyaltyCardBalancesAsyncWithHttpInfo + * + * Get card's point balances + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $endDate = null) + { + $returnType = '\TalonOne\Client\Model\LoyaltyBalances'; + $request = $this->getLoyaltyCardBalancesRequest($loyaltyProgramId, $loyaltyCardId, $endDate); + + 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 'getLoyaltyCardBalances' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getLoyaltyCardBalancesRequest($loyaltyProgramId, $loyaltyCardId, $endDate = null) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardBalances' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardBalances' + ); + } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.getLoyaltyCardBalances, must be smaller than or equal to 108.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLoyaltyCardTransactions + * + * List card's transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function getLoyaltyCardTransactions($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + { + list($response) = $this->getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + return $response; + } + + /** + * Operation getLoyaltyCardTransactionsWithHttpInfo + * + * List card's transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function getLoyaltyCardTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + { + $request = $this->getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse2001' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2001', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse2001'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse2001', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getLoyaltyCardTransactionsAsync + * + * List card's transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyCardTransactionsAsync($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + { + return $this->getLoyaltyCardTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLoyaltyCardTransactionsAsyncWithHttpInfo + * + * List card's transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyCardTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse2001'; + $request = $this->getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + + 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 'getLoyaltyCardTransactions' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getLoyaltyCardTransactionsRequest($loyaltyProgramId, $loyaltyCardId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardTransactions' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardTransactions' + ); + } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.getLoyaltyCardTransactions, must be smaller than or equal to 108.'); + } + + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardTransactions, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyCardTransactions, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transactions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getLoyaltyProgramProfileTransactions + * + * List customer's loyalty transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse2002|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function getLoyaltyProgramProfileTransactions($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + { + list($response) = $this->getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + return $response; + } + + /** + * Operation getLoyaltyProgramProfileTransactionsWithHttpInfo + * + * List customer's loyalty transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse2002|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function getLoyaltyProgramProfileTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + { + $request = $this->getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse2002' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2002', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse2002', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation getLoyaltyProgramProfileTransactionsAsync + * + * List customer's loyalty transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyProgramProfileTransactionsAsync($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + { + return $this->getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo + * + * List customer's loyalty transactions + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function getLoyaltyProgramProfileTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $request = $this->getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId, $startDate, $endDate, $pageSize, $skip); + + 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 'getLoyaltyProgramProfileTransactions' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function getLoyaltyProgramProfileTransactionsRequest($loyaltyProgramId, $integrationId, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramProfileTransactions' + ); + } + // 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 getLoyaltyProgramProfileTransactions' + ); + } + if ($pageSize !== null && $pageSize > 50) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfileTransactions, must be smaller than or equal to 50.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyProgramProfileTransactions, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation getReservedCustomers + * + * List customers that have this coupon reserved + * + * @param string $couponValue The code of the coupon. (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function getReservedCustomers($couponValue) + { + list($response) = $this->getReservedCustomersWithHttpInfo($couponValue); + return $response; + } + + /** + * Operation getReservedCustomersWithHttpInfo + * + * List customers that have this coupon reserved + * + * @param string $couponValue The code of the coupon. (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function getReservedCustomersWithHttpInfo($couponValue) + { + $request = $this->getReservedCustomersRequest($couponValue); try { $options = $this->createHttpClientOption(); @@ -2905,26 +4805,26 @@ public function getCustomerSessionWithHttpInfo($customerSessionId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\IntegrationCustomerSessionResponse' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse200' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\IntegrationCustomerSessionResponse', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse200', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -2935,6 +4835,18 @@ public function getCustomerSessionWithHttpInfo($customerSessionId) $content = (string) $responseBody; } + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + return [ ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), @@ -2942,7 +4854,7 @@ public function getCustomerSessionWithHttpInfo($customerSessionId) ]; } - $returnType = '\TalonOne\Client\Model\IntegrationCustomerSessionResponse'; + $returnType = '\TalonOne\Client\Model\InlineResponse200'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2961,7 +4873,7 @@ public function getCustomerSessionWithHttpInfo($customerSessionId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\IntegrationCustomerSessionResponse', + '\TalonOne\Client\Model\InlineResponse200', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2969,7 +4881,7 @@ public function getCustomerSessionWithHttpInfo($customerSessionId) case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponse', + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2982,24 +4894,32 @@ public function getCustomerSessionWithHttpInfo($customerSessionId) ); $e->setResponseObject($data); break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation getCustomerSessionAsync + * Operation getReservedCustomersAsync * - * Get customer session + * List customers that have this coupon reserved * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerSessionAsync($customerSessionId) + public function getReservedCustomersAsync($couponValue) { - return $this->getCustomerSessionAsyncWithHttpInfo($customerSessionId) + return $this->getReservedCustomersAsyncWithHttpInfo($couponValue) ->then( function ($response) { return $response[0]; @@ -3008,19 +4928,19 @@ function ($response) { } /** - * Operation getCustomerSessionAsyncWithHttpInfo + * Operation getReservedCustomersAsyncWithHttpInfo * - * Get customer session + * List customers that have this coupon reserved * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerSessionAsyncWithHttpInfo($customerSessionId) + public function getReservedCustomersAsyncWithHttpInfo($couponValue) { - $returnType = '\TalonOne\Client\Model\IntegrationCustomerSessionResponse'; - $request = $this->getCustomerSessionRequest($customerSessionId); + $returnType = '\TalonOne\Client\Model\InlineResponse200'; + $request = $this->getReservedCustomersRequest($couponValue); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3057,23 +4977,23 @@ function ($exception) { } /** - * Create request for operation 'getCustomerSession' + * Create request for operation 'getReservedCustomers' * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $couponValue The code of the coupon. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerSessionRequest($customerSessionId) + protected function getReservedCustomersRequest($couponValue) { - // verify the required parameter 'customerSessionId' is set - if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { + // verify the required parameter 'couponValue' is set + if ($couponValue === null || (is_array($couponValue) && count($couponValue) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerSessionId when calling getCustomerSession' + 'Missing the required parameter $couponValue when calling getReservedCustomers' ); } - $resourcePath = '/v2/customer_sessions/{customerSessionId}'; + $resourcePath = '/v1/coupon_reservations/customerprofiles/{couponValue}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3083,10 +5003,10 @@ protected function getCustomerSessionRequest($customerSessionId) // path params - if ($customerSessionId !== null) { + if ($couponValue !== null) { $resourcePath = str_replace( - '{' . 'customerSessionId' . '}', - ObjectSerializer::toPathValue($customerSessionId), + '{' . 'couponValue' . '}', + ObjectSerializer::toPathValue($couponValue), $resourcePath ); } @@ -3161,46 +5081,40 @@ protected function getCustomerSessionRequest($customerSessionId) } /** - * Operation getLoyaltyTransactions + * Operation linkLoyaltyCardToProfile * - * Get loyalty ledger transaction logs + * Link customer profile to card * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $startDate Time from which results are returned. It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Only return results older than this timestamp. It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getLoyaltyTransactions($loyaltyProgramId, $integrationId, $startDate = null, $endDate = null, $pageSize = null, $skip = null) + public function linkLoyaltyCardToProfile($loyaltyProgramId, $loyaltyCardId, $body) { - list($response) = $this->getLoyaltyTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $startDate, $endDate, $pageSize, $skip); + list($response) = $this->linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); return $response; } /** - * Operation getLoyaltyTransactionsWithHttpInfo + * Operation linkLoyaltyCardToProfileWithHttpInfo * - * Get loyalty ledger transaction logs + * Link customer profile to card * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $startDate Time from which results are returned. It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Only return results older than this timestamp. It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2001|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyTransactionsWithHttpInfo($loyaltyProgramId, $integrationId, $startDate = null, $endDate = null, $pageSize = null, $skip = null) + public function linkLoyaltyCardToProfileWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) { - $request = $this->getLoyaltyTransactionsRequest($loyaltyProgramId, $integrationId, $startDate, $endDate, $pageSize, $skip); + $request = $this->linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body); try { $options = $this->createHttpClientOption(); @@ -3233,14 +5147,14 @@ public function getLoyaltyTransactionsWithHttpInfo($loyaltyProgramId, $integrati $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2001' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2001', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -3282,7 +5196,7 @@ public function getLoyaltyTransactionsWithHttpInfo($loyaltyProgramId, $integrati ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2001'; + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3301,7 +5215,7 @@ public function getLoyaltyTransactionsWithHttpInfo($loyaltyProgramId, $integrati case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2001', + '\TalonOne\Client\Model\LoyaltyCard', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3336,23 +5250,20 @@ public function getLoyaltyTransactionsWithHttpInfo($loyaltyProgramId, $integrati } /** - * Operation getLoyaltyTransactionsAsync + * Operation linkLoyaltyCardToProfileAsync * - * Get loyalty ledger transaction logs + * Link customer profile to card * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $startDate Time from which results are returned. It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Only return results older than this timestamp. It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyTransactionsAsync($loyaltyProgramId, $integrationId, $startDate = null, $endDate = null, $pageSize = null, $skip = null) + public function linkLoyaltyCardToProfileAsync($loyaltyProgramId, $loyaltyCardId, $body) { - return $this->getLoyaltyTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $startDate, $endDate, $pageSize, $skip) + return $this->linkLoyaltyCardToProfileAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) ->then( function ($response) { return $response[0]; @@ -3361,24 +5272,21 @@ function ($response) { } /** - * Operation getLoyaltyTransactionsAsyncWithHttpInfo + * Operation linkLoyaltyCardToProfileAsyncWithHttpInfo * - * Get loyalty ledger transaction logs + * Link customer profile to card * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $startDate Time from which results are returned. It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Only return results older than this timestamp. It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyTransactionsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $startDate = null, $endDate = null, $pageSize = null, $skip = null) + public function linkLoyaltyCardToProfileAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse2001'; - $request = $this->getLoyaltyTransactionsRequest($loyaltyProgramId, $integrationId, $startDate, $endDate, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $request = $this->linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3415,75 +5323,47 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyTransactions' + * Create request for operation 'linkLoyaltyCardToProfile' * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \DateTime $startDate Time from which results are returned. It must be an RFC3339 timestamp string. (optional) - * @param \DateTime $endDate Only return results older than this timestamp. It must be an RFC3339 timestamp string. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\LoyaltyCardRegistration $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyTransactionsRequest($loyaltyProgramId, $integrationId, $startDate = null, $endDate = null, $pageSize = null, $skip = null) + protected function linkLoyaltyCardToProfileRequest($loyaltyProgramId, $loyaltyCardId, $body) { // verify the required parameter 'loyaltyProgramId' is set if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyTransactions' + 'Missing the required parameter $loyaltyProgramId when calling linkLoyaltyCardToProfile' ); } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling getLoyaltyTransactions' + 'Missing the required parameter $loyaltyCardId when calling linkLoyaltyCardToProfile' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyTransactions, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling IntegrationApi.getLoyaltyTransactions, must be bigger than or equal to 1.'); + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling IntegrationApi.linkLoyaltyCardToProfile, must be smaller than or equal to 108.'); } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling linkLoyaltyCardToProfile' + ); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/transactions'; + $resourcePath = '/v2/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/link_profile'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($startDate)) { - $startDate = ObjectSerializer::serializeCollection($startDate, '', true); - } - if ($startDate !== null) { - $queryParams['startDate'] = $startDate; - } - // query params - if (is_array($endDate)) { - $endDate = ObjectSerializer::serializeCollection($endDate, '', true); - } - if ($endDate !== null) { - $queryParams['endDate'] = $endDate; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } // path params @@ -3495,16 +5375,19 @@ protected function getLoyaltyTransactionsRequest($loyaltyProgramId, $integration ); } // path params - if ($integrationId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -3513,7 +5396,7 @@ protected function getLoyaltyTransactionsRequest($loyaltyProgramId, $integration } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -3565,7 +5448,7 @@ protected function getLoyaltyTransactionsRequest($loyaltyProgramId, $integration $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3573,36 +5456,36 @@ protected function getLoyaltyTransactionsRequest($loyaltyProgramId, $integration } /** - * Operation getReservedCustomers + * Operation reopenCustomerSession * - * List customers that have this coupon reserved + * Reopen customer session * - * @param string $couponValue The code of the coupon. (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\ReopenSessionResponse|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getReservedCustomers($couponValue) + public function reopenCustomerSession($customerSessionId) { - list($response) = $this->getReservedCustomersWithHttpInfo($couponValue); + list($response) = $this->reopenCustomerSessionWithHttpInfo($customerSessionId); return $response; } /** - * Operation getReservedCustomersWithHttpInfo + * Operation reopenCustomerSessionWithHttpInfo * - * List customers that have this coupon reserved + * Reopen customer session * - * @param string $couponValue The code of the coupon. (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse200|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\ReopenSessionResponse|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getReservedCustomersWithHttpInfo($couponValue) + public function reopenCustomerSessionWithHttpInfo($customerSessionId) { - $request = $this->getReservedCustomersRequest($couponValue); + $request = $this->reopenCustomerSessionRequest($customerSessionId); try { $options = $this->createHttpClientOption(); @@ -3635,26 +5518,26 @@ public function getReservedCustomersWithHttpInfo($couponValue) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse200' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ReopenSessionResponse' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse200', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ReopenSessionResponse', []), $response->getStatusCode(), $response->getHeaders() ]; case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -3665,18 +5548,6 @@ public function getReservedCustomersWithHttpInfo($couponValue) $content = (string) $responseBody; } - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - return [ ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), @@ -3684,7 +5555,7 @@ public function getReservedCustomersWithHttpInfo($couponValue) ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse200'; + $returnType = '\TalonOne\Client\Model\ReopenSessionResponse'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3703,7 +5574,7 @@ public function getReservedCustomersWithHttpInfo($couponValue) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse200', + '\TalonOne\Client\Model\ReopenSessionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3711,7 +5582,7 @@ public function getReservedCustomersWithHttpInfo($couponValue) case 400: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\ErrorResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3724,32 +5595,24 @@ public function getReservedCustomersWithHttpInfo($couponValue) ); $e->setResponseObject($data); break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation getReservedCustomersAsync + * Operation reopenCustomerSessionAsync * - * List customers that have this coupon reserved + * Reopen customer session * - * @param string $couponValue The code of the coupon. (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReservedCustomersAsync($couponValue) + public function reopenCustomerSessionAsync($customerSessionId) { - return $this->getReservedCustomersAsyncWithHttpInfo($couponValue) + return $this->reopenCustomerSessionAsyncWithHttpInfo($customerSessionId) ->then( function ($response) { return $response[0]; @@ -3758,19 +5621,19 @@ function ($response) { } /** - * Operation getReservedCustomersAsyncWithHttpInfo + * Operation reopenCustomerSessionAsyncWithHttpInfo * - * List customers that have this coupon reserved + * Reopen customer session * - * @param string $couponValue The code of the coupon. (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReservedCustomersAsyncWithHttpInfo($couponValue) + public function reopenCustomerSessionAsyncWithHttpInfo($customerSessionId) { - $returnType = '\TalonOne\Client\Model\InlineResponse200'; - $request = $this->getReservedCustomersRequest($couponValue); + $returnType = '\TalonOne\Client\Model\ReopenSessionResponse'; + $request = $this->reopenCustomerSessionRequest($customerSessionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3807,23 +5670,23 @@ function ($exception) { } /** - * Create request for operation 'getReservedCustomers' + * Create request for operation 'reopenCustomerSession' * - * @param string $couponValue The code of the coupon. (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getReservedCustomersRequest($couponValue) + protected function reopenCustomerSessionRequest($customerSessionId) { - // verify the required parameter 'couponValue' is set - if ($couponValue === null || (is_array($couponValue) && count($couponValue) === 0)) { + // verify the required parameter 'customerSessionId' is set + if ($customerSessionId === null || (is_array($customerSessionId) && count($customerSessionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $couponValue when calling getReservedCustomers' + 'Missing the required parameter $customerSessionId when calling reopenCustomerSession' ); } - $resourcePath = '/v1/coupon_reservations/customerprofiles/{couponValue}'; + $resourcePath = '/v2/customer_sessions/{customerSessionId}/reopen'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3833,10 +5696,10 @@ protected function getReservedCustomersRequest($couponValue) // path params - if ($couponValue !== null) { + if ($customerSessionId !== null) { $resourcePath = str_replace( - '{' . 'couponValue' . '}', - ObjectSerializer::toPathValue($couponValue), + '{' . 'customerSessionId' . '}', + ObjectSerializer::toPathValue($customerSessionId), $resourcePath ); } @@ -3903,7 +5766,7 @@ protected function getReservedCustomersRequest($couponValue) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3915,7 +5778,7 @@ protected function getReservedCustomersRequest($couponValue) * * Return cart items * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * @@ -3934,8 +5797,8 @@ public function returnCartItems($customerSessionId, $body, $dry = null) * * Return cart items * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -4064,8 +5927,8 @@ public function returnCartItemsWithHttpInfo($customerSessionId, $body, $dry = nu * * Return cart items * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -4086,8 +5949,8 @@ function ($response) { * * Return cart items * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -4135,8 +5998,8 @@ function ($exception) { /** * Create request for operation 'returnCartItems' * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\ReturnIntegrationRequest $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -4259,7 +6122,7 @@ protected function returnCartItemsRequest($customerSessionId, $body, $dry = null * * Sync cart item catalog * - * @param int $catalogId catalogId (required) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -4277,8 +6140,8 @@ public function syncCatalog($catalogId, $body) * * Sync cart item catalog * - * @param int $catalogId (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body (required) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -4426,8 +6289,8 @@ public function syncCatalogWithHttpInfo($catalogId, $body) * * Sync cart item catalog * - * @param int $catalogId (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body (required) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4447,8 +6310,8 @@ function ($response) { * * Sync cart item catalog * - * @param int $catalogId (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body (required) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -4495,8 +6358,8 @@ function ($exception) { /** * Create request for operation 'syncCatalog' * - * @param int $catalogId (required) - * @param \TalonOne\Client\Model\CatalogSyncRequest $body (required) + * @param int $catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. (required) + * @param \TalonOne\Client\Model\CatalogSyncRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -4629,7 +6492,7 @@ public function trackEvent($body, $dry = null) * * Track event * - * @param \TalonOne\Client\Model\NewEvent $body (required) + * @param \TalonOne\Client\Model\NewEvent $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -4778,7 +6641,7 @@ public function trackEventWithHttpInfo($body, $dry = null) * * Track event * - * @param \TalonOne\Client\Model\NewEvent $body (required) + * @param \TalonOne\Client\Model\NewEvent $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -4799,7 +6662,7 @@ function ($response) { * * Track event * - * @param \TalonOne\Client\Model\NewEvent $body (required) + * @param \TalonOne\Client\Model\NewEvent $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -4847,7 +6710,7 @@ function ($exception) { /** * Create request for operation 'trackEvent' * - * @param \TalonOne\Client\Model\NewEvent $body (required) + * @param \TalonOne\Client\Model\NewEvent $body body (required) * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -4957,7 +6820,7 @@ protected function trackEventRequest($body, $dry = null) * Track event V2 * * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -4975,8 +6838,8 @@ public function trackEventV2($body, $silent = 'yes', $dry = null) * * Track event V2 * - * @param \TalonOne\Client\Model\IntegrationEventV2Request $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -5105,8 +6968,8 @@ public function trackEventV2WithHttpInfo($body, $silent = 'yes', $dry = null) * * Track event V2 * - * @param \TalonOne\Client\Model\IntegrationEventV2Request $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -5127,8 +6990,8 @@ function ($response) { * * Track event V2 * - * @param \TalonOne\Client\Model\IntegrationEventV2Request $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -5176,8 +7039,8 @@ function ($exception) { /** * Create request for operation 'trackEventV2' * - * @param \TalonOne\Client\Model\IntegrationEventV2Request $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\IntegrationEventV2Request $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) * * @throws \InvalidArgumentException @@ -5311,7 +7174,7 @@ public function updateAudienceCustomersAttributes($audienceId, $body) * Update profile attributes for all customers in audience * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param object $body (required) + * @param object $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5380,7 +7243,7 @@ public function updateAudienceCustomersAttributesWithHttpInfo($audienceId, $body * Update profile attributes for all customers in audience * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param object $body (required) + * @param object $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5401,7 +7264,7 @@ function ($response) { * Update profile attributes for all customers in audience * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param object $body (required) + * @param object $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5438,7 +7301,7 @@ function ($exception) { * Create request for operation 'updateAudienceCustomersAttributes' * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param object $body (required) + * @param object $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5572,7 +7435,7 @@ public function updateAudienceV2($audienceId, $body) * Update audience name * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param \TalonOne\Client\Model\UpdateAudience $body (required) + * @param \TalonOne\Client\Model\UpdateAudience $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5701,7 +7564,7 @@ public function updateAudienceV2WithHttpInfo($audienceId, $body) * Update audience name * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param \TalonOne\Client\Model\UpdateAudience $body (required) + * @param \TalonOne\Client\Model\UpdateAudience $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5722,7 +7585,7 @@ function ($response) { * Update audience name * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param \TalonOne\Client\Model\UpdateAudience $body (required) + * @param \TalonOne\Client\Model\UpdateAudience $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5770,7 +7633,7 @@ function ($exception) { * Create request for operation 'updateAudienceV2' * * @param int $audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). (required) - * @param \TalonOne\Client\Model\UpdateAudience $body (required) + * @param \TalonOne\Client\Model\UpdateAudience $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -5901,7 +7764,7 @@ public function updateCustomerProfileAudiences($body) * * Update multiple customer profiles' audiences * - * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body (required) + * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -5977,7 +7840,7 @@ public function updateCustomerProfileAudiencesWithHttpInfo($body) * * Update multiple customer profiles' audiences * - * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body (required) + * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -5997,7 +7860,7 @@ function ($response) { * * Update multiple customer profiles' audiences * - * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body (required) + * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6033,7 +7896,7 @@ function ($exception) { /** * Create request for operation 'updateCustomerProfileAudiences' * - * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body (required) + * @param \TalonOne\Client\Model\CustomerProfileAudienceRequest $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -6137,7 +8000,7 @@ protected function updateCustomerProfileAudiencesRequest($body) * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body body (required) * @param bool $runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. (optional) + * @param bool $dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6155,9 +8018,9 @@ public function updateCustomerProfileV2($integrationId, $body, $runRuleEngine = * Update customer profile * * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) + * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body body (required) * @param bool $runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. (optional) + * @param bool $dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6306,9 +8169,9 @@ public function updateCustomerProfileV2WithHttpInfo($integrationId, $body, $runR * Update customer profile * * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) + * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body body (required) * @param bool $runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. (optional) + * @param bool $dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6329,9 +8192,9 @@ function ($response) { * Update customer profile * * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) + * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body body (required) * @param bool $runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. (optional) + * @param bool $dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6379,9 +8242,9 @@ function ($exception) { * Create request for operation 'updateCustomerProfileV2' * * @param string $integrationId The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. (required) - * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body (required) + * @param \TalonOne\Client\Model\CustomerProfileIntegrationRequestV2 $body body (required) * @param bool $runRuleEngine Indicates whether to run the Rule Engine. If `true`, the response includes: - The effects generated by the triggered campaigns are returned in the `effects` property. - The created coupons and referral objects. If `false`: - The rules are not executed and the `effects` property is always empty. - The response time improves. - You cannot use `responseContent` in the body. (optional, default to false) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. This property only works when `runRuleEngine=true`. (optional) + * @param bool $dry (Only works when `runRuleEngine=true`) Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -6511,7 +8374,7 @@ protected function updateCustomerProfileV2Request($integrationId, $body, $runRul * Update multiple customer profiles * * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6528,8 +8391,8 @@ public function updateCustomerProfilesV2($body, $silent = 'yes') * * Update multiple customer profiles * - * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6657,8 +8520,8 @@ public function updateCustomerProfilesV2WithHttpInfo($body, $silent = 'yes') * * Update multiple customer profiles * - * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6678,8 +8541,8 @@ function ($response) { * * Update multiple customer profiles * - * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -6726,8 +8589,8 @@ function ($exception) { /** * Create request for operation 'updateCustomerProfilesV2' * - * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\MultipleCustomerProfileIntegrationRequest $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -6835,9 +8698,9 @@ protected function updateCustomerProfilesV2Request($body, $silent = 'yes') * * Update customer session * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -6854,9 +8717,9 @@ public function updateCustomerSessionV2($customerSessionId, $body, $dry = null) * * Update customer session * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -7004,9 +8867,9 @@ public function updateCustomerSessionV2WithHttpInfo($customerSessionId, $body, $ * * Update customer session * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7026,9 +8889,9 @@ function ($response) { * * Update customer session * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -7075,9 +8938,9 @@ function ($exception) { /** * Create request for operation 'updateCustomerSessionV2' * - * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session endpoint](https://docs.talon.one/management-api/#operation/getApplicationSessions). (required) - * @param \TalonOne\Client\Model\IntegrationRequest $body (required) - * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. (optional) + * @param string $customerSessionId The `integration ID` of the customer session. You set this ID when you create a customer session. You can see existing customer session integration IDs in the Campaign Manager's **Sessions** menu, or via the [List Application session](https://docs.talon.one/management-api#operation/getApplicationSessions) endpoint. (required) + * @param \TalonOne\Client\Model\IntegrationRequest $body body (required) + * @param bool $dry Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`, you can use the `evaluableCampaignIds` body property to select specific campaigns to run. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request diff --git a/lib/Api/ManagementApi.php b/lib/Api/ManagementApi.php index 6bcac875..666b19b4 100644 --- a/lib/Api/ManagementApi.php +++ b/lib/Api/ManagementApi.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -115,14 +115,310 @@ public function getConfig() return $this->config; } + /** + * Operation addLoyaltyCardPoints + * + * Add points to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function addLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $body) + { + $this->addLoyaltyCardPointsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); + } + + /** + * Operation addLoyaltyCardPointsWithHttpInfo + * + * Add points to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body 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) + */ + public function addLoyaltyCardPointsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + { + $request = $this->addLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation addLoyaltyCardPointsAsync + * + * Add points to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addLoyaltyCardPointsAsync($loyaltyProgramId, $loyaltyCardId, $body) + { + return $this->addLoyaltyCardPointsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation addLoyaltyCardPointsAsyncWithHttpInfo + * + * Add points to card + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function addLoyaltyCardPointsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + { + $returnType = ''; + $request = $this->addLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $body); + + 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 'addLoyaltyCardPoints' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function addLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $body) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling addLoyaltyCardPoints' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling addLoyaltyCardPoints' + ); + } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.addLoyaltyCardPoints, must be smaller than or equal to 108.'); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling addLoyaltyCardPoints' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation addLoyaltyPoints * - * Add points in loyalty program for given customer + * Add points to customer profile * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body body (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -136,11 +432,11 @@ public function addLoyaltyPoints($loyaltyProgramId, $integrationId, $body) /** * Operation addLoyaltyPointsWithHttpInfo * - * Add points in loyalty program for given customer + * Add points to customer profile * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -214,11 +510,11 @@ public function addLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId, /** * Operation addLoyaltyPointsAsync * - * Add points in loyalty program for given customer + * Add points to customer profile * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -236,11 +532,11 @@ function ($response) { /** * Operation addLoyaltyPointsAsyncWithHttpInfo * - * Add points in loyalty program for given customer + * Add points to customer profile * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -278,7 +574,7 @@ function ($exception) { * * @param string $loyaltyProgramId The identifier for the loyalty program. (required) * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param \TalonOne\Client\Model\AddLoyaltyPoints $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -376,6 +672,11 @@ protected function addLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $b } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -405,7 +706,7 @@ protected function addLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $b /** * Operation copyCampaignToApplications * - * Copy the campaign into the specified application + * Copy the campaign into the specified Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) @@ -413,7 +714,7 @@ protected function addLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $b * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2003 + * @return \TalonOne\Client\Model\InlineResponse2004 */ public function copyCampaignToApplications($applicationId, $campaignId, $body) { @@ -424,15 +725,15 @@ public function copyCampaignToApplications($applicationId, $campaignId, $body) /** * Operation copyCampaignToApplicationsWithHttpInfo * - * Copy the campaign into the specified application + * Copy the campaign into the specified Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignCopy $body (required) + * @param \TalonOne\Client\Model\CampaignCopy $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2003, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) */ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaignId, $body) { @@ -469,20 +770,20 @@ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaign $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2003' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2003', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2003'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -501,7 +802,7 @@ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaign case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2003', + '\TalonOne\Client\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -514,11 +815,11 @@ public function copyCampaignToApplicationsWithHttpInfo($applicationId, $campaign /** * Operation copyCampaignToApplicationsAsync * - * Copy the campaign into the specified application + * Copy the campaign into the specified Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignCopy $body (required) + * @param \TalonOne\Client\Model\CampaignCopy $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -536,18 +837,18 @@ function ($response) { /** * Operation copyCampaignToApplicationsAsyncWithHttpInfo * - * Copy the campaign into the specified application + * Copy the campaign into the specified Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignCopy $body (required) + * @param \TalonOne\Client\Model\CampaignCopy $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ public function copyCampaignToApplicationsAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse2003'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $request = $this->copyCampaignToApplicationsRequest($applicationId, $campaignId, $body); return $this->client @@ -589,7 +890,7 @@ function ($exception) { * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignCopy $body (required) + * @param \TalonOne\Client\Model\CampaignCopy $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -687,6 +988,11 @@ protected function copyCampaignToApplicationsRequest($applicationId, $campaignId } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -735,7 +1041,7 @@ public function createAccountCollection($body) * * Create account-level collection * - * @param \TalonOne\Client\Model\NewCollection $body (required) + * @param \TalonOne\Client\Model\NewCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -883,7 +1189,7 @@ public function createAccountCollectionWithHttpInfo($body) * * Create account-level collection * - * @param \TalonOne\Client\Model\NewCollection $body (required) + * @param \TalonOne\Client\Model\NewCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -903,7 +1209,7 @@ function ($response) { * * Create account-level collection * - * @param \TalonOne\Client\Model\NewCollection $body (required) + * @param \TalonOne\Client\Model\NewCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -950,7 +1256,7 @@ function ($exception) { /** * Create request for operation 'createAccountCollection' * - * @param \TalonOne\Client\Model\NewCollection $body (required) + * @param \TalonOne\Client\Model\NewCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1020,6 +1326,11 @@ protected function createAccountCollectionRequest($body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -1068,7 +1379,7 @@ public function createAdditionalCost($body) * * Create additional cost * - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -1156,7 +1467,7 @@ public function createAdditionalCostWithHttpInfo($body) * * Create additional cost * - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1176,7 +1487,7 @@ function ($response) { * * Create additional cost * - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -1223,7 +1534,7 @@ function ($exception) { /** * Create request for operation 'createAdditionalCost' * - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -1298,274 +1609,6 @@ protected function createAdditionalCostRequest($body) if ($apiKey !== null) { $headers['Authorization'] = $apiKey; } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = ObjectSerializer::buildQuery($queryParams); - return new Request( - 'POST', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation createAttribute - * - * Create custom attribute - * - * @param \TalonOne\Client\Model\NewAttribute $body body (required) - * - * @throws \TalonOne\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Attribute - */ - public function createAttribute($body) - { - list($response) = $this->createAttributeWithHttpInfo($body); - return $response; - } - - /** - * Operation createAttributeWithHttpInfo - * - * Create custom attribute - * - * @param \TalonOne\Client\Model\NewAttribute $body (required) - * - * @throws \TalonOne\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) - */ - public function createAttributeWithHttpInfo($body) - { - $request = $this->createAttributeRequest($body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - $responseBody = $response->getBody(); - switch($statusCode) { - case 201: - if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\TalonOne\Client\Model\Attribute'; - $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\Attribute', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - } - throw $e; - } - } - - /** - * Operation createAttributeAsync - * - * Create custom attribute - * - * @param \TalonOne\Client\Model\NewAttribute $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createAttributeAsync($body) - { - return $this->createAttributeAsyncWithHttpInfo($body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation createAttributeAsyncWithHttpInfo - * - * Create custom attribute - * - * @param \TalonOne\Client\Model\NewAttribute $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function createAttributeAsyncWithHttpInfo($body) - { - $returnType = '\TalonOne\Client\Model\Attribute'; - $request = $this->createAttributeRequest($body); - - return $this->client - ->sendAsync($request, $this->createHttpClientOption()) - ->then( - function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; - }, - function ($exception) { - $response = $exception->getResponse(); - $statusCode = $response->getStatusCode(); - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $exception->getRequest()->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - ); - } - - /** - * Create request for operation 'createAttribute' - * - * @param \TalonOne\Client\Model\NewAttribute $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function createAttributeRequest($body) - { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createAttribute' - ); - } - - $resourcePath = '/v1/attributes'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); - } else { - $httpBody = $_tempBody; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -1593,38 +1636,36 @@ protected function createAttributeRequest($body) } /** - * Operation createCampaignFromTemplate + * Operation createAttribute * - * Create campaign from campaign template + * Create custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CreateTemplateCampaign $body body (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CreateTemplateCampaignResponse + * @return \TalonOne\Client\Model\Attribute */ - public function createCampaignFromTemplate($applicationId, $body) + public function createAttribute($body) { - list($response) = $this->createCampaignFromTemplateWithHttpInfo($applicationId, $body); + list($response) = $this->createAttributeWithHttpInfo($body); return $response; } /** - * Operation createCampaignFromTemplateWithHttpInfo + * Operation createAttributeWithHttpInfo * - * Create campaign from campaign template + * Create custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CreateTemplateCampaign $body (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\CreateTemplateCampaignResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) */ - public function createCampaignFromTemplateWithHttpInfo($applicationId, $body) + public function createAttributeWithHttpInfo($body) { - $request = $this->createCampaignFromTemplateRequest($applicationId, $body); + $request = $this->createAttributeRequest($body); try { $options = $this->createHttpClientOption(); @@ -1657,20 +1698,20 @@ public function createCampaignFromTemplateWithHttpInfo($applicationId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 201: - if ('\TalonOne\Client\Model\CreateTemplateCampaignResponse' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CreateTemplateCampaignResponse', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CreateTemplateCampaignResponse'; + $returnType = '\TalonOne\Client\Model\Attribute'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -1689,7 +1730,7 @@ public function createCampaignFromTemplateWithHttpInfo($applicationId, $body) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CreateTemplateCampaignResponse', + '\TalonOne\Client\Model\Attribute', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1700,19 +1741,18 @@ public function createCampaignFromTemplateWithHttpInfo($applicationId, $body) } /** - * Operation createCampaignFromTemplateAsync + * Operation createAttributeAsync * - * Create campaign from campaign template + * Create custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CreateTemplateCampaign $body (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCampaignFromTemplateAsync($applicationId, $body) + public function createAttributeAsync($body) { - return $this->createCampaignFromTemplateAsyncWithHttpInfo($applicationId, $body) + return $this->createAttributeAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -1721,20 +1761,19 @@ function ($response) { } /** - * Operation createCampaignFromTemplateAsyncWithHttpInfo + * Operation createAttributeAsyncWithHttpInfo * - * Create campaign from campaign template + * Create custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CreateTemplateCampaign $body (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCampaignFromTemplateAsyncWithHttpInfo($applicationId, $body) + public function createAttributeAsyncWithHttpInfo($body) { - $returnType = '\TalonOne\Client\Model\CreateTemplateCampaignResponse'; - $request = $this->createCampaignFromTemplateRequest($applicationId, $body); + $returnType = '\TalonOne\Client\Model\Attribute'; + $request = $this->createAttributeRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1771,30 +1810,23 @@ function ($exception) { } /** - * Create request for operation 'createCampaignFromTemplate' + * Create request for operation 'createAttribute' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CreateTemplateCampaign $body (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createCampaignFromTemplateRequest($applicationId, $body) + protected function createAttributeRequest($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 createCampaignFromTemplate' - ); - } // 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 createCampaignFromTemplate' + 'Missing the required parameter $body when calling createAttribute' ); } - $resourcePath = '/v1/applications/{applicationId}/create_campaign_from_template'; + $resourcePath = '/v1/attributes'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1803,14 +1835,6 @@ protected function createCampaignFromTemplateRequest($applicationId, $body) - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -1858,6 +1882,11 @@ protected function createCampaignFromTemplateRequest($applicationId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -1885,40 +1914,38 @@ protected function createCampaignFromTemplateRequest($applicationId, $body) } /** - * Operation createCollection + * Operation createCampaignFromTemplate * - * Create collection + * Create campaign from campaign template * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCampaignCollection $body body (required) + * @param \TalonOne\Client\Model\CreateTemplateCampaign $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection + * @return \TalonOne\Client\Model\CreateTemplateCampaignResponse */ - public function createCollection($applicationId, $campaignId, $body) + public function createCampaignFromTemplate($applicationId, $body) { - list($response) = $this->createCollectionWithHttpInfo($applicationId, $campaignId, $body); + list($response) = $this->createCampaignFromTemplateWithHttpInfo($applicationId, $body); return $response; } /** - * Operation createCollectionWithHttpInfo + * Operation createCampaignFromTemplateWithHttpInfo * - * Create collection + * Create campaign from campaign template * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCampaignCollection $body (required) + * @param \TalonOne\Client\Model\CreateTemplateCampaign $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CreateTemplateCampaignResponse, HTTP status code, HTTP response headers (array of strings) */ - public function createCollectionWithHttpInfo($applicationId, $campaignId, $body) + public function createCampaignFromTemplateWithHttpInfo($applicationId, $body) { - $request = $this->createCollectionRequest($applicationId, $campaignId, $body); + $request = $this->createCampaignFromTemplateRequest($applicationId, $body); try { $options = $this->createHttpClientOption(); @@ -1951,20 +1978,20 @@ public function createCollectionWithHttpInfo($applicationId, $campaignId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 201: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CreateTemplateCampaignResponse' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CreateTemplateCampaignResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Collection'; + $returnType = '\TalonOne\Client\Model\CreateTemplateCampaignResponse'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -1983,7 +2010,7 @@ public function createCollectionWithHttpInfo($applicationId, $campaignId, $body) case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', + '\TalonOne\Client\Model\CreateTemplateCampaignResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1994,20 +2021,19 @@ public function createCollectionWithHttpInfo($applicationId, $campaignId, $body) } /** - * Operation createCollectionAsync + * Operation createCampaignFromTemplateAsync * - * Create collection + * Create campaign from campaign template * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCampaignCollection $body (required) + * @param \TalonOne\Client\Model\CreateTemplateCampaign $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCollectionAsync($applicationId, $campaignId, $body) + public function createCampaignFromTemplateAsync($applicationId, $body) { - return $this->createCollectionAsyncWithHttpInfo($applicationId, $campaignId, $body) + return $this->createCampaignFromTemplateAsyncWithHttpInfo($applicationId, $body) ->then( function ($response) { return $response[0]; @@ -2016,21 +2042,20 @@ function ($response) { } /** - * Operation createCollectionAsyncWithHttpInfo + * Operation createCampaignFromTemplateAsyncWithHttpInfo * - * Create collection + * Create campaign from campaign template * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCampaignCollection $body (required) + * @param \TalonOne\Client\Model\CreateTemplateCampaign $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCollectionAsyncWithHttpInfo($applicationId, $campaignId, $body) + public function createCampaignFromTemplateAsyncWithHttpInfo($applicationId, $body) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->createCollectionRequest($applicationId, $campaignId, $body); + $returnType = '\TalonOne\Client\Model\CreateTemplateCampaignResponse'; + $request = $this->createCampaignFromTemplateRequest($applicationId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2067,37 +2092,30 @@ function ($exception) { } /** - * Create request for operation 'createCollection' + * Create request for operation 'createCampaignFromTemplate' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCampaignCollection $body (required) + * @param \TalonOne\Client\Model\CreateTemplateCampaign $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createCollectionRequest($applicationId, $campaignId, $body) + protected function createCampaignFromTemplateRequest($applicationId, $body) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling createCollection' - ); - } - // 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 createCollection' + 'Missing the required parameter $applicationId when calling createCampaignFromTemplate' ); } // 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 createCollection' + 'Missing the required parameter $body when calling createCampaignFromTemplate' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'; + $resourcePath = '/v1/applications/{applicationId}/create_campaign_from_template'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2114,14 +2132,6 @@ protected function createCollectionRequest($applicationId, $campaignId, $body) $resourcePath ); } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -2169,6 +2179,11 @@ protected function createCollectionRequest($applicationId, $campaignId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -2196,42 +2211,40 @@ protected function createCollectionRequest($applicationId, $campaignId, $body) } /** - * Operation createCoupons + * Operation createCollection * - * Create coupons + * Create collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCoupons $body body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCampaignCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2006 + * @return \TalonOne\Client\Model\Collection */ - public function createCoupons($applicationId, $campaignId, $body, $silent = 'yes') + public function createCollection($applicationId, $campaignId, $body) { - list($response) = $this->createCouponsWithHttpInfo($applicationId, $campaignId, $body, $silent); + list($response) = $this->createCollectionWithHttpInfo($applicationId, $campaignId, $body); return $response; } /** - * Operation createCouponsWithHttpInfo + * Operation createCollectionWithHttpInfo * - * Create coupons + * Create collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCoupons $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCampaignCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Collection, HTTP status code, HTTP response headers (array of strings) */ - public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') + public function createCollectionWithHttpInfo($applicationId, $campaignId, $body) { - $request = $this->createCouponsRequest($applicationId, $campaignId, $body, $silent); + $request = $this->createCollectionRequest($applicationId, $campaignId, $body); try { $options = $this->createHttpClientOption(); @@ -2263,21 +2276,21 @@ public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $s $responseBody = $response->getBody(); switch($statusCode) { - case 200: - if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { + case 201: + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $returnType = '\TalonOne\Client\Model\Collection'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2293,10 +2306,10 @@ public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $s } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2006', + '\TalonOne\Client\Model\Collection', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2307,21 +2320,20 @@ public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $s } /** - * Operation createCouponsAsync + * Operation createCollectionAsync * - * Create coupons + * Create collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCoupons $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCampaignCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCouponsAsync($applicationId, $campaignId, $body, $silent = 'yes') + public function createCollectionAsync($applicationId, $campaignId, $body) { - return $this->createCouponsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent) + return $this->createCollectionAsyncWithHttpInfo($applicationId, $campaignId, $body) ->then( function ($response) { return $response[0]; @@ -2330,22 +2342,21 @@ function ($response) { } /** - * Operation createCouponsAsyncWithHttpInfo + * Operation createCollectionAsyncWithHttpInfo * - * Create coupons + * Create collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCoupons $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCampaignCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCouponsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') + public function createCollectionAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse2006'; - $request = $this->createCouponsRequest($applicationId, $campaignId, $body, $silent); + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->createCollectionRequest($applicationId, $campaignId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2382,51 +2393,43 @@ function ($exception) { } /** - * Create request for operation 'createCoupons' + * Create request for operation 'createCollection' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCoupons $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCampaignCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createCouponsRequest($applicationId, $campaignId, $body, $silent = 'yes') + protected function createCollectionRequest($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 createCoupons' + 'Missing the required parameter $applicationId when calling createCollection' ); } // 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 createCoupons' + 'Missing the required parameter $campaignId when calling createCollection' ); } // 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 createCoupons' + 'Missing the required parameter $body when calling createCollection' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'; $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 @@ -2492,6 +2495,11 @@ protected function createCouponsRequest($applicationId, $campaignId, $body, $sil } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -2519,40 +2527,42 @@ protected function createCouponsRequest($applicationId, $campaignId, $body, $sil } /** - * Operation createCouponsAsynchronously + * Operation createCoupons * - * Create coupons asynchronously + * Create coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponCreationJob $body body (required) + * @param \TalonOne\Client\Model\NewCoupons $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\AsyncCouponCreationResponse + * @return \TalonOne\Client\Model\InlineResponse2007 */ - public function createCouponsAsynchronously($applicationId, $campaignId, $body) + public function createCoupons($applicationId, $campaignId, $body, $silent = 'yes') { - list($response) = $this->createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaignId, $body); + list($response) = $this->createCouponsWithHttpInfo($applicationId, $campaignId, $body, $silent); return $response; } /** - * Operation createCouponsAsynchronouslyWithHttpInfo + * Operation createCouponsWithHttpInfo * - * Create coupons asynchronously + * Create coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponCreationJob $body (required) + * @param \TalonOne\Client\Model\NewCoupons $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\AsyncCouponCreationResponse, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) */ - public function createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaignId, $body) + public function createCouponsWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { - $request = $this->createCouponsAsynchronouslyRequest($applicationId, $campaignId, $body); + $request = $this->createCouponsRequest($applicationId, $campaignId, $body, $silent); try { $options = $this->createHttpClientOption(); @@ -2585,20 +2595,20 @@ public function createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaig $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\AsyncCouponCreationResponse' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AsyncCouponCreationResponse', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\AsyncCouponCreationResponse'; + $returnType = '\TalonOne\Client\Model\InlineResponse2007'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2617,7 +2627,7 @@ public function createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaig case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\AsyncCouponCreationResponse', + '\TalonOne\Client\Model\InlineResponse2007', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2628,20 +2638,21 @@ public function createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaig } /** - * Operation createCouponsAsynchronouslyAsync + * Operation createCouponsAsync * - * Create coupons asynchronously + * Create coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponCreationJob $body (required) + * @param \TalonOne\Client\Model\NewCoupons $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCouponsAsynchronouslyAsync($applicationId, $campaignId, $body) + public function createCouponsAsync($applicationId, $campaignId, $body, $silent = 'yes') { - return $this->createCouponsAsynchronouslyAsyncWithHttpInfo($applicationId, $campaignId, $body) + return $this->createCouponsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent) ->then( function ($response) { return $response[0]; @@ -2650,21 +2661,22 @@ function ($response) { } /** - * Operation createCouponsAsynchronouslyAsyncWithHttpInfo + * Operation createCouponsAsyncWithHttpInfo * - * Create coupons asynchronously + * Create coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponCreationJob $body (required) + * @param \TalonOne\Client\Model\NewCoupons $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCouponsAsynchronouslyAsyncWithHttpInfo($applicationId, $campaignId, $body) + public function createCouponsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { - $returnType = '\TalonOne\Client\Model\AsyncCouponCreationResponse'; - $request = $this->createCouponsAsynchronouslyRequest($applicationId, $campaignId, $body); + $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $request = $this->createCouponsRequest($applicationId, $campaignId, $body, $silent); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2701,43 +2713,51 @@ function ($exception) { } /** - * Create request for operation 'createCouponsAsync' + * Create request for operation 'createCoupons' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponCreationJob $body (required) + * @param \TalonOne\Client\Model\NewCoupons $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createCouponsAsyncRequest($applicationId, $campaignId, $body) + protected function createCouponsRequest($applicationId, $campaignId, $body, $silent = 'yes') { // 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 createCouponsAsync' + 'Missing the required parameter $applicationId when calling createCoupons' ); } // 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 createCouponsAsync' + 'Missing the required parameter $campaignId when calling createCoupons' ); } // 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 createCouponsAsync' + 'Missing the required parameter $body when calling createCoupons' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; $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 @@ -2803,6 +2823,11 @@ protected function createCouponsAsyncRequest($applicationId, $campaignId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -2830,42 +2855,40 @@ protected function createCouponsAsyncRequest($applicationId, $campaignId, $body) } /** - * Operation createCouponsForMultipleRecipients + * Operation createCouponsAsynchronously * - * Create coupons for multiple recipients + * Create coupons asynchronously * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCouponCreationJob $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2006 + * @return \TalonOne\Client\Model\AsyncCouponCreationResponse */ - public function createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent = 'yes') + public function createCouponsAsynchronously($applicationId, $campaignId, $body) { - list($response) = $this->createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent); + list($response) = $this->createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaignId, $body); return $response; } /** - * Operation createCouponsForMultipleRecipientsWithHttpInfo + * Operation createCouponsAsynchronouslyWithHttpInfo * - * Create coupons for multiple recipients + * Create coupons asynchronously * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCouponCreationJob $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\AsyncCouponCreationResponse, HTTP status code, HTTP response headers (array of strings) */ - public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') + public function createCouponsAsynchronouslyWithHttpInfo($applicationId, $campaignId, $body) { - $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); + $request = $this->createCouponsAsynchronouslyRequest($applicationId, $campaignId, $body); try { $options = $this->createHttpClientOption(); @@ -2898,20 +2921,20 @@ public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { + if ('\TalonOne\Client\Model\AsyncCouponCreationResponse' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AsyncCouponCreationResponse', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $returnType = '\TalonOne\Client\Model\AsyncCouponCreationResponse'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -2930,7 +2953,7 @@ public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2006', + '\TalonOne\Client\Model\AsyncCouponCreationResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2941,21 +2964,20 @@ public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $ } /** - * Operation createCouponsForMultipleRecipientsAsync + * Operation createCouponsAsynchronouslyAsync * - * Create coupons for multiple recipients + * Create coupons asynchronously * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCouponCreationJob $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCouponsForMultipleRecipientsAsync($applicationId, $campaignId, $body, $silent = 'yes') + public function createCouponsAsynchronouslyAsync($applicationId, $campaignId, $body) { - return $this->createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent) + return $this->createCouponsAsynchronouslyAsyncWithHttpInfo($applicationId, $campaignId, $body) ->then( function ($response) { return $response[0]; @@ -2964,22 +2986,21 @@ function ($response) { } /** - * Operation createCouponsForMultipleRecipientsAsyncWithHttpInfo + * Operation createCouponsAsynchronouslyAsyncWithHttpInfo * - * Create coupons for multiple recipients + * Create coupons asynchronously * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCouponCreationJob $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') + public function createCouponsAsynchronouslyAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse2006'; - $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); + $returnType = '\TalonOne\Client\Model\AsyncCouponCreationResponse'; + $request = $this->createCouponsAsynchronouslyRequest($applicationId, $campaignId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3016,51 +3037,43 @@ function ($exception) { } /** - * Create request for operation 'createCouponsForMultipleRecipients' + * Create request for operation 'createCouponsAsync' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body (required) - * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains essential data such as the updated customer profiles and session-related information. (optional, default to 'yes') + * @param \TalonOne\Client\Model\NewCouponCreationJob $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent = 'yes') + protected function createCouponsAsyncRequest($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 createCouponsForMultipleRecipients' + 'Missing the required parameter $applicationId when calling createCouponsAsync' ); } // 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' + 'Missing the required parameter $campaignId when calling createCouponsAsync' ); } // 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 createCouponsForMultipleRecipients' + 'Missing the required parameter $body when calling createCouponsAsync' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async'; $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 @@ -3126,6 +3139,11 @@ protected function createCouponsForMultipleRecipientsRequest($applicationId, $ca } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -3153,38 +3171,42 @@ protected function createCouponsForMultipleRecipientsRequest($applicationId, $ca } /** - * Operation createNotificationWebhook + * Operation createCouponsForMultipleRecipients * - * Create notification webhook + * Create coupons for multiple recipients * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NotificationWebhook + * @return \TalonOne\Client\Model\InlineResponse2007 */ - public function createNotificationWebhook($applicationId, $body) + public function createCouponsForMultipleRecipients($applicationId, $campaignId, $body, $silent = 'yes') { - list($response) = $this->createNotificationWebhookWithHttpInfo($applicationId, $body); + list($response) = $this->createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent); return $response; } /** - * Operation createNotificationWebhookWithHttpInfo + * Operation createCouponsForMultipleRecipientsWithHttpInfo * - * Create notification webhook + * Create coupons for multiple recipients * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NotificationWebhook, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) */ - public function createNotificationWebhookWithHttpInfo($applicationId, $body) + public function createCouponsForMultipleRecipientsWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { - $request = $this->createNotificationWebhookRequest($applicationId, $body); + $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); try { $options = $this->createHttpClientOption(); @@ -3216,21 +3238,21 @@ public function createNotificationWebhookWithHttpInfo($applicationId, $body) $responseBody = $response->getBody(); switch($statusCode) { - case 201: - if ('\TalonOne\Client\Model\NotificationWebhook' === '\SplFileObject') { + case 200: + if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NotificationWebhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $returnType = '\TalonOne\Client\Model\InlineResponse2007'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3246,10 +3268,10 @@ public function createNotificationWebhookWithHttpInfo($applicationId, $body) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NotificationWebhook', + '\TalonOne\Client\Model\InlineResponse2007', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3260,19 +3282,21 @@ public function createNotificationWebhookWithHttpInfo($applicationId, $body) } /** - * Operation createNotificationWebhookAsync + * Operation createCouponsForMultipleRecipientsAsync * - * Create notification webhook + * Create coupons for multiple recipients * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createNotificationWebhookAsync($applicationId, $body) + public function createCouponsForMultipleRecipientsAsync($applicationId, $campaignId, $body, $silent = 'yes') { - return $this->createNotificationWebhookAsyncWithHttpInfo($applicationId, $body) + return $this->createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent) ->then( function ($response) { return $response[0]; @@ -3281,20 +3305,22 @@ function ($response) { } /** - * Operation createNotificationWebhookAsyncWithHttpInfo + * Operation createCouponsForMultipleRecipientsAsyncWithHttpInfo * - * Create notification webhook + * Create coupons for multiple recipients * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createNotificationWebhookAsyncWithHttpInfo($applicationId, $body) + public function createCouponsForMultipleRecipientsAsyncWithHttpInfo($applicationId, $campaignId, $body, $silent = 'yes') { - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; - $request = $this->createNotificationWebhookRequest($applicationId, $body); + $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $request = $this->createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3331,36 +3357,51 @@ function ($exception) { } /** - * Create request for operation 'createNotificationWebhook' + * Create request for operation 'createCouponsForMultipleRecipients' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewCouponsForMultipleRecipients $body body (required) + * @param string $silent Possible values: `yes` or `no`. - `yes`: Increases the perfomance of the API call by returning a 204 response. - `no`: Returns a 200 response that contains the updated customer profiles. (optional, default to 'yes') * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createNotificationWebhookRequest($applicationId, $body) + protected function createCouponsForMultipleRecipientsRequest($applicationId, $campaignId, $body, $silent = 'yes') { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling createNotificationWebhook' + '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 createNotificationWebhook' + 'Missing the required parameter $body when calling createCouponsForMultipleRecipients' ); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks'; + $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 @@ -3371,6 +3412,14 @@ protected function createNotificationWebhookRequest($applicationId, $body) $resourcePath ); } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -3418,6 +3467,11 @@ protected function createNotificationWebhookRequest($applicationId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -3445,36 +3499,38 @@ protected function createNotificationWebhookRequest($applicationId, $body) } /** - * Operation createPasswordRecoveryEmail + * Operation createNotificationWebhook * - * Request a password reset + * Create notification about campaign-related changes * - * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NewPasswordEmail + * @return \TalonOne\Client\Model\NotificationWebhook */ - public function createPasswordRecoveryEmail($body) + public function createNotificationWebhook($applicationId, $body) { - list($response) = $this->createPasswordRecoveryEmailWithHttpInfo($body); + list($response) = $this->createNotificationWebhookWithHttpInfo($applicationId, $body); return $response; } /** - * Operation createPasswordRecoveryEmailWithHttpInfo + * Operation createNotificationWebhookWithHttpInfo * - * Request a password reset + * Create notification about campaign-related changes * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @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\NotificationWebhook, HTTP status code, HTTP response headers (array of strings) */ - public function createPasswordRecoveryEmailWithHttpInfo($body) + public function createNotificationWebhookWithHttpInfo($applicationId, $body) { - $request = $this->createPasswordRecoveryEmailRequest($body); + $request = $this->createNotificationWebhookRequest($applicationId, $body); try { $options = $this->createHttpClientOption(); @@ -3506,21 +3562,21 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { - case 204: - if ('\TalonOne\Client\Model\NewPasswordEmail' === '\SplFileObject') { + case 201: + if ('\TalonOne\Client\Model\NotificationWebhook' === '\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\NotificationWebhook', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; + $returnType = '\TalonOne\Client\Model\NotificationWebhook'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3536,10 +3592,10 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) } catch (ApiException $e) { switch ($e->getCode()) { - case 204: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NewPasswordEmail', + '\TalonOne\Client\Model\NotificationWebhook', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3550,18 +3606,19 @@ public function createPasswordRecoveryEmailWithHttpInfo($body) } /** - * Operation createPasswordRecoveryEmailAsync + * Operation createNotificationWebhookAsync * - * Request a password reset + * Create notification about campaign-related changes * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPasswordRecoveryEmailAsync($body) + public function createNotificationWebhookAsync($applicationId, $body) { - return $this->createPasswordRecoveryEmailAsyncWithHttpInfo($body) + return $this->createNotificationWebhookAsyncWithHttpInfo($applicationId, $body) ->then( function ($response) { return $response[0]; @@ -3570,19 +3627,20 @@ function ($response) { } /** - * Operation createPasswordRecoveryEmailAsyncWithHttpInfo + * Operation createNotificationWebhookAsyncWithHttpInfo * - * Request a password reset + * Create notification about campaign-related changes * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createPasswordRecoveryEmailAsyncWithHttpInfo($body) + public function createNotificationWebhookAsyncWithHttpInfo($applicationId, $body) { - $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; - $request = $this->createPasswordRecoveryEmailRequest($body); + $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $request = $this->createNotificationWebhookRequest($applicationId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3619,23 +3677,30 @@ function ($exception) { } /** - * Create request for operation 'createPasswordRecoveryEmail' + * Create request for operation 'createNotificationWebhook' * - * @param \TalonOne\Client\Model\NewPasswordEmail $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createPasswordRecoveryEmailRequest($body) + protected function createNotificationWebhookRequest($applicationId, $body) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling createNotificationWebhook' + ); + } // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createPasswordRecoveryEmail' + 'Missing the required parameter $body when calling createNotificationWebhook' ); } - $resourcePath = '/v1/password_recovery_emails'; + $resourcePath = '/v1/applications/{applicationId}/notification_webhooks'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3644,6 +3709,14 @@ protected function createPasswordRecoveryEmailRequest($body) + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -3691,6 +3764,11 @@ protected function createPasswordRecoveryEmailRequest($body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -3718,36 +3796,36 @@ protected function createPasswordRecoveryEmailRequest($body) } /** - * Operation createSession + * Operation createPasswordRecoveryEmail * - * Create session + * Request a password reset * - * @param \TalonOne\Client\Model\LoginParams $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\Session + * @return \TalonOne\Client\Model\NewPasswordEmail */ - public function createSession($body) + public function createPasswordRecoveryEmail($body) { - list($response) = $this->createSessionWithHttpInfo($body); + list($response) = $this->createPasswordRecoveryEmailWithHttpInfo($body); return $response; } /** - * Operation createSessionWithHttpInfo + * Operation createPasswordRecoveryEmailWithHttpInfo * - * Create session + * Request a password reset * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Session, 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 createSessionWithHttpInfo($body) + public function createPasswordRecoveryEmailWithHttpInfo($body) { - $request = $this->createSessionRequest($body); + $request = $this->createPasswordRecoveryEmailRequest($body); try { $options = $this->createHttpClientOption(); @@ -3779,21 +3857,21 @@ public function createSessionWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { - case 201: - if ('\TalonOne\Client\Model\Session' === '\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\Session', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NewPasswordEmail', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Session'; + $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -3809,10 +3887,10 @@ public function createSessionWithHttpInfo($body) } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 204: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Session', + '\TalonOne\Client\Model\NewPasswordEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3823,18 +3901,18 @@ public function createSessionWithHttpInfo($body) } /** - * Operation createSessionAsync + * Operation createPasswordRecoveryEmailAsync * - * Create session + * Request a password reset * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsync($body) + public function createPasswordRecoveryEmailAsync($body) { - return $this->createSessionAsyncWithHttpInfo($body) + return $this->createPasswordRecoveryEmailAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -3843,19 +3921,19 @@ function ($response) { } /** - * Operation createSessionAsyncWithHttpInfo + * Operation createPasswordRecoveryEmailAsyncWithHttpInfo * - * Create session + * Request a password reset * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createSessionAsyncWithHttpInfo($body) + public function createPasswordRecoveryEmailAsyncWithHttpInfo($body) { - $returnType = '\TalonOne\Client\Model\Session'; - $request = $this->createSessionRequest($body); + $returnType = '\TalonOne\Client\Model\NewPasswordEmail'; + $request = $this->createPasswordRecoveryEmailRequest($body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3892,23 +3970,23 @@ function ($exception) { } /** - * Create request for operation 'createSession' + * Create request for operation 'createPasswordRecoveryEmail' * - * @param \TalonOne\Client\Model\LoginParams $body (required) + * @param \TalonOne\Client\Model\NewPasswordEmail $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createSessionRequest($body) + protected function createPasswordRecoveryEmailRequest($body) { // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling createSession' + 'Missing the required parameter $body when calling createPasswordRecoveryEmail' ); } - $resourcePath = '/v1/sessions'; + $resourcePath = '/v1/password_recovery_emails'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3964,6 +4042,11 @@ protected function createSessionRequest($body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -3991,35 +4074,36 @@ protected function createSessionRequest($body) } /** - * Operation deleteAccountCollection + * Operation createSession * - * Delete account-level collection + * Create session * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (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 deleteAccountCollection($collectionId) + public function createSession($body) { - $this->deleteAccountCollectionWithHttpInfo($collectionId); + list($response) = $this->createSessionWithHttpInfo($body); + return $response; } /** - * Operation deleteAccountCollectionWithHttpInfo + * Operation createSessionWithHttpInfo * - * Delete account-level collection + * Create session * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param \TalonOne\Client\Model\LoginParams $body 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 deleteAccountCollectionWithHttpInfo($collectionId) + public function createSessionWithHttpInfo($body) { - $request = $this->deleteAccountCollectionRequest($collectionId); + $request = $this->createSessionRequest($body); try { $options = $this->createHttpClientOption(); @@ -4049,14 +4133,42 @@ public function deleteAccountCollectionWithHttpInfo($collectionId) ); } - 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 404: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Session', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4067,18 +4179,18 @@ public function deleteAccountCollectionWithHttpInfo($collectionId) } /** - * Operation deleteAccountCollectionAsync + * Operation createSessionAsync * - * Delete account-level collection + * Create session * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAccountCollectionAsync($collectionId) + public function createSessionAsync($body) { - return $this->deleteAccountCollectionAsyncWithHttpInfo($collectionId) + return $this->createSessionAsyncWithHttpInfo($body) ->then( function ($response) { return $response[0]; @@ -4087,25 +4199,36 @@ function ($response) { } /** - * Operation deleteAccountCollectionAsyncWithHttpInfo + * Operation createSessionAsyncWithHttpInfo * - * Delete account-level collection + * Create session * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteAccountCollectionAsyncWithHttpInfo($collectionId) + public function createSessionAsyncWithHttpInfo($body) { - $returnType = ''; - $request = $this->deleteAccountCollectionRequest($collectionId); + $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(); @@ -4125,23 +4248,23 @@ function ($exception) { } /** - * Create request for operation 'deleteAccountCollection' + * Create request for operation 'createSession' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param \TalonOne\Client\Model\LoginParams $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteAccountCollectionRequest($collectionId) + protected function createSessionRequest($body) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling deleteAccountCollection' + 'Missing the required parameter $body when calling createSession' ); } - $resourcePath = '/v1/collections/{collectionId}'; + $resourcePath = '/v1/sessions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4150,17 +4273,12 @@ protected function deleteAccountCollectionRequest($collectionId) - // path params - if ($collectionId !== null) { - $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), - $resourcePath - ); - } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -4169,7 +4287,7 @@ protected function deleteAccountCollectionRequest($collectionId) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -4202,6 +4320,11 @@ protected function deleteAccountCollectionRequest($collectionId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -4221,7 +4344,7 @@ protected function deleteAccountCollectionRequest($collectionId) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -4229,37 +4352,39 @@ protected function deleteAccountCollectionRequest($collectionId) } /** - * Operation deleteCampaign + * Operation deductLoyaltyCardPoints * - * Delete campaign + * Deduct points from card * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteCampaign($applicationId, $campaignId) + public function deductLoyaltyCardPoints($loyaltyProgramId, $loyaltyCardId, $body) { - $this->deleteCampaignWithHttpInfo($applicationId, $campaignId); + $this->deductLoyaltyCardPointsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); } /** - * Operation deleteCampaignWithHttpInfo + * Operation deductLoyaltyCardPointsWithHttpInfo * - * Delete campaign + * Deduct points from card * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body 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) */ - public function deleteCampaignWithHttpInfo($applicationId, $campaignId) + public function deductLoyaltyCardPointsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) { - $request = $this->deleteCampaignRequest($applicationId, $campaignId); + $request = $this->deductLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $body); try { $options = $this->createHttpClientOption(); @@ -4293,25 +4418,50 @@ public function deleteCampaignWithHttpInfo($applicationId, $campaignId) } catch (ApiException $e) { switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation deleteCampaignAsync + * Operation deductLoyaltyCardPointsAsync * - * Delete campaign + * Deduct points from card * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCampaignAsync($applicationId, $campaignId) + public function deductLoyaltyCardPointsAsync($loyaltyProgramId, $loyaltyCardId, $body) { - return $this->deleteCampaignAsyncWithHttpInfo($applicationId, $campaignId) + return $this->deductLoyaltyCardPointsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) ->then( function ($response) { return $response[0]; @@ -4320,20 +4470,21 @@ function ($response) { } /** - * Operation deleteCampaignAsyncWithHttpInfo + * Operation deductLoyaltyCardPointsAsyncWithHttpInfo * - * Delete campaign + * Deduct points from card * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCampaignAsyncWithHttpInfo($applicationId, $campaignId) + public function deductLoyaltyCardPointsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) { $returnType = ''; - $request = $this->deleteCampaignRequest($applicationId, $campaignId); + $request = $this->deductLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4359,30 +4510,41 @@ function ($exception) { } /** - * Create request for operation 'deleteCampaign' + * Create request for operation 'deductLoyaltyCardPoints' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteCampaignRequest($applicationId, $campaignId) + protected function deductLoyaltyCardPointsRequest($loyaltyProgramId, $loyaltyCardId, $body) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling deleteCampaign' + 'Missing the required parameter $loyaltyProgramId when calling deductLoyaltyCardPoints' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling deleteCampaign' + 'Missing the required parameter $loyaltyCardId when calling deductLoyaltyCardPoints' ); } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.deductLoyaltyCardPoints, must be smaller than or equal to 108.'); + } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; + // 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 deductLoyaltyCardPoints' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4392,33 +4554,36 @@ protected function deleteCampaignRequest($applicationId, $campaignId) // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } // path params - if ($campaignId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], - [] + ['application/json'], + ['application/json'] ); } @@ -4451,6 +4616,11 @@ protected function deleteCampaignRequest($applicationId, $campaignId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -4470,7 +4640,7 @@ protected function deleteCampaignRequest($applicationId, $campaignId) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -4478,39 +4648,35 @@ protected function deleteCampaignRequest($applicationId, $campaignId) } /** - * Operation deleteCollection + * Operation deleteAccountCollection * - * Delete collection + * Delete account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteCollection($applicationId, $campaignId, $collectionId) + public function deleteAccountCollection($collectionId) { - $this->deleteCollectionWithHttpInfo($applicationId, $campaignId, $collectionId); + $this->deleteAccountCollectionWithHttpInfo($collectionId); } /** - * Operation deleteCollectionWithHttpInfo + * Operation deleteAccountCollectionWithHttpInfo * - * Delete collection + * Delete account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteCollectionWithHttpInfo($applicationId, $campaignId, $collectionId) + public function deleteAccountCollectionWithHttpInfo($collectionId) { - $request = $this->deleteCollectionRequest($applicationId, $campaignId, $collectionId); + $request = $this->deleteAccountCollectionRequest($collectionId); try { $options = $this->createHttpClientOption(); @@ -4544,7 +4710,7 @@ public function deleteCollectionWithHttpInfo($applicationId, $campaignId, $colle } catch (ApiException $e) { switch ($e->getCode()) { - case 401: + case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\TalonOne\Client\Model\ErrorResponseWithStatus', @@ -4558,20 +4724,18 @@ public function deleteCollectionWithHttpInfo($applicationId, $campaignId, $colle } /** - * Operation deleteCollectionAsync + * Operation deleteAccountCollectionAsync * - * Delete collection + * Delete account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCollectionAsync($applicationId, $campaignId, $collectionId) + public function deleteAccountCollectionAsync($collectionId) { - return $this->deleteCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + return $this->deleteAccountCollectionAsyncWithHttpInfo($collectionId) ->then( function ($response) { return $response[0]; @@ -4580,21 +4744,19 @@ function ($response) { } /** - * Operation deleteCollectionAsyncWithHttpInfo + * Operation deleteAccountCollectionAsyncWithHttpInfo * - * Delete collection + * Delete account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + public function deleteAccountCollectionAsyncWithHttpInfo($collectionId) { $returnType = ''; - $request = $this->deleteCollectionRequest($applicationId, $campaignId, $collectionId); + $request = $this->deleteAccountCollectionRequest($collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4620,37 +4782,23 @@ function ($exception) { } /** - * Create request for operation 'deleteCollection' + * Create request for operation 'deleteAccountCollection' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteCollectionRequest($applicationId, $campaignId, $collectionId) + protected function deleteAccountCollectionRequest($collectionId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling deleteCollection' - ); - } - // 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 deleteCollection' - ); - } // verify the required parameter 'collectionId' is set if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling deleteCollection' + 'Missing the required parameter $collectionId when calling deleteAccountCollection' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; + $resourcePath = '/v1/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4659,22 +4807,6 @@ protected function deleteCollectionRequest($applicationId, $campaignId, $collect - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } // path params if ($collectionId !== null) { $resourcePath = str_replace( @@ -4727,6 +4859,11 @@ protected function deleteCollectionRequest($applicationId, $campaignId, $collect } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -4754,39 +4891,37 @@ protected function deleteCollectionRequest($applicationId, $campaignId, $collect } /** - * Operation deleteCoupon + * Operation deleteCampaign * - * Delete coupon + * Delete campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (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 coupon + * Delete campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (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(); @@ -4826,20 +4961,19 @@ public function deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId) } /** - * Operation deleteCouponAsync + * Operation deleteCampaignAsync * - * Delete coupon + * Delete campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (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]; @@ -4848,21 +4982,20 @@ function ($response) { } /** - * Operation deleteCouponAsyncWithHttpInfo + * Operation deleteCampaignAsyncWithHttpInfo * - * Delete coupon + * Delete campaign * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (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()) @@ -4888,37 +5021,30 @@ function ($exception) { } /** - * Create request for operation 'deleteCoupon' + * Create request for operation 'deleteCampaign' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (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 = []; @@ -4943,14 +5069,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; @@ -4995,6 +5113,11 @@ protected function deleteCouponRequest($applicationId, $campaignId, $couponId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -5022,63 +5145,39 @@ protected function deleteCouponRequest($applicationId, $campaignId, $couponId) } /** - * Operation deleteCoupons + * Operation deleteCollection * - * Delete coupons + * Delete collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param 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 - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (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 deleteCollection($applicationId, $campaignId, $collectionId) { - $this->deleteCouponsWithHttpInfo($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $this->deleteCollectionWithHttpInfo($applicationId, $campaignId, $collectionId); } /** - * Operation deleteCouponsWithHttpInfo + * Operation deleteCollectionWithHttpInfo * - * Delete coupons + * Delete collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param 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 - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function 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 deleteCollectionWithHttpInfo($applicationId, $campaignId, $collectionId) { - $request = $this->deleteCouponsRequest($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $request = $this->deleteCollectionRequest($applicationId, $campaignId, $collectionId); try { $options = $this->createHttpClientOption(); @@ -5112,38 +5211,34 @@ public function deleteCouponsWithHttpInfo($applicationId, $campaignId, $value = } catch (ApiException $e) { switch ($e->getCode()) { + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation deleteCouponsAsync + * Operation deleteCollectionAsync * - * Delete coupons + * Delete collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param 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 - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (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 deleteCollectionAsync($applicationId, $campaignId, $collectionId) { - return $this->deleteCouponsAsyncWithHttpInfo($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch) + return $this->deleteCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) ->then( function ($response) { return $response[0]; @@ -5152,33 +5247,21 @@ function ($response) { } /** - * Operation deleteCouponsAsyncWithHttpInfo + * Operation deleteCollectionAsyncWithHttpInfo * - * Delete coupons + * Delete collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param 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 - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (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 deleteCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) { $returnType = ''; - $request = $this->deleteCouponsRequest($applicationId, $campaignId, $value, $createdBefore, $createdAfter, $startsAfter, $startsBefore, $expiresAfter, $expiresBefore, $valid, $batchId, $usable, $referralId, $recipientIntegrationId, $exactMatch); + $request = $this->deleteCollectionRequest($applicationId, $campaignId, $collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5204,140 +5287,43 @@ function ($exception) { } /** - * Create request for operation 'deleteCoupons' + * Create request for operation 'deleteCollection' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $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 - `expired`: Matches coupons in which the expiry date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (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 deleteCollectionRequest($applicationId, $campaignId, $collectionId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling deleteCoupons' + 'Missing the required parameter $applicationId when calling deleteCollection' ); } // 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 deleteCollection' + ); + } + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling deleteCollection' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; $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 @@ -5356,17 +5342,25 @@ protected function deleteCouponsRequest($applicationId, $campaignId, $value = nu $resourcePath ); } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/json'], [] ); } @@ -5400,6 +5394,11 @@ protected function deleteCouponsRequest($applicationId, $campaignId, $value = nu } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -5427,37 +5426,39 @@ protected function deleteCouponsRequest($applicationId, $campaignId, $value = nu } /** - * Operation deleteNotificationWebhook + * Operation deleteCoupon * - * Delete notification webhook + * Delete coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId notificationWebhookId (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function deleteNotificationWebhook($applicationId, $notificationWebhookId) + public function deleteCoupon($applicationId, $campaignId, $couponId) { - $this->deleteNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId); + $this->deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId); } /** - * Operation deleteNotificationWebhookWithHttpInfo + * Operation deleteCouponWithHttpInfo * - * Delete notification webhook + * Delete coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function deleteNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId) + public function deleteCouponWithHttpInfo($applicationId, $campaignId, $couponId) { - $request = $this->deleteNotificationWebhookRequest($applicationId, $notificationWebhookId); + $request = $this->deleteCouponRequest($applicationId, $campaignId, $couponId); try { $options = $this->createHttpClientOption(); @@ -5497,19 +5498,20 @@ public function deleteNotificationWebhookWithHttpInfo($applicationId, $notificat } /** - * Operation deleteNotificationWebhookAsync + * Operation deleteCouponAsync * - * Delete notification webhook + * Delete coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNotificationWebhookAsync($applicationId, $notificationWebhookId) + public function deleteCouponAsync($applicationId, $campaignId, $couponId) { - return $this->deleteNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + return $this->deleteCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId) ->then( function ($response) { return $response[0]; @@ -5518,20 +5520,21 @@ function ($response) { } /** - * Operation deleteNotificationWebhookAsyncWithHttpInfo + * Operation deleteCouponAsyncWithHttpInfo * - * Delete notification webhook + * Delete coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function deleteNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + public function deleteCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId) { $returnType = ''; - $request = $this->deleteNotificationWebhookRequest($applicationId, $notificationWebhookId); + $request = $this->deleteCouponRequest($applicationId, $campaignId, $couponId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5557,30 +5560,37 @@ function ($exception) { } /** - * Create request for operation 'deleteNotificationWebhook' + * Create request for operation 'deleteCoupon' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteNotificationWebhookRequest($applicationId, $notificationWebhookId) + 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 deleteNotificationWebhook' + 'Missing the required parameter $applicationId when calling deleteCoupon' ); } - // verify the required parameter 'notificationWebhookId' is set - if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $notificationWebhookId when calling deleteNotificationWebhook' + 'Missing the required parameter $campaignId when calling 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}/notification_webhooks/{notificationWebhookId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5598,10 +5608,18 @@ protected function deleteNotificationWebhookRequest($applicationId, $notificatio ); } // path params - if ($notificationWebhookId !== null) { + if ($campaignId !== null) { $resourcePath = str_replace( - '{' . 'notificationWebhookId' . '}', - ObjectSerializer::toPathValue($notificationWebhookId), + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($couponId !== null) { + $resourcePath = str_replace( + '{' . 'couponId' . '}', + ObjectSerializer::toPathValue($couponId), $resourcePath ); } @@ -5649,6 +5667,11 @@ protected function deleteNotificationWebhookRequest($applicationId, $notificatio } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -5676,39 +5699,63 @@ protected function deleteNotificationWebhookRequest($applicationId, $notificatio } /** - * Operation deleteReferral + * Operation deleteCoupons * - * Delete referral + * Delete coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $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 - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. (optional) + * @param 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 referral + * Delete coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $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 - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. (optional) + * @param 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(); @@ -5748,20 +5795,32 @@ public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referra } /** - * Operation deleteReferralAsync + * Operation deleteCouponsAsync * - * Delete referral + * Delete coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $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 - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. (optional) + * @param 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]; @@ -5770,21 +5829,33 @@ function ($response) { } /** - * Operation deleteReferralAsyncWithHttpInfo + * Operation deleteCouponsAsyncWithHttpInfo * - * Delete referral + * Delete coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $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 - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. (optional) + * @param 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()) @@ -5810,43 +5881,140 @@ function ($exception) { } /** - * Create request for operation 'deleteReferral' + * Create request for operation 'deleteCoupons' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code 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 - `expired`: Matches coupons in which the expiration date is set and in the past. - `validNow`: Matches coupons in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: 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 - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's `RecipientIntegrationId` field. (optional) + * @param 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 deleteReferralRequest($applicationId, $campaignId, $referralId) + 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 @@ -5865,14 +6033,6 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI $resourcePath ); } - // path params - if ($referralId !== null) { - $resourcePath = str_replace( - '{' . 'referralId' . '}', - ObjectSerializer::toPathValue($referralId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -5917,6 +6077,11 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -5944,33 +6109,37 @@ protected function deleteReferralRequest($applicationId, $campaignId, $referralI } /** - * Operation destroySession + * Operation deleteLoyaltyCard * - * Destroy session + * Delete loyalty card * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return void */ - public function destroySession() + public function deleteLoyaltyCard($loyaltyProgramId, $loyaltyCardId) { - $this->destroySessionWithHttpInfo(); + $this->deleteLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId); } /** - * Operation destroySessionWithHttpInfo + * Operation deleteLoyaltyCardWithHttpInfo * - * Destroy session + * Delete loyalty card * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function destroySessionWithHttpInfo() + public function deleteLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) { - $request = $this->destroySessionRequest(); + $request = $this->deleteLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); try { $options = $this->createHttpClientOption(); @@ -6004,23 +6173,41 @@ public function destroySessionWithHttpInfo() } catch (ApiException $e) { switch ($e->getCode()) { + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation destroySessionAsync + * Operation deleteLoyaltyCardAsync * - * Destroy session + * Delete loyalty card * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function destroySessionAsync() + public function deleteLoyaltyCardAsync($loyaltyProgramId, $loyaltyCardId) { - return $this->destroySessionAsyncWithHttpInfo() + return $this->deleteLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) ->then( function ($response) { return $response[0]; @@ -6029,18 +6216,20 @@ function ($response) { } /** - * Operation destroySessionAsyncWithHttpInfo + * Operation deleteLoyaltyCardAsyncWithHttpInfo * - * Destroy session + * Delete loyalty card * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function destroySessionAsyncWithHttpInfo() + public function deleteLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) { $returnType = ''; - $request = $this->destroySessionRequest(); + $request = $this->deleteLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6066,16 +6255,34 @@ function ($exception) { } /** - * Create request for operation 'destroySession' + * Create request for operation 'deleteLoyaltyCard' * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function destroySessionRequest() + protected function deleteLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling deleteLoyaltyCard' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling deleteLoyaltyCard' + ); + } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.deleteLoyaltyCard, must be smaller than or equal to 108.'); + } - $resourcePath = '/v1/sessions'; + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6084,17 +6291,33 @@ protected function destroySessionRequest() + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - [] + ['application/json'] ); } else { $headers = $this->headerSelector->selectHeaders( - [], + ['application/json'], [] ); } @@ -6128,6 +6351,11 @@ protected function destroySessionRequest() } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -6155,36 +6383,37 @@ protected function destroySessionRequest() } /** - * Operation exportAccountCollectionItems + * Operation deleteNotificationWebhook * - * Export account-level collection's items + * Delete notification about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return void */ - public function exportAccountCollectionItems($collectionId) + public function deleteNotificationWebhook($applicationId, $notificationWebhookId) { - list($response) = $this->exportAccountCollectionItemsWithHttpInfo($collectionId); - return $response; + $this->deleteNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId); } /** - * Operation exportAccountCollectionItemsWithHttpInfo + * Operation deleteNotificationWebhookWithHttpInfo * - * Export account-level collection's items + * Delete notification about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function exportAccountCollectionItemsWithHttpInfo($collectionId) + public function deleteNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId) { - $request = $this->exportAccountCollectionItemsRequest($collectionId); + $request = $this->deleteNotificationWebhookRequest($applicationId, $notificationWebhookId); try { $options = $this->createHttpClientOption(); @@ -6214,104 +6443,29 @@ public function exportAccountCollectionItemsWithHttpInfo($collectionId) ); } - $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() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'string'; - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'string', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation exportAccountCollectionItemsAsync + * Operation deleteNotificationWebhookAsync * - * Export account-level collection's items + * Delete notification about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportAccountCollectionItemsAsync($collectionId) + public function deleteNotificationWebhookAsync($applicationId, $notificationWebhookId) { - return $this->exportAccountCollectionItemsAsyncWithHttpInfo($collectionId) + return $this->deleteNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) ->then( function ($response) { return $response[0]; @@ -6320,36 +6474,26 @@ function ($response) { } /** - * Operation exportAccountCollectionItemsAsyncWithHttpInfo + * Operation deleteNotificationWebhookAsyncWithHttpInfo * - * Export account-level collection's items + * Delete notification about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportAccountCollectionItemsAsyncWithHttpInfo($collectionId) + public function deleteNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) { - $returnType = 'string'; - $request = $this->exportAccountCollectionItemsRequest($collectionId); + $returnType = ''; + $request = $this->deleteNotificationWebhookRequest($applicationId, $notificationWebhookId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -6369,23 +6513,30 @@ function ($exception) { } /** - * Create request for operation 'exportAccountCollectionItems' + * Create request for operation 'deleteNotificationWebhook' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportAccountCollectionItemsRequest($collectionId) + protected function deleteNotificationWebhookRequest($applicationId, $notificationWebhookId) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling exportAccountCollectionItems' + 'Missing the required parameter $applicationId when calling deleteNotificationWebhook' + ); + } + // verify the required parameter 'notificationWebhookId' is set + if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $notificationWebhookId when calling deleteNotificationWebhook' ); } - $resourcePath = '/v1/collections/{collectionId}/export'; + $resourcePath = '/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6395,10 +6546,18 @@ protected function exportAccountCollectionItemsRequest($collectionId) // path params - if ($collectionId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($notificationWebhookId !== null) { + $resourcePath = str_replace( + '{' . 'notificationWebhookId' . '}', + ObjectSerializer::toPathValue($notificationWebhookId), $resourcePath ); } @@ -6408,11 +6567,11 @@ protected function exportAccountCollectionItemsRequest($collectionId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/csv'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/csv'], + [], [] ); } @@ -6446,6 +6605,11 @@ protected function exportAccountCollectionItemsRequest($collectionId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -6465,7 +6629,7 @@ protected function exportAccountCollectionItemsRequest($collectionId) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6473,40 +6637,39 @@ protected function exportAccountCollectionItemsRequest($collectionId) } /** - * Operation exportCollectionItems + * Operation deleteReferral * - * Export a collection's items + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return void */ - public function exportCollectionItems($applicationId, $campaignId, $collectionId) + public function deleteReferral($applicationId, $campaignId, $referralId) { - list($response) = $this->exportCollectionItemsWithHttpInfo($applicationId, $campaignId, $collectionId); - return $response; + $this->deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId); } /** - * Operation exportCollectionItemsWithHttpInfo + * Operation deleteReferralWithHttpInfo * - * Export a collection's items + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function exportCollectionItemsWithHttpInfo($applicationId, $campaignId, $collectionId) + public function deleteReferralWithHttpInfo($applicationId, $campaignId, $referralId) { - $request = $this->exportCollectionItemsRequest($applicationId, $campaignId, $collectionId); + $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); try { $options = $this->createHttpClientOption(); @@ -6536,106 +6699,30 @@ public function exportCollectionItemsWithHttpInfo($applicationId, $campaignId, $ ); } - $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() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = 'string'; - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - 'string', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation exportCollectionItemsAsync + * Operation deleteReferralAsync * - * Export a collection's items + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCollectionItemsAsync($applicationId, $campaignId, $collectionId) + public function deleteReferralAsync($applicationId, $campaignId, $referralId) { - return $this->exportCollectionItemsAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + return $this->deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) ->then( function ($response) { return $response[0]; @@ -6644,38 +6731,27 @@ function ($response) { } /** - * Operation exportCollectionItemsAsyncWithHttpInfo + * Operation deleteReferralAsyncWithHttpInfo * - * Export a collection's items + * Delete referral * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCollectionItemsAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + public function deleteReferralAsyncWithHttpInfo($applicationId, $campaignId, $referralId) { - $returnType = 'string'; - $request = $this->exportCollectionItemsRequest($applicationId, $campaignId, $collectionId); + $returnType = ''; + $request = $this->deleteReferralRequest($applicationId, $campaignId, $referralId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -6695,37 +6771,37 @@ function ($exception) { } /** - * Create request for operation 'exportCollectionItems' + * Create request for operation 'deleteReferral' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param string $referralId The ID of the referral code. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportCollectionItemsRequest($applicationId, $campaignId, $collectionId) + 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 exportCollectionItems' + '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 exportCollectionItems' + 'Missing the required parameter $campaignId when calling deleteReferral' ); } - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'referralId' is set + if ($referralId === null || (is_array($referralId) && count($referralId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling exportCollectionItems' + 'Missing the required parameter $referralId when calling deleteReferral' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6751,10 +6827,10 @@ protected function exportCollectionItemsRequest($applicationId, $campaignId, $co ); } // path params - if ($collectionId !== null) { + if ($referralId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'referralId' . '}', + ObjectSerializer::toPathValue($referralId), $resourcePath ); } @@ -6764,11 +6840,11 @@ protected function exportCollectionItemsRequest($applicationId, $campaignId, $co if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/csv'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/csv'], + [], [] ); } @@ -6802,6 +6878,11 @@ protected function exportCollectionItemsRequest($applicationId, $campaignId, $co } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -6821,7 +6902,7 @@ protected function exportCollectionItemsRequest($applicationId, $campaignId, $co $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6829,62 +6910,33 @@ protected function exportCollectionItemsRequest($applicationId, $campaignId, $co } /** - * Operation exportCoupons + * Operation destroySession * - * Export coupons + * Destroy session * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string + * @return void */ - public function exportCoupons($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function destroySession() { - list($response) = $this->exportCouponsWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); - return $response; + $this->destroySessionWithHttpInfo(); } /** - * Operation exportCouponsWithHttpInfo + * Operation destroySessionWithHttpInfo * - * Export coupons + * Destroy session * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function exportCouponsWithHttpInfo($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function destroySessionWithHttpInfo() { - $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + $request = $this->destroySessionRequest(); try { $options = $this->createHttpClientOption(); @@ -6914,77 +6966,27 @@ public function exportCouponsWithHttpInfo($applicationId, $campaignId = null, $s ); } - $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() - ]; + return [null, $statusCode, $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 + * Operation destroySessionAsync * - * Export coupons + * Destroy session * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCouponsAsync($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function destroySessionAsync() { - return $this->exportCouponsAsyncWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState) + return $this->destroySessionAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -6993,49 +6995,24 @@ function ($response) { } /** - * Operation exportCouponsAsyncWithHttpInfo + * Operation destroySessionAsyncWithHttpInfo * - * Export coupons + * Destroy session * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCouponsAsyncWithHttpInfo($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + public function destroySessionAsyncWithHttpInfo() { - $returnType = 'string'; - $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); + $returnType = ''; + $request = $this->destroySessionRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -7055,154 +7032,35 @@ function ($exception) { } /** - * Create request for operation 'exportCoupons' + * Create request for operation 'destroySession' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportCouponsRequest($applicationId, $campaignId = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $dateFormat = null, $campaignState = null) + protected function destroySessionRequest() { - // 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'; + $resourcePath = '/v1/sessions'; $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'], + [], [] ); } @@ -7236,6 +7094,11 @@ protected function exportCouponsRequest($applicationId, $campaignId = null, $sor } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -7255,7 +7118,7 @@ protected function exportCouponsRequest($applicationId, $campaignId = null, $sor $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7263,46 +7126,36 @@ protected function exportCouponsRequest($applicationId, $campaignId = null, $sor } /** - * Operation exportCustomerSessions + * Operation exportAccountCollectionItems * - * Export customer sessions + * Export account-level collection's items * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function exportCustomerSessions($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + public function exportAccountCollectionItems($collectionId) { - list($response) = $this->exportCustomerSessionsWithHttpInfo($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + list($response) = $this->exportAccountCollectionItemsWithHttpInfo($collectionId); return $response; } /** - * Operation exportCustomerSessionsWithHttpInfo + * Operation exportAccountCollectionItemsWithHttpInfo * - * Export customer sessions + * Export account-level collection's items * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function exportCustomerSessionsWithHttpInfo($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + public function exportAccountCollectionItemsWithHttpInfo($collectionId) { - $request = $this->exportCustomerSessionsRequest($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + $request = $this->exportAccountCollectionItemsRequest($collectionId); try { $options = $this->createHttpClientOption(); @@ -7346,6 +7199,30 @@ public function exportCustomerSessionsWithHttpInfo($applicationId, $createdBefor $response->getStatusCode(), $response->getHeaders() ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; } $returnType = 'string'; @@ -7372,29 +7249,40 @@ public function exportCustomerSessionsWithHttpInfo($applicationId, $createdBefor ); $e->setResponseObject($data); break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; } throw $e; } } /** - * Operation exportCustomerSessionsAsync + * Operation exportAccountCollectionItemsAsync * - * Export customer sessions + * Export account-level collection's items * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCustomerSessionsAsync($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + public function exportAccountCollectionItemsAsync($collectionId) { - return $this->exportCustomerSessionsAsyncWithHttpInfo($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState) + return $this->exportAccountCollectionItemsAsyncWithHttpInfo($collectionId) ->then( function ($response) { return $response[0]; @@ -7403,24 +7291,19 @@ function ($response) { } /** - * Operation exportCustomerSessionsAsyncWithHttpInfo + * Operation exportAccountCollectionItemsAsyncWithHttpInfo * - * Export customer sessions + * Export account-level collection's items * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportCustomerSessionsAsyncWithHttpInfo($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + public function exportAccountCollectionItemsAsyncWithHttpInfo($collectionId) { $returnType = 'string'; - $request = $this->exportCustomerSessionsRequest($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); + $request = $this->exportAccountCollectionItemsRequest($collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7457,76 +7340,36 @@ function ($exception) { } /** - * Create request for operation 'exportCustomerSessions' + * Create request for operation 'exportAccountCollectionItems' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportCustomerSessionsRequest($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) + protected function exportAccountCollectionItemsRequest($collectionId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling exportCustomerSessions' + 'Missing the required parameter $collectionId when calling exportAccountCollectionItems' ); } - $resourcePath = '/v1/applications/{applicationId}/export_customer_sessions'; + $resourcePath = '/v1/collections/{collectionId}/export'; $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) { + if ($collectionId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), $resourcePath ); } @@ -7574,6 +7417,11 @@ protected function exportCustomerSessionsRequest($applicationId, $createdBefore } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -7601,44 +7449,40 @@ protected function exportCustomerSessionsRequest($applicationId, $createdBefore } /** - * Operation exportEffects + * Operation exportCollectionItems * - * Export triggered effects + * Export a collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function exportEffects($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCollectionItems($applicationId, $campaignId, $collectionId) { - list($response) = $this->exportEffectsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + list($response) = $this->exportCollectionItemsWithHttpInfo($applicationId, $campaignId, $collectionId); return $response; } /** - * Operation exportEffectsWithHttpInfo + * Operation exportCollectionItemsWithHttpInfo * - * Export triggered effects + * Export a collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCollectionItemsWithHttpInfo($applicationId, $campaignId, $collectionId) { - $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + $request = $this->exportCollectionItemsRequest($applicationId, $campaignId, $collectionId); try { $options = $this->createHttpClientOption(); @@ -7682,6 +7526,30 @@ public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $c $response->getStatusCode(), $response->getHeaders() ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; } $returnType = 'string'; @@ -7708,28 +7576,42 @@ public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $c ); $e->setResponseObject($data); break; - } - throw $e; - } - } + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } /** - * Operation exportEffectsAsync + * Operation exportCollectionItemsAsync * - * Export triggered effects + * Export a collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportEffectsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCollectionItemsAsync($applicationId, $campaignId, $collectionId) { - return $this->exportEffectsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) + return $this->exportCollectionItemsAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) ->then( function ($response) { return $response[0]; @@ -7738,23 +7620,21 @@ function ($response) { } /** - * Operation exportEffectsAsyncWithHttpInfo + * Operation exportCollectionItemsAsyncWithHttpInfo * - * Export triggered effects + * Export a collection's items * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportEffectsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + public function exportCollectionItemsAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) { $returnType = 'string'; - $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); + $request = $this->exportCollectionItemsRequest($applicationId, $campaignId, $collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7791,61 +7671,43 @@ function ($exception) { } /** - * Create request for operation 'exportEffects' + * Create request for operation 'exportCollectionItems' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportEffectsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) + protected function exportCollectionItemsRequest($applicationId, $campaignId, $collectionId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling exportEffects' + 'Missing the required parameter $applicationId when calling exportCollectionItems' + ); + } + // 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 exportCollectionItems' + ); + } + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling exportCollectionItems' ); } - $resourcePath = '/v1/applications/{applicationId}/export_effects'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export'; $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 @@ -7856,6 +7718,22 @@ protected function exportEffectsRequest($applicationId, $campaignId = null, $cre $resourcePath ); } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -7900,6 +7778,11 @@ protected function exportEffectsRequest($applicationId, $campaignId = null, $cre } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -7927,36 +7810,62 @@ protected function exportEffectsRequest($applicationId, $campaignId = null, $cre } /** - * Operation exportLoyaltyBalance + * Operation exportCoupons * - * Export customer loyalty balance to a CSV file + * Export coupons * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return string */ - public function exportLoyaltyBalance($loyaltyProgramId) + 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->exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId); + list($response) = $this->exportCouponsWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); return $response; } /** - * Operation exportLoyaltyBalanceWithHttpInfo + * Operation exportCouponsWithHttpInfo * - * Export customer loyalty balance to a CSV file + * Export coupons * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId) + 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->exportLoyaltyBalanceRequest($loyaltyProgramId); + $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); try { $options = $this->createHttpClientOption(); @@ -8000,30 +7909,6 @@ public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId) $response->getStatusCode(), $response->getHeaders() ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; } $returnType = 'string'; @@ -8050,40 +7935,37 @@ public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId) ); $e->setResponseObject($data); break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation exportLoyaltyBalanceAsync + * Operation exportCouponsAsync * - * Export customer loyalty balance to a CSV file + * Export coupons * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyBalanceAsync($loyaltyProgramId) + 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->exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId) + return $this->exportCouponsAsyncWithHttpInfo($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState) ->then( function ($response) { return $response[0]; @@ -8092,19 +7974,32 @@ function ($response) { } /** - * Operation exportLoyaltyBalanceAsyncWithHttpInfo + * Operation exportCouponsAsyncWithHttpInfo * - * Export customer loyalty balance to a CSV file + * Export coupons * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId) + 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->exportLoyaltyBalanceRequest($loyaltyProgramId); + $request = $this->exportCouponsRequest($applicationId, $campaignId, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $dateFormat, $campaignState); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8141,36 +8036,140 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyBalance' + * Create request for operation 'exportCoupons' * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $dateFormat Determines the format of dates in the export document. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function exportLoyaltyBalanceRequest($loyaltyProgramId) + 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 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalance' + 'Missing the required parameter $applicationId when calling exportCoupons' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance'; + $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 ($loyaltyProgramId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -8218,6 +8217,11 @@ protected function exportLoyaltyBalanceRequest($loyaltyProgramId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -8245,44 +8249,46 @@ protected function exportLoyaltyBalanceRequest($loyaltyProgramId) } /** - * Operation exportLoyaltyLedger + * Operation exportCustomerSessions * - * Export a customer's loyalty ledger log + * Export customer sessions * - * @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 $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportCustomerSessions($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) { - list($response) = $this->exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + list($response) = $this->exportCustomerSessionsWithHttpInfo($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); return $response; } /** - * Operation exportLoyaltyLedgerWithHttpInfo + * Operation exportCustomerSessionsWithHttpInfo * - * Export a customer's loyalty ledger log + * Export customer sessions * - * @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 $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportCustomerSessionsWithHttpInfo($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) { - $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + $request = $this->exportCustomerSessionsRequest($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); try { $options = $this->createHttpClientOption(); @@ -8358,22 +8364,23 @@ public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyalty } /** - * Operation exportLoyaltyLedgerAsync + * Operation exportCustomerSessionsAsync * - * Export a customer's loyalty ledger log + * Export customer sessions * - * @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 $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 exportLoyaltyLedgerAsync($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportCustomerSessionsAsync($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) { - return $this->exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat) + return $this->exportCustomerSessionsAsyncWithHttpInfo($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState) ->then( function ($response) { return $response[0]; @@ -8382,23 +8389,24 @@ function ($response) { } /** - * Operation exportLoyaltyLedgerAsyncWithHttpInfo + * Operation exportCustomerSessionsAsyncWithHttpInfo * - * Export a customer's loyalty ledger log + * Export customer sessions * - * @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 $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + public function exportCustomerSessionsAsyncWithHttpInfo($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = null) { $returnType = 'string'; - $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); + $request = $this->exportCustomerSessionsRequest($applicationId, $createdBefore, $createdAfter, $profileIntegrationId, $dateFormat, $customerSessionState); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8435,45 +8443,28 @@ function ($exception) { } /** - * Create request for operation 'exportLoyaltyLedger' + * Create request for operation 'exportCustomerSessions' * - * @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 $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) + protected function exportCustomerSessionsRequest($applicationId, $createdBefore = null, $createdAfter = null, $profileIntegrationId = null, $dateFormat = null, $customerSessionState = 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 exportLoyaltyLedger' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling exportLoyaltyLedger' - ); - } - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyLedger' - ); - } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling exportLoyaltyLedger' + 'Missing the required parameter $applicationId when calling exportCustomerSessions' ); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log'; + $resourcePath = '/v1/applications/{applicationId}/export_customer_sessions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8481,18 +8472,25 @@ protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyPr $multipart = false; // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; } // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + 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)) { @@ -8501,21 +8499,20 @@ protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyPr 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 ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); - } - // path params - if ($integrationId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } @@ -8563,6 +8560,11 @@ protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyPr } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -8590,50 +8592,44 @@ protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyPr } /** - * Operation exportReferrals + * Operation exportEffects * - * Export referrals + * Export triggered effects * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $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 exportReferrals($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportEffects($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - list($response) = $this->exportReferralsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + list($response) = $this->exportEffectsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); return $response; } /** - * Operation exportReferralsWithHttpInfo + * Operation exportEffectsWithHttpInfo * - * Export referrals + * Export triggered effects * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $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 exportReferralsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportEffectsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -8709,25 +8705,22 @@ public function exportReferralsWithHttpInfo($applicationId, $campaignId = null, } /** - * Operation exportReferralsAsync + * Operation exportEffectsAsync * - * Export referrals + * Export triggered effects * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $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 exportReferralsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportEffectsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { - return $this->exportReferralsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) + return $this->exportEffectsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat) ->then( function ($response) { return $response[0]; @@ -8736,26 +8729,23 @@ function ($response) { } /** - * Operation exportReferralsAsyncWithHttpInfo + * Operation exportEffectsAsyncWithHttpInfo * - * Export referrals + * Export triggered effects * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $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 exportReferralsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + public function exportEffectsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $dateFormat = null) { $returnType = 'string'; - $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); + $request = $this->exportEffectsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8792,30 +8782,27 @@ function ($exception) { } /** - * Create request for operation 'exportReferrals' + * Create request for operation 'exportEffects' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $valid - `expired`: Matches referrals in which the expiry date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiry date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) - * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) - * @param string $batchId Filter results by batches of referrals (optional) + * @param \DateTime $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 exportReferralsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) + 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 exportReferrals' + 'Missing the required parameter $applicationId when calling exportEffects' ); } - $resourcePath = '/v1/applications/{applicationId}/export_referrals'; + $resourcePath = '/v1/applications/{applicationId}/export_effects'; $formParams = []; $queryParams = []; $headerParams = []; @@ -8844,27 +8831,6 @@ protected function exportReferralsRequest($applicationId, $campaignId = null, $c $queryParams['createdAfter'] = $createdAfter; } // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($usable)) { - $usable = ObjectSerializer::serializeCollection($usable, '', true); - } - if ($usable !== null) { - $queryParams['usable'] = $usable; - } - // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); - } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; - } - // query params if (is_array($dateFormat)) { $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); } @@ -8925,6 +8891,11 @@ protected function exportReferralsRequest($applicationId, $campaignId = null, $c } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -8952,52 +8923,38 @@ protected function exportReferralsRequest($applicationId, $campaignId = null, $c } /** - * Operation getAccessLogsWithoutTotalCount + * Operation exportLoyaltyBalance * - * Get access logs for Application + * Export customer loyalty balance to CSV * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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 $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20013 + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function exportLoyaltyBalance($loyaltyProgramId, $endDate = null) { - list($response) = $this->getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + list($response) = $this->exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate); return $response; } /** - * Operation getAccessLogsWithoutTotalCountWithHttpInfo + * Operation exportLoyaltyBalanceWithHttpInfo * - * Get access logs for Application + * Export customer loyalty balance to CSV * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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 $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @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 string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function exportLoyaltyBalanceWithHttpInfo($loyaltyProgramId, $endDate = null) { - $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $request = $this->exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate); try { $options = $this->createHttpClientOption(); @@ -9030,20 +8987,44 @@ public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rang $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20013' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20013', []), + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20013'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -9062,7 +9043,23 @@ public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rang case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20013', + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9073,26 +9070,19 @@ public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rang } /** - * Operation getAccessLogsWithoutTotalCountAsync + * Operation exportLoyaltyBalanceAsync * - * Get access logs for Application + * Export customer loyalty balance to CSV * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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 $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccessLogsWithoutTotalCountAsync($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function exportLoyaltyBalanceAsync($loyaltyProgramId, $endDate = null) { - return $this->getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) + return $this->exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId, $endDate) ->then( function ($response) { return $response[0]; @@ -9101,27 +9091,20 @@ function ($response) { } /** - * Operation getAccessLogsWithoutTotalCountAsyncWithHttpInfo + * Operation exportLoyaltyBalanceAsyncWithHttpInfo * - * Get access logs for Application + * Export customer loyalty balance to CSV * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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 $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function exportLoyaltyBalanceAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20013'; - $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $returnType = 'string'; + $request = $this->exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9158,50 +9141,24 @@ function ($exception) { } /** - * Create request for operation 'getAccessLogsWithoutTotalCount' + * Create request for operation 'exportLoyaltyBalance' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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 $path Only return results where the request path matches the given regular expression. (optional) - * @param string $method Only return results where the request method matches the given regular expression. (optional) - * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items 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 $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + protected function exportLoyaltyBalanceRequest($loyaltyProgramId, $endDate = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getAccessLogsWithoutTotalCount' - ); - } - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getAccessLogsWithoutTotalCount' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getAccessLogsWithoutTotalCount' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalance' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/access_logs/no_total'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance'; $formParams = []; $queryParams = []; $headerParams = []; @@ -9209,68 +9166,19 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS $multipart = false; // query params - if (is_array($path)) { - $path = ObjectSerializer::serializeCollection($path, '', true); - } - if ($path !== null) { - $queryParams['path'] = $path; - } - // query params - if (is_array($method)) { - $method = ObjectSerializer::serializeCollection($method, '', true); - } - if ($method !== null) { - $queryParams['method'] = $method; - } - // query params - if (is_array($status)) { - $status = ObjectSerializer::serializeCollection($status, '', true); - } - if ($status !== null) { - $queryParams['status'] = $status; - } - // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); - } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; - } - // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); - } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; } // path params - if ($applicationId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -9280,11 +9188,11 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -9318,6 +9226,11 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -9345,36 +9258,38 @@ protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeS } /** - * Operation getAccount + * Operation exportLoyaltyBalances * - * Get account details + * Export customer loyalty balances * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Account + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getAccount($accountId) + public function exportLoyaltyBalances($loyaltyProgramId, $endDate = null) { - list($response) = $this->getAccountWithHttpInfo($accountId); + list($response) = $this->exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate); return $response; } /** - * Operation getAccountWithHttpInfo + * Operation exportLoyaltyBalancesWithHttpInfo * - * Get account details + * Export customer loyalty balances * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Account, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getAccountWithHttpInfo($accountId) + public function exportLoyaltyBalancesWithHttpInfo($loyaltyProgramId, $endDate = null) { - $request = $this->getAccountRequest($accountId); + $request = $this->exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate); try { $options = $this->createHttpClientOption(); @@ -9407,20 +9322,44 @@ public function getAccountWithHttpInfo($accountId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Account' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Account', []), + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Account'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -9439,7 +9378,23 @@ public function getAccountWithHttpInfo($accountId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Account', + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9450,18 +9405,19 @@ public function getAccountWithHttpInfo($accountId) } /** - * Operation getAccountAsync + * Operation exportLoyaltyBalancesAsync * - * Get account details + * Export customer loyalty balances * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAsync($accountId) + public function exportLoyaltyBalancesAsync($loyaltyProgramId, $endDate = null) { - return $this->getAccountAsyncWithHttpInfo($accountId) + return $this->exportLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate) ->then( function ($response) { return $response[0]; @@ -9470,19 +9426,20 @@ function ($response) { } /** - * Operation getAccountAsyncWithHttpInfo + * Operation exportLoyaltyBalancesAsyncWithHttpInfo * - * Get account details + * Export customer loyalty balances * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAsyncWithHttpInfo($accountId) + public function exportLoyaltyBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) { - $returnType = '\TalonOne\Client\Model\Account'; - $request = $this->getAccountRequest($accountId); + $returnType = 'string'; + $request = $this->exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9519,36 +9476,44 @@ function ($exception) { } /** - * Create request for operation 'getAccount' + * Create request for operation 'exportLoyaltyBalances' * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccountRequest($accountId) + protected function exportLoyaltyBalancesRequest($loyaltyProgramId, $endDate = null) { - // verify the required parameter 'accountId' is set - if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $accountId when calling getAccount' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyBalances' ); } - $resourcePath = '/v1/accounts/{accountId}'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } // path params - if ($accountId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'accountId' . '}', - ObjectSerializer::toPathValue($accountId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -9558,11 +9523,11 @@ protected function getAccountRequest($accountId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -9596,6 +9561,11 @@ protected function getAccountRequest($accountId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -9623,36 +9593,38 @@ protected function getAccountRequest($accountId) } /** - * Operation getAccountAnalytics + * Operation exportLoyaltyCardBalances * - * Get account analytics + * Export all card transaction logs * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\AccountAnalytics + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getAccountAnalytics($accountId) + public function exportLoyaltyCardBalances($loyaltyProgramId, $endDate = null) { - list($response) = $this->getAccountAnalyticsWithHttpInfo($accountId); + list($response) = $this->exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDate); return $response; } /** - * Operation getAccountAnalyticsWithHttpInfo + * Operation exportLoyaltyCardBalancesWithHttpInfo * - * Get account analytics + * Export all card transaction logs * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\AccountAnalytics, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getAccountAnalyticsWithHttpInfo($accountId) + public function exportLoyaltyCardBalancesWithHttpInfo($loyaltyProgramId, $endDate = null) { - $request = $this->getAccountAnalyticsRequest($accountId); + $request = $this->exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate); try { $options = $this->createHttpClientOption(); @@ -9685,20 +9657,44 @@ public function getAccountAnalyticsWithHttpInfo($accountId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\AccountAnalytics' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAnalytics', []), + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\AccountAnalytics'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -9717,7 +9713,23 @@ public function getAccountAnalyticsWithHttpInfo($accountId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\AccountAnalytics', + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -9728,18 +9740,19 @@ public function getAccountAnalyticsWithHttpInfo($accountId) } /** - * Operation getAccountAnalyticsAsync + * Operation exportLoyaltyCardBalancesAsync * - * Get account analytics + * Export all card transaction logs * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAnalyticsAsync($accountId) + public function exportLoyaltyCardBalancesAsync($loyaltyProgramId, $endDate = null) { - return $this->getAccountAnalyticsAsyncWithHttpInfo($accountId) + return $this->exportLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate) ->then( function ($response) { return $response[0]; @@ -9748,19 +9761,20 @@ function ($response) { } /** - * Operation getAccountAnalyticsAsyncWithHttpInfo + * Operation exportLoyaltyCardBalancesAsyncWithHttpInfo * - * Get account analytics + * Export all card transaction logs * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountAnalyticsAsyncWithHttpInfo($accountId) + public function exportLoyaltyCardBalancesAsyncWithHttpInfo($loyaltyProgramId, $endDate = null) { - $returnType = '\TalonOne\Client\Model\AccountAnalytics'; - $request = $this->getAccountAnalyticsRequest($accountId); + $returnType = 'string'; + $request = $this->exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -9797,36 +9811,44 @@ function ($exception) { } /** - * Create request for operation 'getAccountAnalytics' + * Create request for operation 'exportLoyaltyCardBalances' * - * @param int $accountId The identifier of the account. Retrieve it via the [List users in account endpoint](https://docs.talon.one/management-api#operation/getUsers), in the `accountId` property. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \DateTime $endDate Used to return balances only for entries older than this timestamp. The expired, active, and pending points are relative to this timestamp. **Note:** It must be an RFC3339 timestamp string. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccountAnalyticsRequest($accountId) + protected function exportLoyaltyCardBalancesRequest($loyaltyProgramId, $endDate = null) { - // verify the required parameter 'accountId' is set - if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $accountId when calling getAccountAnalytics' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyCardBalances' ); } - $resourcePath = '/v1/accounts/{accountId}/analytics'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } // path params - if ($accountId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'accountId' . '}', - ObjectSerializer::toPathValue($accountId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -9836,11 +9858,11 @@ protected function getAccountAnalyticsRequest($accountId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -9874,6 +9896,11 @@ protected function getAccountAnalyticsRequest($accountId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -9901,36 +9928,44 @@ protected function getAccountAnalyticsRequest($accountId) } /** - * Operation getAccountCollection + * Operation exportLoyaltyCardLedger * - * Get account-level collection + * Export card's ledger log * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getAccountCollection($collectionId) + public function exportLoyaltyCardLedger($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - list($response) = $this->getAccountCollectionWithHttpInfo($collectionId); + list($response) = $this->exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); return $response; } /** - * Operation getAccountCollectionWithHttpInfo + * Operation exportLoyaltyCardLedgerWithHttpInfo * - * Get account-level collection + * Export card's ledger log * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of string|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getAccountCollectionWithHttpInfo($collectionId) + public function exportLoyaltyCardLedgerWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - $request = $this->getAccountCollectionRequest($collectionId); + $request = $this->exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -9963,14 +9998,26 @@ public function getAccountCollectionWithHttpInfo($collectionId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + ObjectSerializer::deserialize($content, 'string', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; @@ -9988,7 +10035,7 @@ public function getAccountCollectionWithHttpInfo($collectionId) ]; } - $returnType = '\TalonOne\Client\Model\Collection'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -10007,7 +10054,15 @@ public function getAccountCollectionWithHttpInfo($collectionId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', + 'string', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10026,18 +10081,22 @@ public function getAccountCollectionWithHttpInfo($collectionId) } /** - * Operation getAccountCollectionAsync + * Operation exportLoyaltyCardLedgerAsync * - * Get account-level collection + * Export card's ledger log * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountCollectionAsync($collectionId) + public function exportLoyaltyCardLedgerAsync($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - return $this->getAccountCollectionAsyncWithHttpInfo($collectionId) + return $this->exportLoyaltyCardLedgerAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat) ->then( function ($response) { return $response[0]; @@ -10046,19 +10105,23 @@ function ($response) { } /** - * Operation getAccountCollectionAsyncWithHttpInfo + * Operation exportLoyaltyCardLedgerAsyncWithHttpInfo * - * Get account-level collection + * Export card's ledger log * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAccountCollectionAsyncWithHttpInfo($collectionId) + public function exportLoyaltyCardLedgerAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->getAccountCollectionRequest($collectionId); + $returnType = 'string'; + $request = $this->exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10095,36 +10158,91 @@ function ($exception) { } /** - * Create request for operation 'getAccountCollection' + * Create request for operation 'exportLoyaltyCardLedger' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAccountCollectionRequest($collectionId) + protected function exportLoyaltyCardLedgerRequest($loyaltyProgramId, $loyaltyCardId, $rangeStart, $rangeEnd, $dateFormat = null) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling getAccountCollection' + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyCardLedger' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling exportLoyaltyCardLedger' ); } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.exportLoyaltyCardLedger, must be smaller than or equal to 108.'); + } - $resourcePath = '/v1/collections/{collectionId}'; + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeStart when calling exportLoyaltyCardLedger' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling exportLoyaltyCardLedger' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/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 ($collectionId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -10134,11 +10252,11 @@ protected function getAccountCollectionRequest($collectionId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -10172,6 +10290,11 @@ protected function getAccountCollectionRequest($collectionId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -10199,36 +10322,44 @@ protected function getAccountCollectionRequest($collectionId) } /** - * Operation getAdditionalCost + * Operation exportLoyaltyLedger * - * Get additional cost + * Export customer's transaction logs * - * @param int $additionalCostId additionalCostId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\AccountAdditionalCost + * @return string */ - public function getAdditionalCost($additionalCostId) + public function exportLoyaltyLedger($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - list($response) = $this->getAdditionalCostWithHttpInfo($additionalCostId); + list($response) = $this->exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); return $response; } /** - * Operation getAdditionalCostWithHttpInfo + * Operation exportLoyaltyLedgerWithHttpInfo * - * Get additional cost + * Export customer's transaction logs * - * @param int $additionalCostId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\AccountAdditionalCost, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function getAdditionalCostWithHttpInfo($additionalCostId) + public function exportLoyaltyLedgerWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - $request = $this->getAdditionalCostRequest($additionalCostId); + $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -10261,20 +10392,20 @@ public function getAdditionalCostWithHttpInfo($additionalCostId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\AccountAdditionalCost' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAdditionalCost', []), + ObjectSerializer::deserialize($content, 'string', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -10293,7 +10424,7 @@ public function getAdditionalCostWithHttpInfo($additionalCostId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\AccountAdditionalCost', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10304,18 +10435,22 @@ public function getAdditionalCostWithHttpInfo($additionalCostId) } /** - * Operation getAdditionalCostAsync + * Operation exportLoyaltyLedgerAsync * - * Get additional cost + * Export customer's transaction logs * - * @param int $additionalCostId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostAsync($additionalCostId) + public function exportLoyaltyLedgerAsync($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - return $this->getAdditionalCostAsyncWithHttpInfo($additionalCostId) + return $this->exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat) ->then( function ($response) { return $response[0]; @@ -10324,19 +10459,23 @@ function ($response) { } /** - * Operation getAdditionalCostAsyncWithHttpInfo + * Operation exportLoyaltyLedgerAsyncWithHttpInfo * - * Get additional cost + * Export customer's transaction logs * - * @param int $additionalCostId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostAsyncWithHttpInfo($additionalCostId) + public function exportLoyaltyLedgerAsyncWithHttpInfo($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; - $request = $this->getAdditionalCostRequest($additionalCostId); + $returnType = 'string'; + $request = $this->exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10373,36 +10512,87 @@ function ($exception) { } /** - * Create request for operation 'getAdditionalCost' + * Create request for operation 'exportLoyaltyLedger' * - * @param int $additionalCostId (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAdditionalCostRequest($additionalCostId) + protected function exportLoyaltyLedgerRequest($rangeStart, $rangeEnd, $loyaltyProgramId, $integrationId, $dateFormat = null) { - // verify the required parameter 'additionalCostId' is set - if ($additionalCostId === null || (is_array($additionalCostId) && count($additionalCostId) === 0)) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $additionalCostId when calling getAdditionalCost' + 'Missing the required parameter $rangeStart when calling exportLoyaltyLedger' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling exportLoyaltyLedger' + ); + } + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling exportLoyaltyLedger' + ); + } + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $integrationId when calling exportLoyaltyLedger' ); } - $resourcePath = '/v1/additional_costs/{additionalCostId}'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/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 ($additionalCostId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'additionalCostId' . '}', - ObjectSerializer::toPathValue($additionalCostId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), $resourcePath ); } @@ -10412,11 +10602,11 @@ protected function getAdditionalCostRequest($additionalCostId) if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -10450,6 +10640,11 @@ protected function getAdditionalCostRequest($additionalCostId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -10477,40 +10672,50 @@ protected function getAdditionalCostRequest($additionalCostId) } /** - * Operation getAdditionalCosts + * Operation exportReferrals * - * List additional costs + * Export referrals * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20026 + * @return string */ - public function getAdditionalCosts($pageSize = null, $skip = null, $sort = null) + public function exportReferrals($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - list($response) = $this->getAdditionalCostsWithHttpInfo($pageSize, $skip, $sort); + list($response) = $this->exportReferralsWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); return $response; } /** - * Operation getAdditionalCostsWithHttpInfo + * Operation exportReferralsWithHttpInfo * - * List additional costs + * Export referrals * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20026, HTTP status code, HTTP response headers (array of strings) + * @return array of string, HTTP status code, HTTP response headers (array of strings) */ - public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $sort = null) + public function exportReferralsWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); + $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); try { $options = $this->createHttpClientOption(); @@ -10543,20 +10748,20 @@ public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20026' === '\SplFileObject') { + if ('string' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20026', []), + ObjectSerializer::deserialize($content, 'string', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $returnType = 'string'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -10575,7 +10780,7 @@ public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20026', + 'string', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10586,20 +10791,25 @@ public function getAdditionalCostsWithHttpInfo($pageSize = null, $skip = null, $ } /** - * Operation getAdditionalCostsAsync + * Operation exportReferralsAsync * - * List additional costs + * Export referrals * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostsAsync($pageSize = null, $skip = null, $sort = null) + public function exportReferralsAsync($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - return $this->getAdditionalCostsAsyncWithHttpInfo($pageSize, $skip, $sort) + return $this->exportReferralsAsyncWithHttpInfo($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat) ->then( function ($response) { return $response[0]; @@ -10608,21 +10818,26 @@ function ($response) { } /** - * Operation getAdditionalCostsAsyncWithHttpInfo + * Operation exportReferralsAsyncWithHttpInfo * - * List additional costs + * Export referrals * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAdditionalCostsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null) + public function exportReferralsAsyncWithHttpInfo($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20026'; - $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); + $returnType = 'string'; + $request = $this->exportReferralsRequest($applicationId, $campaignId, $createdBefore, $createdAfter, $valid, $usable, $batchId, $dateFormat); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10659,26 +10874,30 @@ function ($exception) { } /** - * Create request for operation 'getAdditionalCosts' + * Create request for operation 'exportReferrals' * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid - `expired`: Matches referrals in which the expiration date is set and in the past. - `validNow`: Matches referrals in which start date is null or in the past and expiration date is null or in the future. - `validFuture`: Matches referrals in which start date is set and in the future. (optional) + * @param string $usable - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. (optional) + * @param string $batchId Filter results by batches of referrals (optional) + * @param string $dateFormat Determines the format of dates in the export document. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAdditionalCostsRequest($pageSize = null, $skip = null, $sort = null) + protected function exportReferralsRequest($applicationId, $campaignId = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $batchId = null, $dateFormat = null) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be bigger than or equal to 1.'); + // 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 exportReferrals' + ); } - - $resourcePath = '/v1/additional_costs'; + $resourcePath = '/v1/applications/{applicationId}/export_referrals'; $formParams = []; $queryParams = []; $headerParams = []; @@ -10686,39 +10905,75 @@ protected function getAdditionalCostsRequest($pageSize = null, $skip = null, $so $multipart = false; // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; } // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); } - if ($skip !== null) { - $queryParams['skip'] = $skip; + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($valid)) { + $valid = ObjectSerializer::serializeCollection($valid, '', true); + } + if ($valid !== null) { + $queryParams['valid'] = $valid; + } + // query params + if (is_array($usable)) { + $usable = ObjectSerializer::serializeCollection($usable, '', true); + } + if ($usable !== null) { + $queryParams['usable'] = $usable; + } + // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + // query params + if (is_array($dateFormat)) { + $dateFormat = ObjectSerializer::serializeCollection($dateFormat, '', true); + } + if ($dateFormat !== null) { + $queryParams['dateFormat'] = $dateFormat; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + ['application/csv'] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + ['application/csv'], [] ); } @@ -10752,6 +11007,11 @@ protected function getAdditionalCostsRequest($pageSize = null, $skip = null, $so } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -10779,50 +11039,52 @@ protected function getAdditionalCostsRequest($pageSize = null, $skip = null, $so } /** - * Operation getAllAccessLogs + * Operation getAccessLogsWithoutTotalCount * - * List access logs + * Get access logs for Application * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param string $path Only return results where the request path matches the given regular expression. (optional) * @param string $method Only return results where the request method matches the given regular expression. (optional) * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20014 + * @return \TalonOne\Client\Model\InlineResponse20018 */ - public function getAllAccessLogs($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function getAccessLogsWithoutTotalCount($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + list($response) = $this->getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $response; } /** - * Operation getAllAccessLogsWithHttpInfo + * Operation getAccessLogsWithoutTotalCountWithHttpInfo * - * List access logs + * Get access logs for Application * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param string $path Only return results where the request path matches the given regular expression. (optional) * @param string $method Only return results where the request method matches the given regular expression. (optional) * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20014, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20018, HTTP status code, HTTP response headers (array of strings) */ - public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function getAccessLogsWithoutTotalCountWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -10855,20 +11117,20 @@ public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20014' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20018' === '\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\InlineResponse20018', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20014'; + $returnType = '\TalonOne\Client\Model\InlineResponse20018'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -10887,7 +11149,7 @@ public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20014', + '\TalonOne\Client\Model\InlineResponse20018', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -10898,25 +11160,26 @@ public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = nul } /** - * Operation getAllAccessLogsAsync + * Operation getAccessLogsWithoutTotalCountAsync * - * List access logs + * Get access logs for Application * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param string $path Only return results where the request path matches the given regular expression. (optional) * @param string $method Only return results where the request method matches the given regular expression. (optional) * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAccessLogsAsync($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function getAccessLogsWithoutTotalCountAsync($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) + return $this->getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -10925,26 +11188,27 @@ function ($response) { } /** - * Operation getAllAccessLogsAsyncWithHttpInfo + * Operation getAccessLogsWithoutTotalCountAsyncWithHttpInfo * - * List access logs + * Get access logs for Application * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param string $path Only return results where the request path matches the given regular expression. (optional) * @param string $method Only return results where the request method matches the given regular expression. (optional) * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + public function getAccessLogsWithoutTotalCountAsyncWithHttpInfo($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20014'; - $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20018'; + $request = $this->getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -10981,63 +11245,56 @@ function ($exception) { } /** - * Create request for operation 'getAllAccessLogs' + * Create request for operation 'getAccessLogsWithoutTotalCount' * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) * @param string $path Only return results where the request path matches the given regular expression. (optional) * @param string $method Only return results where the request method matches the given regular expression. (optional) * @param string $status Filter results by HTTP status codes. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = null, $skip = null, $sort = null) + protected function getAccessLogsWithoutTotalCountRequest($applicationId, $rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getAccessLogsWithoutTotalCount' + ); + } // verify the required parameter 'rangeStart' is set if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getAllAccessLogs' + 'Missing the required parameter $rangeStart when calling getAccessLogsWithoutTotalCount' ); } // verify the required parameter 'rangeEnd' is set if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getAllAccessLogs' + 'Missing the required parameter $rangeEnd when calling getAccessLogsWithoutTotalCount' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAccessLogsWithoutTotalCount, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/access_logs'; + $resourcePath = '/v1/applications/{applicationId}/access_logs/no_total'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); - } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; - } - // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); - } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; - } // query params if (is_array($path)) { $path = ObjectSerializer::serializeCollection($path, '', true); @@ -11060,6 +11317,20 @@ protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, $queryParams['status'] = $status; } // query params + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + } + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; + } + // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); } @@ -11082,6 +11353,14 @@ protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -11126,6 +11405,11 @@ protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -11153,34 +11437,36 @@ protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, } /** - * Operation getAllRoles + * Operation getAccount * - * List roles + * Get account details * + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20034 + * @return \TalonOne\Client\Model\Account */ - public function getAllRoles() + public function getAccount($accountId) { - list($response) = $this->getAllRolesWithHttpInfo(); + list($response) = $this->getAccountWithHttpInfo($accountId); return $response; } /** - * Operation getAllRolesWithHttpInfo + * Operation getAccountWithHttpInfo * - * List roles + * Get account details * + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20034, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Account, HTTP status code, HTTP response headers (array of strings) */ - public function getAllRolesWithHttpInfo() + public function getAccountWithHttpInfo($accountId) { - $request = $this->getAllRolesRequest(); + $request = $this->getAccountRequest($accountId); try { $options = $this->createHttpClientOption(); @@ -11213,20 +11499,20 @@ public function getAllRolesWithHttpInfo() $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20034' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Account' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20034', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Account', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20034'; + $returnType = '\TalonOne\Client\Model\Account'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11245,7 +11531,7 @@ public function getAllRolesWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20034', + '\TalonOne\Client\Model\Account', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11256,17 +11542,18 @@ public function getAllRolesWithHttpInfo() } /** - * Operation getAllRolesAsync + * Operation getAccountAsync * - * List roles + * Get account details * + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllRolesAsync() + public function getAccountAsync($accountId) { - return $this->getAllRolesAsyncWithHttpInfo() + return $this->getAccountAsyncWithHttpInfo($accountId) ->then( function ($response) { return $response[0]; @@ -11275,18 +11562,19 @@ function ($response) { } /** - * Operation getAllRolesAsyncWithHttpInfo + * Operation getAccountAsyncWithHttpInfo * - * List roles + * Get account details * + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllRolesAsyncWithHttpInfo() + public function getAccountAsyncWithHttpInfo($accountId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20034'; - $request = $this->getAllRolesRequest(); + $returnType = '\TalonOne\Client\Model\Account'; + $request = $this->getAccountRequest($accountId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11323,16 +11611,23 @@ function ($exception) { } /** - * Create request for operation 'getAllRoles' + * Create request for operation 'getAccount' * + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAllRolesRequest() + protected function getAccountRequest($accountId) { + // verify the required parameter 'accountId' is set + if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $accountId when calling getAccount' + ); + } - $resourcePath = '/v1/roles'; + $resourcePath = '/v1/accounts/{accountId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11341,6 +11636,14 @@ protected function getAllRolesRequest() + // path params + if ($accountId !== null) { + $resourcePath = str_replace( + '{' . 'accountId' . '}', + ObjectSerializer::toPathValue($accountId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -11385,6 +11688,11 @@ protected function getAllRolesRequest() } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -11412,36 +11720,36 @@ protected function getAllRolesRequest() } /** - * Operation getApplication + * Operation getAccountAnalytics * - * Get application + * Get account analytics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Application + * @return \TalonOne\Client\Model\AccountAnalytics */ - public function getApplication($applicationId) + public function getAccountAnalytics($accountId) { - list($response) = $this->getApplicationWithHttpInfo($applicationId); + list($response) = $this->getAccountAnalyticsWithHttpInfo($accountId); return $response; } /** - * Operation getApplicationWithHttpInfo + * Operation getAccountAnalyticsWithHttpInfo * - * Get application + * Get account analytics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Application, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\AccountAnalytics, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationWithHttpInfo($applicationId) + public function getAccountAnalyticsWithHttpInfo($accountId) { - $request = $this->getApplicationRequest($applicationId); + $request = $this->getAccountAnalyticsRequest($accountId); try { $options = $this->createHttpClientOption(); @@ -11474,20 +11782,20 @@ public function getApplicationWithHttpInfo($applicationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Application' === '\SplFileObject') { + if ('\TalonOne\Client\Model\AccountAnalytics' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Application', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAnalytics', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Application'; + $returnType = '\TalonOne\Client\Model\AccountAnalytics'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11506,7 +11814,7 @@ public function getApplicationWithHttpInfo($applicationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Application', + '\TalonOne\Client\Model\AccountAnalytics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11517,18 +11825,18 @@ public function getApplicationWithHttpInfo($applicationId) } /** - * Operation getApplicationAsync + * Operation getAccountAnalyticsAsync * - * Get application + * Get account analytics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationAsync($applicationId) + public function getAccountAnalyticsAsync($accountId) { - return $this->getApplicationAsyncWithHttpInfo($applicationId) + return $this->getAccountAnalyticsAsyncWithHttpInfo($accountId) ->then( function ($response) { return $response[0]; @@ -11537,19 +11845,19 @@ function ($response) { } /** - * Operation getApplicationAsyncWithHttpInfo + * Operation getAccountAnalyticsAsyncWithHttpInfo * - * Get application + * Get account analytics * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationAsyncWithHttpInfo($applicationId) + public function getAccountAnalyticsAsyncWithHttpInfo($accountId) { - $returnType = '\TalonOne\Client\Model\Application'; - $request = $this->getApplicationRequest($applicationId); + $returnType = '\TalonOne\Client\Model\AccountAnalytics'; + $request = $this->getAccountAnalyticsRequest($accountId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11586,23 +11894,23 @@ function ($exception) { } /** - * Create request for operation 'getApplication' + * Create request for operation 'getAccountAnalytics' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $accountId The identifier of the account. Retrieve it via the [List users in account](https://docs.talon.one/management-api#operation/getUsers) endpoint in the `accountId` property. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationRequest($applicationId) + protected function getAccountAnalyticsRequest($accountId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'accountId' is set + if ($accountId === null || (is_array($accountId) && count($accountId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplication' + 'Missing the required parameter $accountId when calling getAccountAnalytics' ); } - $resourcePath = '/v1/applications/{applicationId}'; + $resourcePath = '/v1/accounts/{accountId}/analytics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11612,10 +11920,10 @@ protected function getApplicationRequest($applicationId) // path params - if ($applicationId !== null) { + if ($accountId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'accountId' . '}', + ObjectSerializer::toPathValue($accountId), $resourcePath ); } @@ -11663,6 +11971,11 @@ protected function getApplicationRequest($applicationId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -11690,36 +12003,36 @@ protected function getApplicationRequest($applicationId) } /** - * Operation getApplicationApiHealth + * Operation getAccountCollection * - * Get report of health of application API + * Get account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationApiHealth + * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getApplicationApiHealth($applicationId) + public function getAccountCollection($collectionId) { - list($response) = $this->getApplicationApiHealthWithHttpInfo($applicationId); + list($response) = $this->getAccountCollectionWithHttpInfo($collectionId); return $response; } /** - * Operation getApplicationApiHealthWithHttpInfo + * Operation getAccountCollectionWithHttpInfo * - * Get report of health of application API + * Get account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ApplicationApiHealth, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationApiHealthWithHttpInfo($applicationId) + public function getAccountCollectionWithHttpInfo($collectionId) { - $request = $this->getApplicationApiHealthRequest($applicationId); + $request = $this->getAccountCollectionRequest($collectionId); try { $options = $this->createHttpClientOption(); @@ -11752,20 +12065,32 @@ public function getApplicationApiHealthWithHttpInfo($applicationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationApiHealth' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationApiHealth', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; + $returnType = '\TalonOne\Client\Model\Collection'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -11784,7 +12109,15 @@ public function getApplicationApiHealthWithHttpInfo($applicationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationApiHealth', + '\TalonOne\Client\Model\Collection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -11795,18 +12128,18 @@ public function getApplicationApiHealthWithHttpInfo($applicationId) } /** - * Operation getApplicationApiHealthAsync + * Operation getAccountCollectionAsync * - * Get report of health of application API + * Get account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationApiHealthAsync($applicationId) + public function getAccountCollectionAsync($collectionId) { - return $this->getApplicationApiHealthAsyncWithHttpInfo($applicationId) + return $this->getAccountCollectionAsyncWithHttpInfo($collectionId) ->then( function ($response) { return $response[0]; @@ -11815,19 +12148,19 @@ function ($response) { } /** - * Operation getApplicationApiHealthAsyncWithHttpInfo + * Operation getAccountCollectionAsyncWithHttpInfo * - * Get report of health of application API + * Get account-level collection * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationApiHealthAsyncWithHttpInfo($applicationId) + public function getAccountCollectionAsyncWithHttpInfo($collectionId) { - $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; - $request = $this->getApplicationApiHealthRequest($applicationId); + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->getAccountCollectionRequest($collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -11864,23 +12197,23 @@ function ($exception) { } /** - * Create request for operation 'getApplicationApiHealth' + * Create request for operation 'getAccountCollection' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationApiHealthRequest($applicationId) + protected function getAccountCollectionRequest($collectionId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationApiHealth' + 'Missing the required parameter $collectionId when calling getAccountCollection' ); } - $resourcePath = '/v1/applications/{applicationId}/health_report'; + $resourcePath = '/v1/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -11890,10 +12223,10 @@ protected function getApplicationApiHealthRequest($applicationId) // path params - if ($applicationId !== null) { + if ($collectionId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), $resourcePath ); } @@ -11941,6 +12274,11 @@ protected function getApplicationApiHealthRequest($applicationId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -11968,38 +12306,36 @@ protected function getApplicationApiHealthRequest($applicationId) } /** - * Operation getApplicationCustomer + * Operation getAdditionalCost * - * Get application's customer + * Get additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationCustomer + * @return \TalonOne\Client\Model\AccountAdditionalCost */ - public function getApplicationCustomer($applicationId, $customerId) + public function getAdditionalCost($additionalCostId) { - list($response) = $this->getApplicationCustomerWithHttpInfo($applicationId, $customerId); + list($response) = $this->getAdditionalCostWithHttpInfo($additionalCostId); return $response; } /** - * Operation getApplicationCustomerWithHttpInfo + * Operation getAdditionalCostWithHttpInfo * - * Get application's customer + * Get additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ApplicationCustomer, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\AccountAdditionalCost, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) + public function getAdditionalCostWithHttpInfo($additionalCostId) { - $request = $this->getApplicationCustomerRequest($applicationId, $customerId); + $request = $this->getAdditionalCostRequest($additionalCostId); try { $options = $this->createHttpClientOption(); @@ -12032,20 +12368,20 @@ public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationCustomer' === '\SplFileObject') { + if ('\TalonOne\Client\Model\AccountAdditionalCost' === '\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\AccountAdditionalCost', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; + $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12064,7 +12400,7 @@ public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationCustomer', + '\TalonOne\Client\Model\AccountAdditionalCost', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12075,19 +12411,18 @@ public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) } /** - * Operation getApplicationCustomerAsync + * Operation getAdditionalCostAsync * - * Get application's customer + * Get additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerAsync($applicationId, $customerId) + public function getAdditionalCostAsync($additionalCostId) { - return $this->getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) + return $this->getAdditionalCostAsyncWithHttpInfo($additionalCostId) ->then( function ($response) { return $response[0]; @@ -12096,20 +12431,19 @@ function ($response) { } /** - * Operation getApplicationCustomerAsyncWithHttpInfo + * Operation getAdditionalCostAsyncWithHttpInfo * - * Get application's customer + * Get additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) + public function getAdditionalCostAsyncWithHttpInfo($additionalCostId) { - $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; - $request = $this->getApplicationCustomerRequest($applicationId, $customerId); + $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; + $request = $this->getAdditionalCostRequest($additionalCostId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12146,30 +12480,23 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomer' + * Create request for operation 'getAdditionalCost' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomerRequest($applicationId, $customerId) + protected function getAdditionalCostRequest($additionalCostId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomer' - ); - } - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + // verify the required parameter 'additionalCostId' is set + if ($additionalCostId === null || (is_array($additionalCostId) && count($additionalCostId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getApplicationCustomer' + 'Missing the required parameter $additionalCostId when calling getAdditionalCost' ); } - $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}'; + $resourcePath = '/v1/additional_costs/{additionalCostId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12179,18 +12506,10 @@ protected function getApplicationCustomerRequest($applicationId, $customerId) // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($customerId !== null) { + if ($additionalCostId !== null) { $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), + '{' . 'additionalCostId' . '}', + ObjectSerializer::toPathValue($additionalCostId), $resourcePath ); } @@ -12238,6 +12557,11 @@ protected function getApplicationCustomerRequest($applicationId, $customerId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -12265,46 +12589,40 @@ protected function getApplicationCustomerRequest($applicationId, $customerId) } /** - * Operation getApplicationCustomerFriends + * Operation getAdditionalCosts * - * List friends referred by customer profile + * List additional costs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20024 + * @return \TalonOne\Client\Model\InlineResponse20032 */ - public function getApplicationCustomerFriends($applicationId, $integrationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAdditionalCosts($pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); + list($response) = $this->getAdditionalCostsWithHttpInfo($pageSize, $skip, $sort); return $response; } /** - * Operation getApplicationCustomerFriendsWithHttpInfo + * Operation getAdditionalCostsWithHttpInfo * - * List friends referred by customer profile + * List additional costs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20024, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20032, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAdditionalCostsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); + $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -12337,20 +12655,20 @@ public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integ $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20024' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20032' === '\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\InlineResponse20032', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20024'; + $returnType = '\TalonOne\Client\Model\InlineResponse20032'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12369,7 +12687,7 @@ public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20024', + '\TalonOne\Client\Model\InlineResponse20032', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12380,23 +12698,20 @@ public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integ } /** - * Operation getApplicationCustomerFriendsAsync + * Operation getAdditionalCostsAsync * - * List friends referred by customer profile + * List additional costs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerFriendsAsync($applicationId, $integrationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAdditionalCostsAsync($pageSize = 1000, $skip = null, $sort = null) { - return $this->getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) + return $this->getAdditionalCostsAsyncWithHttpInfo($pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -12405,24 +12720,21 @@ function ($response) { } /** - * Operation getApplicationCustomerFriendsAsyncWithHttpInfo + * Operation getAdditionalCostsAsyncWithHttpInfo * - * List friends referred by customer profile + * List additional costs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getAdditionalCostsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20024'; - $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\InlineResponse20032'; + $request = $this->getAdditionalCostsRequest($pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12459,41 +12771,26 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomerFriends' + * Create request for operation 'getAdditionalCosts' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId The Integration ID of the Advocate's Profile. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + protected function getAdditionalCostsRequest($pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomerFriends' - ); - } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling getApplicationCustomerFriends' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAdditionalCosts, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/profile/{integrationId}/friends'; + $resourcePath = '/v1/additional_costs'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12521,31 +12818,8 @@ protected function getApplicationCustomerFriendsRequest($applicationId, $integra if ($sort !== null) { $queryParams['sort'] = $sort; } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($integrationId !== null) { - $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -12590,6 +12864,11 @@ protected function getApplicationCustomerFriendsRequest($applicationId, $integra } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -12617,44 +12896,50 @@ protected function getApplicationCustomerFriendsRequest($applicationId, $integra } /** - * Operation getApplicationCustomers + * Operation getAllAccessLogs * - * List application's customers + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20016 + * @return \TalonOne\Client\Model\InlineResponse20019 */ - public function getApplicationCustomers($applicationId, $integrationId = null, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllAccessLogs($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getApplicationCustomersWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); + list($response) = $this->getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $response; } /** - * Operation getApplicationCustomersWithHttpInfo + * Operation getAllAccessLogsWithHttpInfo * - * List application's customers + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20016, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20019, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomersWithHttpInfo($applicationId, $integrationId = null, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllAccessLogsWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); + $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -12687,20 +12972,20 @@ public function getApplicationCustomersWithHttpInfo($applicationId, $integration $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20016' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20019' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20016', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20019', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20016'; + $returnType = '\TalonOne\Client\Model\InlineResponse20019'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -12719,7 +13004,7 @@ public function getApplicationCustomersWithHttpInfo($applicationId, $integration case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20016', + '\TalonOne\Client\Model\InlineResponse20019', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -12730,22 +13015,25 @@ public function getApplicationCustomersWithHttpInfo($applicationId, $integration } /** - * Operation getApplicationCustomersAsync + * Operation getAllAccessLogsAsync * - * List application's customers + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersAsync($applicationId, $integrationId = null, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllAccessLogsAsync($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) + return $this->getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -12754,23 +13042,26 @@ function ($response) { } /** - * Operation getApplicationCustomersAsyncWithHttpInfo + * Operation getAllAccessLogsAsyncWithHttpInfo * - * List application's customers + * List access logs * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId = null, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllAccessLogsAsyncWithHttpInfo($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20016'; - $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\InlineResponse20019'; + $request = $this->getAllAccessLogsRequest($rangeStart, $rangeEnd, $path, $method, $status, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -12807,34 +13098,43 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomers' + * Create request for operation 'getAllAccessLogs' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $path Only return results where the request path matches the given regular expression. (optional) + * @param string $method Only return results where the request method matches the given regular expression. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomersRequest($applicationId, $integrationId = null, $pageSize = null, $skip = null, $withTotalResultSize = null) + protected function getAllAccessLogsRequest($rangeStart, $rangeEnd, $path = null, $method = null, $status = null, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomers' + 'Missing the required parameter $rangeStart when calling getAllAccessLogs' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getAllAccessLogs' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAllAccessLogs, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customers'; + $resourcePath = '/v1/access_logs'; $formParams = []; $queryParams = []; $headerParams = []; @@ -12842,11 +13142,39 @@ protected function getApplicationCustomersRequest($applicationId, $integrationId $multipart = false; // query params - if (is_array($integrationId)) { - $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($integrationId !== null) { - $queryParams['integrationId'] = $integrationId; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; + } + // query params + if (is_array($path)) { + $path = ObjectSerializer::serializeCollection($path, '', true); + } + if ($path !== null) { + $queryParams['path'] = $path; + } + // query params + if (is_array($method)) { + $method = ObjectSerializer::serializeCollection($method, '', true); + } + if ($method !== null) { + $queryParams['method'] = $method; + } + // query params + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, '', true); + } + if ($status !== null) { + $queryParams['status'] = $status; } // query params if (is_array($pageSize)) { @@ -12863,22 +13191,14 @@ protected function getApplicationCustomersRequest($applicationId, $integrationId $queryParams['skip'] = $skip; } // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; + if ($sort !== null) { + $queryParams['sort'] = $sort; } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -12923,6 +13243,11 @@ protected function getApplicationCustomersRequest($applicationId, $integrationId } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -12950,44 +13275,34 @@ protected function getApplicationCustomersRequest($applicationId, $integrationId } /** - * Operation getApplicationCustomersByAttributes + * Operation getAllRoles * - * List application customers matching the given attributes + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) - * @param int $pageSize The number of items 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 bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20017 + * @return \TalonOne\Client\Model\InlineResponse20040 */ - public function getApplicationCustomersByAttributes($applicationId, $body, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllRoles() { - list($response) = $this->getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize); + list($response) = $this->getAllRolesWithHttpInfo(); return $response; } /** - * Operation getApplicationCustomersByAttributesWithHttpInfo + * Operation getAllRolesWithHttpInfo * - * List application customers matching the given attributes + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20017, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20040, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllRolesWithHttpInfo() { - $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); + $request = $this->getAllRolesRequest(); try { $options = $this->createHttpClientOption(); @@ -13020,20 +13335,20 @@ public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20017' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20040' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20017', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20040', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $returnType = '\TalonOne\Client\Model\InlineResponse20040'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13052,7 +13367,7 @@ public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20017', + '\TalonOne\Client\Model\InlineResponse20040', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13063,22 +13378,17 @@ public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, } /** - * Operation getApplicationCustomersByAttributesAsync + * Operation getAllRolesAsync * - * List application customers matching the given attributes + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersByAttributesAsync($applicationId, $body, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllRolesAsync() { - return $this->getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize) + return $this->getAllRolesAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -13087,23 +13397,18 @@ function ($response) { } /** - * Operation getApplicationCustomersByAttributesAsyncWithHttpInfo + * Operation getAllRolesAsyncWithHttpInfo * - * List application customers matching the given attributes + * List roles * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $withTotalResultSize = null) + public function getAllRolesAsyncWithHttpInfo() { - $returnType = '\TalonOne\Client\Model\InlineResponse20017'; - $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\InlineResponse20040'; + $request = $this->getAllRolesRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13140,83 +13445,27 @@ function ($exception) { } /** - * Create request for operation 'getApplicationCustomersByAttributes' + * Create request for operation 'getAllRoles' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize = null, $skip = null, $withTotalResultSize = null) + protected function getAllRolesRequest() { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationCustomersByAttributes' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling getApplicationCustomersByAttributes' - ); - } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/customer_search'; + $resourcePath = '/v1/roles'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -13225,7 +13474,7 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -13258,6 +13507,11 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -13277,7 +13531,7 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -13285,42 +13539,36 @@ protected function getApplicationCustomersByAttributesRequest($applicationId, $b } /** - * Operation getApplicationEventTypes + * Operation getApplication * - * List Applications event types + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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\InlineResponse20022 + * @return \TalonOne\Client\Model\Application */ - public function getApplicationEventTypes($applicationId, $pageSize = null, $skip = null, $sort = null) + public function getApplication($applicationId) { - list($response) = $this->getApplicationEventTypesWithHttpInfo($applicationId, $pageSize, $skip, $sort); + list($response) = $this->getApplicationWithHttpInfo($applicationId); return $response; } /** - * Operation getApplicationEventTypesWithHttpInfo + * Operation getApplicationWithHttpInfo * - * List Applications event types + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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\InlineResponse20022, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Application, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null) + public function getApplicationWithHttpInfo($applicationId) { - $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); + $request = $this->getApplicationRequest($applicationId); try { $options = $this->createHttpClientOption(); @@ -13353,20 +13601,20 @@ public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20022' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Application' === '\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\Application', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20022'; + $returnType = '\TalonOne\Client\Model\Application'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13385,7 +13633,7 @@ public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20022', + '\TalonOne\Client\Model\Application', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13396,21 +13644,18 @@ public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = } /** - * Operation getApplicationEventTypesAsync + * Operation getApplicationAsync * - * List Applications event types + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 getApplicationEventTypesAsync($applicationId, $pageSize = null, $skip = null, $sort = null) + public function getApplicationAsync($applicationId) { - return $this->getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort) + return $this->getApplicationAsyncWithHttpInfo($applicationId) ->then( function ($response) { return $response[0]; @@ -13419,22 +13664,19 @@ function ($response) { } /** - * Operation getApplicationEventTypesAsyncWithHttpInfo + * Operation getApplicationAsyncWithHttpInfo * - * List Applications event types + * Get Application * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null) + public function getApplicationAsyncWithHttpInfo($applicationId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20022'; - $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\Application'; + $request = $this->getApplicationRequest($applicationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13471,60 +13713,29 @@ function ($exception) { } /** - * Create request for operation 'getApplicationEventTypes' + * Create request for operation 'getApplication' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $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 getApplicationEventTypesRequest($applicationId, $pageSize = null, $skip = null, $sort = null) + protected function getApplicationRequest($applicationId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationEventTypes' + 'Missing the required parameter $applicationId when calling getApplication' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/event_types'; + $resourcePath = '/v1/applications/{applicationId}'; $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 @@ -13579,6 +13790,11 @@ protected function getApplicationEventTypesRequest($applicationId, $pageSize = n } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -13606,64 +13822,36 @@ protected function getApplicationEventTypesRequest($applicationId, $pageSize = n } /** - * Operation getApplicationEventsWithoutTotalCount + * Operation getApplicationApiHealth * - * List Applications events + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20021 + * @return \TalonOne\Client\Model\ApplicationApiHealth */ - public function getApplicationEventsWithoutTotalCount($applicationId, $pageSize = null, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationApiHealth($applicationId) { - list($response) = $this->getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); + list($response) = $this->getApplicationApiHealthWithHttpInfo($applicationId); return $response; } /** - * Operation getApplicationEventsWithoutTotalCountWithHttpInfo + * Operation getApplicationApiHealthWithHttpInfo * - * List Applications events + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) * * @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\ApplicationApiHealth, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationApiHealthWithHttpInfo($applicationId) { - $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); + $request = $this->getApplicationApiHealthRequest($applicationId); try { $options = $this->createHttpClientOption(); @@ -13696,20 +13884,20 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20021' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationApiHealth' === '\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\ApplicationApiHealth', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20021'; + $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -13728,7 +13916,7 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20021', + '\TalonOne\Client\Model\ApplicationApiHealth', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -13739,32 +13927,18 @@ public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId } /** - * Operation getApplicationEventsWithoutTotalCountAsync + * Operation getApplicationApiHealthAsync * - * List Applications events + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationEventsWithoutTotalCountAsync($applicationId, $pageSize = null, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationApiHealthAsync($applicationId) { - return $this->getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) + return $this->getApplicationApiHealthAsyncWithHttpInfo($applicationId) ->then( function ($response) { return $response[0]; @@ -13773,33 +13947,19 @@ function ($response) { } /** - * Operation getApplicationEventsWithoutTotalCountAsyncWithHttpInfo + * Operation getApplicationApiHealthAsyncWithHttpInfo * - * List Applications events + * Get Application health * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + public function getApplicationApiHealthAsyncWithHttpInfo($applicationId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20021'; - $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); + $returnType = '\TalonOne\Client\Model\ApplicationApiHealth'; + $request = $this->getApplicationApiHealthRequest($applicationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -13836,156 +13996,29 @@ function ($exception) { } /** - * Create request for operation 'getApplicationEventsWithoutTotalCount' + * Create request for operation 'getApplicationApiHealth' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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 $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $session Session integration ID filter for events. Must be exact match. (optional) - * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) - * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) - * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) - * @param string $couponCode Coupon code (optional) - * @param string $referralCode Referral code (optional) - * @param string $ruleQuery Rule name filter for events (optional) - * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize = null, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) + protected function getApplicationApiHealthRequest($applicationId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationEventsWithoutTotalCount' + 'Missing the required parameter $applicationId when calling getApplicationApiHealth' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 1.'); - } - - if ($customerName !== null && strlen($customerName) < 2) { - throw new \InvalidArgumentException('invalid length for "$customerName" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); - } - - if ($customerEmail !== null && strlen($customerEmail) < 2) { - throw new \InvalidArgumentException('invalid length for "$customerEmail" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); - } - - $resourcePath = '/v1/applications/{applicationId}/events/no_total'; + $resourcePath = '/v1/applications/{applicationId}/health_report'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($type)) { - $type = ObjectSerializer::serializeCollection($type, '', true); - } - if ($type !== null) { - $queryParams['type'] = $type; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($session)) { - $session = ObjectSerializer::serializeCollection($session, '', true); - } - if ($session !== null) { - $queryParams['session'] = $session; - } - // query params - if (is_array($profile)) { - $profile = ObjectSerializer::serializeCollection($profile, '', true); - } - if ($profile !== null) { - $queryParams['profile'] = $profile; - } - // query params - if (is_array($customerName)) { - $customerName = ObjectSerializer::serializeCollection($customerName, '', true); - } - if ($customerName !== null) { - $queryParams['customerName'] = $customerName; - } - // query params - if (is_array($customerEmail)) { - $customerEmail = ObjectSerializer::serializeCollection($customerEmail, '', true); - } - if ($customerEmail !== null) { - $queryParams['customerEmail'] = $customerEmail; - } - // query params - if (is_array($couponCode)) { - $couponCode = ObjectSerializer::serializeCollection($couponCode, '', true); - } - if ($couponCode !== null) { - $queryParams['couponCode'] = $couponCode; - } - // query params - if (is_array($referralCode)) { - $referralCode = ObjectSerializer::serializeCollection($referralCode, '', true); - } - if ($referralCode !== null) { - $queryParams['referralCode'] = $referralCode; - } - // query params - if (is_array($ruleQuery)) { - $ruleQuery = ObjectSerializer::serializeCollection($ruleQuery, '', true); - } - if ($ruleQuery !== null) { - $queryParams['ruleQuery'] = $ruleQuery; - } - // query params - if (is_array($campaignQuery)) { - $campaignQuery = ObjectSerializer::serializeCollection($campaignQuery, '', true); - } - if ($campaignQuery !== null) { - $queryParams['campaignQuery'] = $campaignQuery; - } // path params @@ -14040,6 +14073,11 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -14067,38 +14105,38 @@ protected function getApplicationEventsWithoutTotalCountRequest($applicationId, } /** - * Operation getApplicationSession + * Operation getApplicationCustomer * - * Get Application session + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\ApplicationSession + * @return \TalonOne\Client\Model\ApplicationCustomer */ - public function getApplicationSession($applicationId, $sessionId) + public function getApplicationCustomer($applicationId, $customerId) { - list($response) = $this->getApplicationSessionWithHttpInfo($applicationId, $sessionId); + list($response) = $this->getApplicationCustomerWithHttpInfo($applicationId, $customerId); return $response; } /** - * Operation getApplicationSessionWithHttpInfo + * Operation getApplicationCustomerWithHttpInfo * - * Get Application session + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\ApplicationSession, 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 getApplicationSessionWithHttpInfo($applicationId, $sessionId) + public function getApplicationCustomerWithHttpInfo($applicationId, $customerId) { - $request = $this->getApplicationSessionRequest($applicationId, $sessionId); + $request = $this->getApplicationCustomerRequest($applicationId, $customerId); try { $options = $this->createHttpClientOption(); @@ -14131,20 +14169,20 @@ public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\ApplicationSession' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationCustomer' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationSession', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ApplicationCustomer', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\ApplicationSession'; + $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14163,7 +14201,7 @@ public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ApplicationSession', + '\TalonOne\Client\Model\ApplicationCustomer', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14174,19 +14212,19 @@ public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) } /** - * Operation getApplicationSessionAsync + * Operation getApplicationCustomerAsync * - * Get Application session + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionAsync($applicationId, $sessionId) + public function getApplicationCustomerAsync($applicationId, $customerId) { - return $this->getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) + return $this->getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) ->then( function ($response) { return $response[0]; @@ -14195,20 +14233,20 @@ function ($response) { } /** - * Operation getApplicationSessionAsyncWithHttpInfo + * Operation getApplicationCustomerAsyncWithHttpInfo * - * Get Application session + * Get application's customer * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) + public function getApplicationCustomerAsyncWithHttpInfo($applicationId, $customerId) { - $returnType = '\TalonOne\Client\Model\ApplicationSession'; - $request = $this->getApplicationSessionRequest($applicationId, $sessionId); + $returnType = '\TalonOne\Client\Model\ApplicationCustomer'; + $request = $this->getApplicationCustomerRequest($applicationId, $customerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14245,30 +14283,30 @@ function ($exception) { } /** - * Create request for operation 'getApplicationSession' + * Create request for operation 'getApplicationCustomer' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions endpoint](/#tag/Customer-data/operation/getApplicationSession). (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationSessionRequest($applicationId, $sessionId) + protected function getApplicationCustomerRequest($applicationId, $customerId) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationSession' + 'Missing the required parameter $applicationId when calling getApplicationCustomer' ); } - // verify the required parameter 'sessionId' is set - if ($sessionId === null || (is_array($sessionId) && count($sessionId) === 0)) { + // verify the required parameter 'customerId' is set + if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $sessionId when calling getApplicationSession' + 'Missing the required parameter $customerId when calling getApplicationCustomer' ); } - $resourcePath = '/v1/applications/{applicationId}/sessions/{sessionId}'; + $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14286,10 +14324,10 @@ protected function getApplicationSessionRequest($applicationId, $sessionId) ); } // path params - if ($sessionId !== null) { + if ($customerId !== null) { $resourcePath = str_replace( - '{' . 'sessionId' . '}', - ObjectSerializer::toPathValue($sessionId), + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), $resourcePath ); } @@ -14337,6 +14375,11 @@ protected function getApplicationSessionRequest($applicationId, $sessionId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -14364,56 +14407,46 @@ protected function getApplicationSessionRequest($applicationId, $sessionId) } /** - * Operation getApplicationSessions + * Operation getApplicationCustomerFriends * - * List Application sessions + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20020 + * @return \TalonOne\Client\Model\InlineResponse20030 */ - public function getApplicationSessions($applicationId, $pageSize = null, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationCustomerFriends($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - list($response) = $this->getApplicationSessionsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); + list($response) = $this->getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); return $response; } /** - * Operation getApplicationSessionsWithHttpInfo + * Operation getApplicationCustomerFriendsWithHttpInfo * - * List Application sessions + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20020, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20030, HTTP status code, HTTP response headers (array of strings) */ - public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationCustomerFriendsWithHttpInfo($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); + $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -14446,20 +14479,20 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20020' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20030' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20020', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20030', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $returnType = '\TalonOne\Client\Model\InlineResponse20030'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14478,7 +14511,7 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20020', + '\TalonOne\Client\Model\InlineResponse20030', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14489,28 +14522,23 @@ public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = n } /** - * Operation getApplicationSessionsAsync + * Operation getApplicationCustomerFriendsAsync * - * List Application sessions + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionsAsync($applicationId, $pageSize = null, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationCustomerFriendsAsync($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - return $this->getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) + return $this->getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -14519,29 +14547,24 @@ function ($response) { } /** - * Operation getApplicationSessionsAsyncWithHttpInfo + * Operation getApplicationCustomerFriendsAsyncWithHttpInfo * - * List Application sessions + * List friends referred by customer profile * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + public function getApplicationCustomerFriendsAsyncWithHttpInfo($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20020'; - $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20030'; + $request = $this->getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize, $skip, $sort, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14578,40 +14601,41 @@ function ($exception) { } /** - * Create request for operation 'getApplicationSessions' + * Create request for operation 'getApplicationCustomerFriends' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param string $integrationId The Integration ID of the Advocate's Profile. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) - * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) - * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationSessionsRequest($applicationId, $pageSize = null, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) + protected function getApplicationCustomerFriendsRequest($applicationId, $integrationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getApplicationSessions' + 'Missing the required parameter $applicationId when calling getApplicationCustomerFriends' + ); + } + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $integrationId when calling getApplicationCustomerFriends' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomerFriends, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/sessions'; + $resourcePath = '/v1/applications/{applicationId}/profile/{integrationId}/friends'; $formParams = []; $queryParams = []; $headerParams = []; @@ -14640,53 +14664,11 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = nul $queryParams['sort'] = $sort; } // query params - if (is_array($profile)) { - $profile = ObjectSerializer::serializeCollection($profile, '', true); - } - if ($profile !== null) { - $queryParams['profile'] = $profile; - } - // query params - if (is_array($state)) { - $state = ObjectSerializer::serializeCollection($state, '', true); - } - if ($state !== null) { - $queryParams['state'] = $state; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($coupon)) { - $coupon = ObjectSerializer::serializeCollection($coupon, '', true); - } - if ($coupon !== null) { - $queryParams['coupon'] = $coupon; - } - // query params - if (is_array($referral)) { - $referral = ObjectSerializer::serializeCollection($referral, '', true); - } - if ($referral !== null) { - $queryParams['referral'] = $referral; - } - // query params - if (is_array($integrationId)) { - $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } - if ($integrationId !== null) { - $queryParams['integrationId'] = $integrationId; + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } @@ -14698,6 +14680,14 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = nul $resourcePath ); } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -14742,6 +14732,11 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = nul } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -14769,40 +14764,44 @@ protected function getApplicationSessionsRequest($applicationId, $pageSize = nul } /** - * Operation getApplications + * Operation getApplicationCustomers * - * List applications + * List application's customers * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2002 + * @return \TalonOne\Client\Model\InlineResponse20021 */ - public function getApplications($pageSize = null, $skip = null, $sort = null) + public function getApplicationCustomers($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - list($response) = $this->getApplicationsWithHttpInfo($pageSize, $skip, $sort); + list($response) = $this->getApplicationCustomersWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); return $response; } /** - * Operation getApplicationsWithHttpInfo + * Operation getApplicationCustomersWithHttpInfo * - * List applications + * List application's customers * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2002, 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 getApplicationsWithHttpInfo($pageSize = null, $skip = null, $sort = null) + public function getApplicationCustomersWithHttpInfo($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $request = $this->getApplicationsRequest($pageSize, $skip, $sort); + $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -14835,20 +14834,20 @@ public function getApplicationsWithHttpInfo($pageSize = null, $skip = null, $sor $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2002' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20021' === '\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\InlineResponse20021', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2002'; + $returnType = '\TalonOne\Client\Model\InlineResponse20021'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -14867,7 +14866,7 @@ public function getApplicationsWithHttpInfo($pageSize = null, $skip = null, $sor case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2002', + '\TalonOne\Client\Model\InlineResponse20021', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -14878,20 +14877,22 @@ public function getApplicationsWithHttpInfo($pageSize = null, $skip = null, $sor } /** - * Operation getApplicationsAsync + * Operation getApplicationCustomersAsync * - * List applications + * List application's customers * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationsAsync($pageSize = null, $skip = null, $sort = null) + public function getApplicationCustomersAsync($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - return $this->getApplicationsAsyncWithHttpInfo($pageSize, $skip, $sort) + return $this->getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -14900,21 +14901,23 @@ function ($response) { } /** - * Operation getApplicationsAsyncWithHttpInfo + * Operation getApplicationCustomersAsyncWithHttpInfo * - * List applications + * List application's customers * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getApplicationsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null) + public function getApplicationCustomersAsyncWithHttpInfo($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2002'; - $request = $this->getApplicationsRequest($pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20021'; + $request = $this->getApplicationCustomersRequest($applicationId, $integrationId, $pageSize, $skip, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -14951,32 +14954,47 @@ function ($exception) { } /** - * Create request for operation 'getApplications' + * Create request for operation 'getApplicationCustomers' * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getApplicationsRequest($pageSize = null, $skip = null, $sort = null) + protected function getApplicationCustomersRequest($applicationId, $integrationId = null, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getApplicationCustomers' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomers, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications'; + $resourcePath = '/v1/applications/{applicationId}/customers'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; + } // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); @@ -14992,14 +15010,22 @@ protected function getApplicationsRequest($pageSize = null, $skip = null, $sort $queryParams['skip'] = $skip; } // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); } - if ($sort !== null) { - $queryParams['sort'] = $sort; + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -15044,6 +15070,11 @@ protected function getApplicationsRequest($pageSize = null, $skip = null, $sort } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -15071,36 +15102,44 @@ protected function getApplicationsRequest($pageSize = null, $skip = null, $sort } /** - * Operation getAttribute + * Operation getApplicationCustomersByAttributes * - * Get custom attribute + * List application customers matching the given attributes * - * @param int $attributeId attributeId (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Attribute + * @return \TalonOne\Client\Model\InlineResponse20022 */ - public function getAttribute($attributeId) + public function getApplicationCustomersByAttributes($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - list($response) = $this->getAttributeWithHttpInfo($attributeId); + list($response) = $this->getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize); return $response; } /** - * Operation getAttributeWithHttpInfo + * Operation getApplicationCustomersByAttributesWithHttpInfo * - * Get custom attribute + * List application customers matching the given attributes * - * @param int $attributeId (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Attribute, 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 getAttributeWithHttpInfo($attributeId) + public function getApplicationCustomersByAttributesWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $request = $this->getAttributeRequest($attributeId); + $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -15133,20 +15172,20 @@ public function getAttributeWithHttpInfo($attributeId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20022' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20022', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Attribute'; + $returnType = '\TalonOne\Client\Model\InlineResponse20022'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15165,7 +15204,7 @@ public function getAttributeWithHttpInfo($attributeId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Attribute', + '\TalonOne\Client\Model\InlineResponse20022', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15176,18 +15215,22 @@ public function getAttributeWithHttpInfo($attributeId) } /** - * Operation getAttributeAsync + * Operation getApplicationCustomersByAttributesAsync * - * Get custom attribute + * List application customers matching the given attributes * - * @param int $attributeId (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributeAsync($attributeId) + public function getApplicationCustomersByAttributesAsync($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - return $this->getAttributeAsyncWithHttpInfo($attributeId) + return $this->getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -15196,19 +15239,23 @@ function ($response) { } /** - * Operation getAttributeAsyncWithHttpInfo + * Operation getApplicationCustomersByAttributesAsyncWithHttpInfo * - * Get custom attribute + * List application customers matching the given attributes * - * @param int $attributeId (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributeAsyncWithHttpInfo($attributeId) + public function getApplicationCustomersByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\Attribute'; - $request = $this->getAttributeRequest($attributeId); + $returnType = '\TalonOne\Client\Model\InlineResponse20022'; + $request = $this->getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize, $skip, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15245,42 +15292,83 @@ function ($exception) { } /** - * Create request for operation 'getAttribute' + * Create request for operation 'getApplicationCustomersByAttributes' * - * @param int $attributeId (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAttributeRequest($attributeId) + protected function getApplicationCustomersByAttributesRequest($applicationId, $body, $pageSize = 1000, $skip = null, $withTotalResultSize = null) { - // verify the required parameter 'attributeId' is set - if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeId when calling getAttribute' + 'Missing the required parameter $applicationId when calling getApplicationCustomersByAttributes' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling getApplicationCustomersByAttributes' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationCustomersByAttributes, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/attributes/{attributeId}'; + + $resourcePath = '/v1/applications/{applicationId}/customer_search'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } // path params - if ($attributeId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'attributeId' . '}', - ObjectSerializer::toPathValue($attributeId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -15289,7 +15377,7 @@ protected function getAttributeRequest($attributeId) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -15322,6 +15410,11 @@ protected function getAttributeRequest($attributeId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -15341,7 +15434,7 @@ protected function getAttributeRequest($attributeId) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -15349,42 +15442,42 @@ protected function getAttributeRequest($attributeId) } /** - * Operation getAttributes + * Operation getApplicationEventTypes * - * List custom attributes + * List Applications event types * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20025 + * @return \TalonOne\Client\Model\InlineResponse20028 */ - public function getAttributes($pageSize = null, $skip = null, $sort = null, $entity = null) + public function getApplicationEventTypes($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getAttributesWithHttpInfo($pageSize, $skip, $sort, $entity); + list($response) = $this->getApplicationEventTypesWithHttpInfo($applicationId, $pageSize, $skip, $sort); return $response; } /** - * Operation getAttributesWithHttpInfo + * Operation getApplicationEventTypesWithHttpInfo * - * List custom attributes + * List Applications event types * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20025, 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 getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort = null, $entity = null) + public function getApplicationEventTypesWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); + $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -15417,20 +15510,20 @@ public function getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20025' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20028' === '\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\InlineResponse20028', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20025'; + $returnType = '\TalonOne\Client\Model\InlineResponse20028'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15449,7 +15542,7 @@ public function getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20025', + '\TalonOne\Client\Model\InlineResponse20028', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15460,21 +15553,21 @@ public function getAttributesWithHttpInfo($pageSize = null, $skip = null, $sort } /** - * Operation getAttributesAsync + * Operation getApplicationEventTypesAsync * - * List custom attributes + * List Applications event types * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributesAsync($pageSize = null, $skip = null, $sort = null, $entity = null) + public function getApplicationEventTypesAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getAttributesAsyncWithHttpInfo($pageSize, $skip, $sort, $entity) + return $this->getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -15483,22 +15576,22 @@ function ($response) { } /** - * Operation getAttributesAsyncWithHttpInfo + * Operation getApplicationEventTypesAsyncWithHttpInfo * - * List custom attributes + * List Applications event types * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAttributesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $entity = null) + public function getApplicationEventTypesAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20025'; - $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); + $returnType = '\TalonOne\Client\Model\InlineResponse20028'; + $request = $this->getApplicationEventTypesRequest($applicationId, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15535,27 +15628,33 @@ function ($exception) { } /** - * Create request for operation 'getAttributes' + * Create request for operation 'getApplicationEventTypes' * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param string $entity Returned attributes will be filtered by supplied entity. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAttributesRequest($pageSize = null, $skip = null, $sort = null, $entity = null) + protected function getApplicationEventTypesRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getApplicationEventTypes' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventTypes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/attributes'; + $resourcePath = '/v1/applications/{applicationId}/event_types'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15583,15 +15682,16 @@ protected function getAttributesRequest($pageSize = null, $skip = null, $sort = if ($sort !== null) { $queryParams['sort'] = $sort; } - // query params - if (is_array($entity)) { - $entity = ObjectSerializer::serializeCollection($entity, '', true); - } - if ($entity !== null) { - $queryParams['entity'] = $entity; - } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -15636,6 +15736,11 @@ protected function getAttributesRequest($pageSize = null, $skip = null, $sort = } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -15663,42 +15768,64 @@ protected function getAttributesRequest($pageSize = null, $skip = null, $sort = } /** - * Operation getAudiences + * Operation getApplicationEventsWithoutTotalCount * - * List audiences + * List Applications events * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20023 + * @return \TalonOne\Client\Model\InlineResponse20027 */ - public function getAudiences($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationEventsWithoutTotalCount($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - list($response) = $this->getAudiencesWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize); + list($response) = $this->getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); return $response; } /** - * Operation getAudiencesWithHttpInfo + * Operation getApplicationEventsWithoutTotalCountWithHttpInfo * - * List audiences + * List Applications events * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @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\InlineResponse20027, HTTP status code, HTTP response headers (array of strings) */ - public function getAudiencesWithHttpInfo($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationEventsWithoutTotalCountWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); + $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); try { $options = $this->createHttpClientOption(); @@ -15731,20 +15858,20 @@ public function getAudiencesWithHttpInfo($pageSize = null, $skip = null, $sort = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20023' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20027' === '\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\InlineResponse20027', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20023'; + $returnType = '\TalonOne\Client\Model\InlineResponse20027'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -15763,7 +15890,7 @@ public function getAudiencesWithHttpInfo($pageSize = null, $skip = null, $sort = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20023', + '\TalonOne\Client\Model\InlineResponse20027', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -15774,21 +15901,32 @@ public function getAudiencesWithHttpInfo($pageSize = null, $skip = null, $sort = } /** - * Operation getAudiencesAsync + * Operation getApplicationEventsWithoutTotalCountAsync * - * List audiences + * List Applications events * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAudiencesAsync($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationEventsWithoutTotalCountAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - return $this->getAudiencesAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize) + return $this->getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery) ->then( function ($response) { return $response[0]; @@ -15797,22 +15935,33 @@ function ($response) { } /** - * Operation getAudiencesAsyncWithHttpInfo + * Operation getApplicationEventsWithoutTotalCountAsyncWithHttpInfo * - * List audiences + * List Applications events * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAudiencesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + public function getApplicationEventsWithoutTotalCountAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20023'; - $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); + $returnType = '\TalonOne\Client\Model\InlineResponse20027'; + $request = $this->getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize, $skip, $sort, $type, $createdBefore, $createdAfter, $session, $profile, $customerName, $customerEmail, $couponCode, $referralCode, $ruleQuery, $campaignQuery); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -15849,27 +15998,52 @@ function ($exception) { } /** - * Create request for operation 'getAudiences' + * Create request for operation 'getApplicationEventsWithoutTotalCount' * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $type Comma-separated list of types by which to filter events. Must be exact match(es). (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $session Session integration ID filter for events. Must be exact match. (optional) + * @param string $profile Profile integration ID filter for events. Must be exact match. (optional) + * @param string $customerName Customer name filter for events. Will match substrings case-insensitively. (optional) + * @param string $customerEmail Customer e-mail address filter for events. Will match substrings case-insensitively. (optional) + * @param string $couponCode Coupon code (optional) + * @param string $referralCode Referral code (optional) + * @param string $ruleQuery Rule name filter for events (optional) + * @param string $campaignQuery Campaign name filter for events (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getAudiencesRequest($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null) + protected function getApplicationEventsWithoutTotalCountRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $type = null, $createdBefore = null, $createdAfter = null, $session = null, $profile = null, $customerName = null, $customerEmail = null, $couponCode = null, $referralCode = null, $ruleQuery = null, $campaignQuery = null) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getApplicationEventsWithoutTotalCount' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 1.'); + } + + if ($customerName !== null && strlen($customerName) < 2) { + throw new \InvalidArgumentException('invalid length for "$customerName" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); } + if ($customerEmail !== null && strlen($customerEmail) < 2) { + throw new \InvalidArgumentException('invalid length for "$customerEmail" when calling ManagementApi.getApplicationEventsWithoutTotalCount, must be bigger than or equal to 2.'); + } - $resourcePath = '/v1/audiences'; + + $resourcePath = '/v1/applications/{applicationId}/events/no_total'; $formParams = []; $queryParams = []; $headerParams = []; @@ -15898,14 +16072,92 @@ protected function getAudiencesRequest($pageSize = null, $skip = null, $sort = n $queryParams['sort'] = $sort; } // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + if (is_array($type)) { + $type = ObjectSerializer::serializeCollection($type, '', true); } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; + if ($type !== null) { + $queryParams['type'] = $type; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($session)) { + $session = ObjectSerializer::serializeCollection($session, '', true); + } + if ($session !== null) { + $queryParams['session'] = $session; + } + // query params + if (is_array($profile)) { + $profile = ObjectSerializer::serializeCollection($profile, '', true); + } + if ($profile !== null) { + $queryParams['profile'] = $profile; + } + // query params + if (is_array($customerName)) { + $customerName = ObjectSerializer::serializeCollection($customerName, '', true); + } + if ($customerName !== null) { + $queryParams['customerName'] = $customerName; + } + // query params + if (is_array($customerEmail)) { + $customerEmail = ObjectSerializer::serializeCollection($customerEmail, '', true); + } + if ($customerEmail !== null) { + $queryParams['customerEmail'] = $customerEmail; + } + // query params + if (is_array($couponCode)) { + $couponCode = ObjectSerializer::serializeCollection($couponCode, '', true); + } + if ($couponCode !== null) { + $queryParams['couponCode'] = $couponCode; + } + // query params + if (is_array($referralCode)) { + $referralCode = ObjectSerializer::serializeCollection($referralCode, '', true); + } + if ($referralCode !== null) { + $queryParams['referralCode'] = $referralCode; + } + // query params + if (is_array($ruleQuery)) { + $ruleQuery = ObjectSerializer::serializeCollection($ruleQuery, '', true); + } + if ($ruleQuery !== null) { + $queryParams['ruleQuery'] = $ruleQuery; + } + // query params + if (is_array($campaignQuery)) { + $campaignQuery = ObjectSerializer::serializeCollection($campaignQuery, '', true); + } + if ($campaignQuery !== null) { + $queryParams['campaignQuery'] = $campaignQuery; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -15950,6 +16202,11 @@ protected function getAudiencesRequest($pageSize = null, $skip = null, $sort = n } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -15977,38 +16234,38 @@ protected function getAudiencesRequest($pageSize = null, $skip = null, $sort = n } /** - * Operation getCampaign + * Operation getApplicationSession * - * Get campaign + * Get Application session * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Campaign + * @return \TalonOne\Client\Model\ApplicationSession */ - public function getCampaign($applicationId, $campaignId) + public function getApplicationSession($applicationId, $sessionId) { - list($response) = $this->getCampaignWithHttpInfo($applicationId, $campaignId); + list($response) = $this->getApplicationSessionWithHttpInfo($applicationId, $sessionId); return $response; } /** - * Operation getCampaignWithHttpInfo + * Operation getApplicationSessionWithHttpInfo * - * Get campaign + * Get Application session * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Campaign, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\ApplicationSession, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignWithHttpInfo($applicationId, $campaignId) + public function getApplicationSessionWithHttpInfo($applicationId, $sessionId) { - $request = $this->getCampaignRequest($applicationId, $campaignId); + $request = $this->getApplicationSessionRequest($applicationId, $sessionId); try { $options = $this->createHttpClientOption(); @@ -16041,20 +16298,20 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { + if ('\TalonOne\Client\Model\ApplicationSession' === '\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\ApplicationSession', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Campaign'; + $returnType = '\TalonOne\Client\Model\ApplicationSession'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16073,7 +16330,7 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Campaign', + '\TalonOne\Client\Model\ApplicationSession', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16084,19 +16341,19 @@ public function getCampaignWithHttpInfo($applicationId, $campaignId) } /** - * Operation getCampaignAsync + * Operation getApplicationSessionAsync * - * Get campaign + * Get Application session * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsync($applicationId, $campaignId) + public function getApplicationSessionAsync($applicationId, $sessionId) { - return $this->getCampaignAsyncWithHttpInfo($applicationId, $campaignId) + return $this->getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) ->then( function ($response) { return $response[0]; @@ -16105,20 +16362,20 @@ function ($response) { } /** - * Operation getCampaignAsyncWithHttpInfo + * Operation getApplicationSessionAsyncWithHttpInfo * - * Get campaign + * Get Application session * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAsyncWithHttpInfo($applicationId, $campaignId) + public function getApplicationSessionAsyncWithHttpInfo($applicationId, $sessionId) { - $returnType = '\TalonOne\Client\Model\Campaign'; - $request = $this->getCampaignRequest($applicationId, $campaignId); + $returnType = '\TalonOne\Client\Model\ApplicationSession'; + $request = $this->getApplicationSessionRequest($applicationId, $sessionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16155,30 +16412,30 @@ function ($exception) { } /** - * Create request for operation 'getCampaign' + * Create request for operation 'getApplicationSession' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $sessionId The **internal** ID of the session. You can get the ID with the [List Application sessions](https://docs.talon.one/management-api#tag/Customer-data/operation/getApplicationSessions) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignRequest($applicationId, $campaignId) + protected function getApplicationSessionRequest($applicationId, $sessionId) { // 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' + 'Missing the required parameter $applicationId when calling getApplicationSession' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'sessionId' is set + if ($sessionId === null || (is_array($sessionId) && count($sessionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCampaign' + 'Missing the required parameter $sessionId when calling getApplicationSession' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; + $resourcePath = '/v1/applications/{applicationId}/sessions/{sessionId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16196,10 +16453,10 @@ protected function getCampaignRequest($applicationId, $campaignId) ); } // path params - if ($campaignId !== null) { + if ($sessionId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'sessionId' . '}', + ObjectSerializer::toPathValue($sessionId), $resourcePath ); } @@ -16247,6 +16504,11 @@ protected function getCampaignRequest($applicationId, $campaignId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -16274,44 +16536,56 @@ protected function getCampaignRequest($applicationId, $campaignId) } /** - * Operation getCampaignAnalytics + * Operation getApplicationSessions * - * Get analytics of campaigns + * List Application sessions * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20015 + * @return \TalonOne\Client\Model\InlineResponse20026 */ - public function getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getApplicationSessions($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - list($response) = $this->getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + list($response) = $this->getApplicationSessionsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); return $response; } /** - * Operation getCampaignAnalyticsWithHttpInfo + * Operation getApplicationSessionsWithHttpInfo * - * Get analytics of campaigns + * List Application sessions * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20015, 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 getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getApplicationSessionsWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); try { $options = $this->createHttpClientOption(); @@ -16344,20 +16618,20 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20015' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20026' === '\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\InlineResponse20026', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $returnType = '\TalonOne\Client\Model\InlineResponse20026'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -16376,7 +16650,7 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20015', + '\TalonOne\Client\Model\InlineResponse20026', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -16387,22 +16661,28 @@ public function getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $r } /** - * Operation getCampaignAnalyticsAsync + * Operation getApplicationSessionsAsync * - * Get analytics of campaigns + * List Application sessions * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAnalyticsAsync($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getApplicationSessionsAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - return $this->getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) + return $this->getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId) ->then( function ($response) { return $response[0]; @@ -16411,23 +16691,29 @@ function ($response) { } /** - * Operation getCampaignAnalyticsAsyncWithHttpInfo + * Operation getApplicationSessionsAsyncWithHttpInfo * - * Get analytics of campaigns + * List Application sessions * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + public function getApplicationSessionsAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20015'; - $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); + $returnType = '\TalonOne\Client\Model\InlineResponse20026'; + $request = $this->getApplicationSessionsRequest($applicationId, $pageSize, $skip, $sort, $profile, $state, $createdBefore, $createdAfter, $coupon, $referral, $integrationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16464,45 +16750,40 @@ function ($exception) { } /** - * Create request for operation 'getCampaignAnalytics' + * Create request for operation 'getApplicationSessions' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \DateTime $rangeStart Only return results from after this timestamp, 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) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $profile Profile integration ID filter for sessions. Must be exact match. (optional) + * @param string $state Filter by sessions with this state. Must be exact match. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $coupon Filter by sessions with this coupon. Must be exact match. (optional) + * @param string $referral Filter by sessions with this referral. Must be exact match. (optional) + * @param string $integrationId Filter by sessions with this integrationId. Must be exact match. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) + protected function getApplicationSessionsRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $profile = null, $state = null, $createdBefore = null, $createdAfter = null, $coupon = null, $referral = null, $integrationId = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaignAnalytics' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCampaignAnalytics' + 'Missing the required parameter $applicationId when calling getApplicationSessions' ); } - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getCampaignAnalytics' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be smaller than or equal to 1000.'); } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCampaignAnalytics' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplicationSessions, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'; + + $resourcePath = '/v1/applications/{applicationId}/sessions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16510,25 +16791,74 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran $multipart = false; // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; } // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + if ($skip !== null) { + $queryParams['skip'] = $skip; } // query params - if (is_array($granularity)) { - $granularity = ObjectSerializer::serializeCollection($granularity, '', true); + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); } - if ($granularity !== null) { - $queryParams['granularity'] = $granularity; + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($profile)) { + $profile = ObjectSerializer::serializeCollection($profile, '', true); + } + if ($profile !== null) { + $queryParams['profile'] = $profile; + } + // query params + if (is_array($state)) { + $state = ObjectSerializer::serializeCollection($state, '', true); + } + if ($state !== null) { + $queryParams['state'] = $state; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($coupon)) { + $coupon = ObjectSerializer::serializeCollection($coupon, '', true); + } + if ($coupon !== null) { + $queryParams['coupon'] = $coupon; + } + // query params + if (is_array($referral)) { + $referral = ObjectSerializer::serializeCollection($referral, '', true); + } + if ($referral !== null) { + $queryParams['referral'] = $referral; + } + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; } @@ -16540,14 +16870,6 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran $resourcePath ); } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -16592,6 +16914,11 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -16619,46 +16946,40 @@ protected function getCampaignAnalyticsRequest($applicationId, $campaignId, $ran } /** - * Operation getCampaignByAttributes + * Operation getApplications * - * List campaigns that match the given attributes + * List Applications * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\CampaignSearch $body body (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return \TalonOne\Client\Model\InlineResponse2003 */ - public function getCampaignByAttributes($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getApplications($pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + list($response) = $this->getApplicationsWithHttpInfo($pageSize, $skip, $sort); return $response; } /** - * Operation getCampaignByAttributesWithHttpInfo + * Operation getApplicationsWithHttpInfo * - * List campaigns that match the given attributes + * List Applications * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException * @return array of \TalonOne\Client\Model\InlineResponse2003, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getApplicationsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + $request = $this->getApplicationsRequest($pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -16734,23 +17055,20 @@ public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $page } /** - * Operation getCampaignByAttributesAsync + * Operation getApplicationsAsync * - * List campaigns that match the given attributes + * List Applications * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignByAttributesAsync($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getApplicationsAsync($pageSize = 1000, $skip = null, $sort = null) { - return $this->getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState) + return $this->getApplicationsAsyncWithHttpInfo($pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -16759,24 +17077,21 @@ function ($response) { } /** - * Operation getCampaignByAttributesAsyncWithHttpInfo + * Operation getApplicationsAsyncWithHttpInfo * - * List campaigns that match the given attributes + * List Applications * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + public function getApplicationsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { $returnType = '\TalonOne\Client\Model\InlineResponse2003'; - $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); + $request = $this->getApplicationsRequest($pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -16813,41 +17128,26 @@ function ($exception) { } /** - * Create request for operation 'getCampaignByAttributes' + * Create request for operation 'getApplications' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignByAttributesRequest($applicationId, $body, $pageSize = null, $skip = null, $sort = null, $campaignState = null) + protected function getApplicationsRequest($pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaignByAttributes' - ); - } - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling getCampaignByAttributes' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getApplications, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns_search'; + $resourcePath = '/v1/applications'; $formParams = []; $queryParams = []; $headerParams = []; @@ -16875,29 +17175,11 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi if ($sort !== null) { $queryParams['sort'] = $sort; } - // query params - if (is_array($campaignState)) { - $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); - } - if ($campaignState !== null) { - $queryParams['campaignState'] = $campaignState; - } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -16906,7 +17188,7 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -16939,6 +17221,11 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -16958,7 +17245,7 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -16966,56 +17253,36 @@ protected function getCampaignByAttributesRequest($applicationId, $body, $pageSi } /** - * Operation getCampaigns + * Operation getAttribute * - * List campaigns + * Get custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2003|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Attribute */ - public function getCampaigns($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getAttribute($attributeId) { - list($response) = $this->getCampaignsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + list($response) = $this->getAttributeWithHttpInfo($attributeId); return $response; } /** - * Operation getCampaignsWithHttpInfo + * Operation getAttributeWithHttpInfo * - * List campaigns + * Get custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2003|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) */ - public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getAttributeWithHttpInfo($attributeId) { - $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + $request = $this->getAttributeRequest($attributeId); try { $options = $this->createHttpClientOption(); @@ -17048,32 +17315,20 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2003' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2003', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2003'; + $returnType = '\TalonOne\Client\Model\Attribute'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17092,15 +17347,7 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2003', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Attribute', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17111,28 +17358,18 @@ public function getCampaignsWithHttpInfo($applicationId, $pageSize = null, $skip } /** - * Operation getCampaignsAsync + * Operation getAttributeAsync * - * List campaigns + * Get custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsync($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getAttributeAsync($attributeId) { - return $this->getCampaignsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId) + return $this->getAttributeAsyncWithHttpInfo($attributeId) ->then( function ($response) { return $response[0]; @@ -17141,29 +17378,19 @@ function ($response) { } /** - * Operation getCampaignsAsyncWithHttpInfo + * Operation getAttributeAsyncWithHttpInfo * - * List campaigns + * Get custom attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCampaignsAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + public function getAttributeAsyncWithHttpInfo($attributeId) { - $returnType = '\TalonOne\Client\Model\InlineResponse2003'; - $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); + $returnType = '\TalonOne\Client\Model\Attribute'; + $request = $this->getAttributeRequest($attributeId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17200,123 +17427,36 @@ function ($exception) { } /** - * Create request for operation 'getCampaigns' + * Create request for operation 'getAttribute' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) - * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) - * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) - * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) + protected function getAttributeRequest($attributeId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'attributeId' is set + if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCampaigns' + 'Missing the required parameter $attributeId when calling getAttribute' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/campaigns'; + $resourcePath = '/v1/attributes/{attributeId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($campaignState)) { - $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); - } - if ($campaignState !== null) { - $queryParams['campaignState'] = $campaignState; - } - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } - // query params - if (is_array($tags)) { - $tags = ObjectSerializer::serializeCollection($tags, '', true); - } - if ($tags !== null) { - $queryParams['tags'] = $tags; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($campaignGroupId)) { - $campaignGroupId = ObjectSerializer::serializeCollection($campaignGroupId, '', true); - } - if ($campaignGroupId !== null) { - $queryParams['campaignGroupId'] = $campaignGroupId; - } - // query params - if (is_array($templateId)) { - $templateId = ObjectSerializer::serializeCollection($templateId, '', true); - } - if ($templateId !== null) { - $queryParams['templateId'] = $templateId; - } // path params - if ($applicationId !== null) { + if ($attributeId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'attributeId' . '}', + ObjectSerializer::toPathValue($attributeId), $resourcePath ); } @@ -17364,6 +17504,11 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -17391,54 +17536,42 @@ protected function getCampaignsRequest($applicationId, $pageSize = null, $skip = } /** - * Operation getChanges + * Operation getAttributes * - * Get audit logs for an account + * List custom attributes * - * @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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) - * @param int $userId Filter results that match the given user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param 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 $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20032 + * @return \TalonOne\Client\Model\InlineResponse20031 */ - public function getChanges($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getAttributes($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - list($response) = $this->getChangesWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + list($response) = $this->getAttributesWithHttpInfo($pageSize, $skip, $sort, $entity); return $response; } /** - * Operation getChangesWithHttpInfo + * Operation getAttributesWithHttpInfo * - * Get audit logs for an account + * List custom attributes * - * @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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) - * @param int $userId Filter results that match the given user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param 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 $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20032, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20031, HTTP status code, HTTP response headers (array of strings) */ - public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getAttributesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); try { $options = $this->createHttpClientOption(); @@ -17471,20 +17604,20 @@ public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20032' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20031' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20032', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20031', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20032'; + $returnType = '\TalonOne\Client\Model\InlineResponse20031'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17503,7 +17636,7 @@ public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20032', + '\TalonOne\Client\Model\InlineResponse20031', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17514,27 +17647,21 @@ public function getChangesWithHttpInfo($pageSize = null, $skip = null, $sort = n } /** - * Operation getChangesAsync + * Operation getAttributesAsync * - * Get audit logs for an account + * List custom attributes * - * @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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) - * @param int $userId Filter results that match the given user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param 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 $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChangesAsync($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getAttributesAsync($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - return $this->getChangesAsyncWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld) + return $this->getAttributesAsyncWithHttpInfo($pageSize, $skip, $sort, $entity) ->then( function ($response) { return $response[0]; @@ -17543,28 +17670,22 @@ function ($response) { } /** - * Operation getChangesAsyncWithHttpInfo + * Operation getAttributesAsyncWithHttpInfo * - * Get audit logs for an account + * List custom attributes * - * @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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) - * @param int $userId Filter results that match the given user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param 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 $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getChangesAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + public function getAttributesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $entity = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20032'; - $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $includeOld); + $returnType = '\TalonOne\Client\Model\InlineResponse20031'; + $request = $this->getAttributesRequest($pageSize, $skip, $sort, $entity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17601,33 +17722,27 @@ function ($exception) { } /** - * Create request for operation 'getChanges' + * Create request for operation 'getAttributes' * - * @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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) - * @param int $userId Filter results that match the given user ID. (optional) - * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param 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 $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $entity Returned attributes will be filtered by supplied entity. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getChangesRequest($pageSize = null, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $includeOld = null) + protected function getAttributesRequest($pageSize = 1000, $skip = null, $sort = null, $entity = null) { if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/changes'; + $resourcePath = '/v1/attributes'; $formParams = []; $queryParams = []; $headerParams = []; @@ -17656,53 +17771,11 @@ protected function getChangesRequest($pageSize = null, $skip = null, $sort = nul $queryParams['sort'] = $sort; } // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); - } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; - } - // query params - if (is_array($entityPath)) { - $entityPath = ObjectSerializer::serializeCollection($entityPath, '', true); - } - if ($entityPath !== null) { - $queryParams['entityPath'] = $entityPath; - } - // query params - if (is_array($userId)) { - $userId = ObjectSerializer::serializeCollection($userId, '', true); - } - if ($userId !== null) { - $queryParams['userId'] = $userId; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // query params - if (is_array($includeOld)) { - $includeOld = ObjectSerializer::serializeCollection($includeOld, '', true); + if (is_array($entity)) { + $entity = ObjectSerializer::serializeCollection($entity, '', true); } - if ($includeOld !== null) { - $queryParams['includeOld'] = $includeOld; + if ($entity !== null) { + $queryParams['entity'] = $entity; } @@ -17750,6 +17823,11 @@ protected function getChangesRequest($pageSize = null, $skip = null, $sort = nul } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -17777,40 +17855,42 @@ protected function getChangesRequest($pageSize = null, $skip = null, $sort = nul } /** - * Operation getCollection + * Operation getAudiences * - * Get collection + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20029 */ - public function getCollection($applicationId, $campaignId, $collectionId) + public function getAudiences($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - list($response) = $this->getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId); + list($response) = $this->getAudiencesWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize); return $response; } /** - * Operation getCollectionWithHttpInfo + * Operation getAudiencesWithHttpInfo * - * Get collection + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20029, HTTP status code, HTTP response headers (array of strings) */ - public function getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId) + public function getAudiencesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); + $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); try { $options = $this->createHttpClientOption(); @@ -17843,32 +17923,20 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20029' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20029', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Collection'; + $returnType = '\TalonOne\Client\Model\InlineResponse20029'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -17887,15 +17955,7 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20029', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -17906,20 +17966,21 @@ public function getCollectionWithHttpInfo($applicationId, $campaignId, $collecti } /** - * Operation getCollectionAsync + * Operation getAudiencesAsync * - * Get collection + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionAsync($applicationId, $campaignId, $collectionId) + public function getAudiencesAsync($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - return $this->getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + return $this->getAudiencesAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize) ->then( function ($response) { return $response[0]; @@ -17928,21 +17989,22 @@ function ($response) { } /** - * Operation getCollectionAsyncWithHttpInfo + * Operation getAudiencesAsyncWithHttpInfo * - * Get collection + * List audiences * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) + public function getAudiencesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); + $returnType = '\TalonOne\Client\Model\InlineResponse20029'; + $request = $this->getAudiencesRequest($pageSize, $skip, $sort, $withTotalResultSize); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -17979,70 +18041,64 @@ function ($exception) { } /** - * Create request for operation 'getCollection' + * Create request for operation 'getAudiences' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCollectionRequest($applicationId, $campaignId, $collectionId) + protected function getAudiencesRequest($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCollection' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCollection' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be smaller than or equal to 1000.'); } - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling getCollection' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getAudiences, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; + + $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; } - // path params - if ($collectionId !== null) { - $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), - $resourcePath - ); + // 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; @@ -18086,6 +18142,11 @@ protected function getCollectionRequest($applicationId, $campaignId, $collection } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -18113,40 +18174,38 @@ protected function getCollectionRequest($applicationId, $campaignId, $collection } /** - * Operation getCollectionItems + * Operation getCampaign * - * Get collection items + * Get campaign * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (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 int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20011|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Campaign */ - public function getCollectionItems($collectionId, $pageSize = null, $skip = null) + public function getCampaign($applicationId, $campaignId) { - list($response) = $this->getCollectionItemsWithHttpInfo($collectionId, $pageSize, $skip); + list($response) = $this->getCampaignWithHttpInfo($applicationId, $campaignId); return $response; } /** - * Operation getCollectionItemsWithHttpInfo + * Operation getCampaignWithHttpInfo * - * Get collection items + * Get campaign * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (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 int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20011|\TalonOne\Client\Model\ErrorResponseWithStatus, 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 getCollectionItemsWithHttpInfo($collectionId, $pageSize = null, $skip = null) + public function getCampaignWithHttpInfo($applicationId, $campaignId) { - $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); + $request = $this->getCampaignRequest($applicationId, $campaignId); try { $options = $this->createHttpClientOption(); @@ -18179,32 +18238,20 @@ public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = null, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20011' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20011', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\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 @@ -18223,15 +18270,7 @@ public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20011', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Campaign', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -18242,20 +18281,19 @@ public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = null, } /** - * Operation getCollectionItemsAsync + * Operation getCampaignAsync * - * Get collection items + * Get campaign * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (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 int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionItemsAsync($collectionId, $pageSize = null, $skip = null) + public function getCampaignAsync($applicationId, $campaignId) { - return $this->getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize, $skip) + return $this->getCampaignAsyncWithHttpInfo($applicationId, $campaignId) ->then( function ($response) { return $response[0]; @@ -18264,21 +18302,20 @@ function ($response) { } /** - * Operation getCollectionItemsAsyncWithHttpInfo + * Operation getCampaignAsyncWithHttpInfo * - * Get collection items + * Get campaign * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (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 int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize = null, $skip = null) + public function getCampaignAsyncWithHttpInfo($applicationId, $campaignId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20011'; - $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\Campaign'; + $request = $this->getCampaignRequest($applicationId, $campaignId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18315,59 +18352,51 @@ function ($exception) { } /** - * Create request for operation 'getCollectionItems' + * Create request for operation 'getCampaign' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (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 int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCollectionItemsRequest($collectionId, $pageSize = null, $skip = null) + protected function getCampaignRequest($applicationId, $campaignId) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling getCollectionItems' + 'Missing the required parameter $applicationId when calling getCampaign' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be bigger than or equal to 1.'); + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getCampaign' + ); } - - $resourcePath = '/v1/collections/{collectionId}/items'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); } - 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 ($collectionId !== null) { + if ($campaignId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), $resourcePath ); } @@ -18415,6 +18444,11 @@ protected function getCollectionItemsRequest($collectionId, $pageSize = null, $s } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -18442,62 +18476,44 @@ protected function getCollectionItemsRequest($collectionId, $pageSize = null, $s } /** - * Operation getCouponsWithoutTotalCount + * Operation getCampaignAnalytics * - * List coupons + * Get analytics of campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $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) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2007 + * @return \TalonOne\Client\Model\InlineResponse20020 */ - 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 getCampaignAnalytics($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - list($response) = $this->getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + list($response) = $this->getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); return $response; } /** - * Operation getCouponsWithoutTotalCountWithHttpInfo + * Operation getCampaignAnalyticsWithHttpInfo * - * List coupons + * Get analytics of campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $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) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2007, 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 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 getCampaignAnalyticsWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); try { $options = $this->createHttpClientOption(); @@ -18530,20 +18546,20 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20020' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20020', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $returnType = '\TalonOne\Client\Model\InlineResponse20020'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -18562,7 +18578,7 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2007', + '\TalonOne\Client\Model\InlineResponse20020', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -18573,31 +18589,22 @@ public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaig } /** - * Operation getCouponsWithoutTotalCountAsync + * Operation getCampaignAnalyticsAsync * - * List coupons + * Get analytics of campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $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) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function 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 getCampaignAnalyticsAsync($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - return $this->getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) + return $this->getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity) ->then( function ($response) { return $response[0]; @@ -18606,32 +18613,23 @@ function ($response) { } /** - * Operation getCouponsWithoutTotalCountAsyncWithHttpInfo + * Operation getCampaignAnalyticsAsyncWithHttpInfo * - * List coupons + * Get analytics of campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $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) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function 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 getCampaignAnalyticsAsyncWithHttpInfo($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; - $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); + $returnType = '\TalonOne\Client\Model\InlineResponse20020'; + $request = $this->getCampaignAnalyticsRequest($applicationId, $campaignId, $rangeStart, $rangeEnd, $granularity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -18668,49 +18666,45 @@ function ($exception) { } /** - * Create request for operation 'getCouponsWithoutTotalCount' + * Create request for operation 'getCampaignAnalytics' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items 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) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param string $granularity The time interval between the results in the returned time-series. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function 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 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 getCouponsWithoutTotalCount' + 'Missing the required parameter $applicationId when calling getCampaignAnalytics' ); } // verify the required parameter 'campaignId' is set if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getCouponsWithoutTotalCount' + 'Missing the required parameter $campaignId when calling getCampaignAnalytics' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be smaller than or equal to 1000.'); + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeStart when calling getCampaignAnalytics' + ); } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be bigger than or equal to 1.'); + // 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/{campaignId}/coupons/no_total'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/analytics'; $formParams = []; $queryParams = []; $headerParams = []; @@ -18718,88 +18712,25 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI $multipart = false; // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($value)) { - $value = ObjectSerializer::serializeCollection($value, '', true); - } - if ($value !== null) { - $queryParams['value'] = $value; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($usable)) { - $usable = ObjectSerializer::serializeCollection($usable, '', true); - } - if ($usable !== null) { - $queryParams['usable'] = $usable; - } - // query params - if (is_array($referralId)) { - $referralId = ObjectSerializer::serializeCollection($referralId, '', true); - } - if ($referralId !== null) { - $queryParams['referralId'] = $referralId; - } - // query params - if (is_array($recipientIntegrationId)) { - $recipientIntegrationId = ObjectSerializer::serializeCollection($recipientIntegrationId, '', true); + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($recipientIntegrationId !== null) { - $queryParams['recipientIntegrationId'] = $recipientIntegrationId; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; } // query params - if (is_array($batchId)) { - $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); } - if ($batchId !== null) { - $queryParams['batchId'] = $batchId; + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; } // query params - if (is_array($exactMatch)) { - $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); + if (is_array($granularity)) { + $granularity = ObjectSerializer::serializeCollection($granularity, '', true); } - if ($exactMatch !== null) { - $queryParams['exactMatch'] = $exactMatch; + if ($granularity !== null) { + $queryParams['granularity'] = $granularity; } @@ -18863,6 +18794,11 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -18890,46 +18826,46 @@ protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignI } /** - * Operation getCustomerActivityReport + * Operation getCampaignByAttributes * - * Get customer's activity report + * List campaigns that match the given attributes * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 \TalonOne\Client\Model\CampaignSearch $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CustomerActivityReport + * @return \TalonOne\Client\Model\InlineResponse2004 */ - public function getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCampaignByAttributes($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - list($response) = $this->getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + list($response) = $this->getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState); return $response; } /** - * Operation getCustomerActivityReportWithHttpInfo + * Operation getCampaignByAttributesWithHttpInfo * - * Get customer's activity report + * List campaigns that match the given attributes * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 \TalonOne\Client\Model\CampaignSearch $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @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\InlineResponse2004, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCampaignByAttributesWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); try { $options = $this->createHttpClientOption(); @@ -18962,20 +18898,20 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerActivityReport' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2004' === '\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\InlineResponse2004', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -18994,7 +18930,7 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerActivityReport', + '\TalonOne\Client\Model\InlineResponse2004', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -19005,23 +18941,23 @@ public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $a } /** - * Operation getCustomerActivityReportAsync + * Operation getCampaignByAttributesAsync * - * Get customer's activity report + * List campaigns that match the given attributes * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 \TalonOne\Client\Model\CampaignSearch $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportAsync($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCampaignByAttributesAsync($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - return $this->getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) + return $this->getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $campaignState) ->then( function ($response) { return $response[0]; @@ -19030,24 +18966,24 @@ function ($response) { } /** - * Operation getCustomerActivityReportAsyncWithHttpInfo + * Operation getCampaignByAttributesAsyncWithHttpInfo * - * Get customer's activity report + * List campaigns that match the given attributes * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 \TalonOne\Client\Model\CampaignSearch $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + public function getCampaignByAttributesAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; - $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $request = $this->getCampaignByAttributesRequest($applicationId, $body, $pageSize, $skip, $sort, $campaignState); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19084,53 +19020,41 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReport' + * Create request for operation 'getCampaignByAttributes' * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 \TalonOne\Client\Model\CampaignSearch $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = null, $skip = null) + protected function getCampaignByAttributesRequest($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null) { - // verify the required parameter 'rangeStart' is set - if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeStart when calling getCustomerActivityReport' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCustomerActivityReport' - ); - } // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCustomerActivityReport' + 'Missing the required parameter $applicationId when calling getCampaignByAttributes' ); } - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerActivityReport' + 'Missing the required parameter $body when calling getCampaignByAttributes' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignByAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns_search'; $formParams = []; $queryParams = []; $headerParams = []; @@ -19152,18 +19076,18 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app $queryParams['skip'] = $skip; } // query params - if (is_array($rangeStart)) { - $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); } - if ($rangeStart !== null) { - $queryParams['rangeStart'] = $rangeStart; + if ($sort !== null) { + $queryParams['sort'] = $sort; } // query params - if (is_array($rangeEnd)) { - $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + if (is_array($campaignState)) { + $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + if ($campaignState !== null) { + $queryParams['campaignState'] = $campaignState; } @@ -19175,17 +19099,12 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app $resourcePath ); } - // path params - if ($customerId !== null) { - $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), - $resourcePath - ); - } // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -19194,7 +19113,7 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -19227,6 +19146,11 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -19246,7 +19170,7 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -19254,54 +19178,48 @@ protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $app } /** - * Operation getCustomerActivityReportsWithoutTotalCount + * Operation getCampaignTemplates * - * Get Activity Reports for Application Customers + * List campaign templates * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) + * @param int $userId Filter results by user ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20019 + * @return \TalonOne\Client\Model\InlineResponse20010 */ - public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize = null, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) + public function getCampaignTemplates($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - list($response) = $this->getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + list($response) = $this->getCampaignTemplatesWithHttpInfo($pageSize, $skip, $sort, $state, $name, $tags, $userId); return $response; } /** - * Operation getCustomerActivityReportsWithoutTotalCountWithHttpInfo + * Operation getCampaignTemplatesWithHttpInfo * - * Get Activity Reports for Application Customers + * List campaign templates * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) + * @param int $userId Filter results by user ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20019, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20010, 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 getCampaignTemplatesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $request = $this->getCampaignTemplatesRequest($pageSize, $skip, $sort, $state, $name, $tags, $userId); try { $options = $this->createHttpClientOption(); @@ -19334,20 +19252,20 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20019' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20010' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20019', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20010', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20019'; + $returnType = '\TalonOne\Client\Model\InlineResponse20010'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -19366,7 +19284,7 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20019', + '\TalonOne\Client\Model\InlineResponse20010', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -19377,27 +19295,24 @@ public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeSt } /** - * Operation getCustomerActivityReportsWithoutTotalCountAsync + * Operation getCampaignTemplatesAsync * - * Get Activity Reports for Application Customers + * List campaign templates * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) + * @param int $userId Filter results by user ID. (optional) * * @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 getCampaignTemplatesAsync($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - return $this->getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) + return $this->getCampaignTemplatesAsyncWithHttpInfo($pageSize, $skip, $sort, $state, $name, $tags, $userId) ->then( function ($response) { return $response[0]; @@ -19406,28 +19321,25 @@ function ($response) { } /** - * Operation getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo + * Operation getCampaignTemplatesAsyncWithHttpInfo * - * Get Activity Reports for Application Customers + * List campaign templates * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) + * @param int $userId Filter results by user ID. (optional) * * @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 getCampaignTemplatesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20019'; - $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); + $returnType = '\TalonOne\Client\Model\InlineResponse20010'; + $request = $this->getCampaignTemplatesRequest($pageSize, $skip, $sort, $state, $name, $tags, $userId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19464,51 +19376,30 @@ function ($exception) { } /** - * Create request for operation 'getCustomerActivityReportsWithoutTotalCount' + * Create request for operation 'getCampaignTemplates' * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 Filter results performing an exact matching against the profile integration identifier. (optional) - * @param string $campaignName Only return reports matching the campaignName (optional) - * @param string $advocateName Only return reports matching the current customer referrer name (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $state Filter results by the state of the campaign template. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign template. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign template. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values. (optional) + * @param int $userId Filter results by user ID. (optional) * * @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 getCampaignTemplatesRequest($pageSize = 1000, $skip = null, $sort = null, $state = null, $name = null, $tags = null, $userId = 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' - ); - } - // verify the required parameter 'rangeEnd' is set - if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $rangeEnd when calling getCustomerActivityReportsWithoutTotalCount' - ); - } - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCustomerActivityReportsWithoutTotalCount' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignTemplates, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaignTemplates, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/no_total'; + $resourcePath = '/v1/campaign_templates'; $formParams = []; $queryParams = []; $headerParams = []; @@ -19537,18 +19428,11 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar $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 (is_array($state)) { + $state = ObjectSerializer::serializeCollection($state, '', true); } - if ($rangeEnd !== null) { - $queryParams['rangeEnd'] = $rangeEnd; + if ($state !== null) { + $queryParams['state'] = $state; } // query params if (is_array($name)) { @@ -19558,36 +19442,21 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar $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 (is_array($tags)) { + $tags = ObjectSerializer::serializeCollection($tags, '', true); } - if ($campaignName !== null) { - $queryParams['campaignName'] = $campaignName; + if ($tags !== null) { + $queryParams['tags'] = $tags; } // query params - if (is_array($advocateName)) { - $advocateName = ObjectSerializer::serializeCollection($advocateName, '', true); + if (is_array($userId)) { + $userId = ObjectSerializer::serializeCollection($userId, '', true); } - if ($advocateName !== null) { - $queryParams['advocateName'] = $advocateName; + if ($userId !== null) { + $queryParams['userId'] = $userId; } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -19632,6 +19501,11 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -19659,44 +19533,56 @@ protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStar } /** - * Operation getCustomerAnalytics + * Operation getCampaigns * - * Get customer's analytics report + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CustomerAnalytics + * @return \TalonOne\Client\Model\InlineResponse2004|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCustomerAnalytics($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCampaigns($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) { - list($response) = $this->getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort); + list($response) = $this->getCampaignsWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); return $response; } /** - * Operation getCustomerAnalyticsWithHttpInfo + * Operation getCampaignsWithHttpInfo * - * Get customer's analytics report + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\CustomerAnalytics, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2004|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCampaignsWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) { - $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); + $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); try { $options = $this->createHttpClientOption(); @@ -19729,20 +19615,32 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerAnalytics' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2004' === '\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\InlineResponse2004', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -19761,7 +19659,15 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerAnalytics', + '\TalonOne\Client\Model\InlineResponse2004', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -19772,22 +19678,28 @@ public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $p } /** - * Operation getCustomerAnalyticsAsync + * Operation getCampaignsAsync * - * Get customer's analytics report + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerAnalyticsAsync($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCampaignsAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) { - return $this->getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort) + return $this->getCampaignsAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId) ->then( function ($response) { return $response[0]; @@ -19796,23 +19708,29 @@ function ($response) { } /** - * Operation getCustomerAnalyticsAsyncWithHttpInfo + * Operation getCampaignsAsyncWithHttpInfo * - * Get customer's analytics report + * List campaigns * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + public function getCampaignsAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) { - $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; - $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $request = $this->getCampaignsRequest($applicationId, $pageSize, $skip, $sort, $campaignState, $name, $tags, $createdBefore, $createdAfter, $campaignGroupId, $templateId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -19849,40 +19767,40 @@ function ($exception) { } /** - * Create request for operation 'getCustomerAnalytics' + * Create request for operation 'getCampaigns' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (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 $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param string $name Filter results performing case-insensitive matching against the name of the campaign. (optional) + * @param string $tags Filter results performing case-insensitive matching against the tags of the campaign. When used in conjunction with the \"name\" query parameter, a logical OR will be performed to search both tags and name for the provided values (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param int $campaignGroupId Filter results to campaigns owned by the specified campaign group ID. (optional) + * @param int $templateId The ID of the Campaign Template this Campaign was created from. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize = null, $skip = null, $sort = null) + protected function getCampaignsRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $campaignState = null, $name = null, $tags = null, $createdBefore = null, $createdAfter = null, $campaignGroupId = null, $templateId = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getCustomerAnalytics' - ); - } - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerAnalytics' + 'Missing the required parameter $applicationId when calling getCampaigns' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCampaigns, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/customers/{customerId}/analytics'; + $resourcePath = '/v1/applications/{applicationId}/campaigns'; $formParams = []; $queryParams = []; $headerParams = []; @@ -19910,6 +19828,55 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag if ($sort !== null) { $queryParams['sort'] = $sort; } + // query params + if (is_array($campaignState)) { + $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); + } + if ($campaignState !== null) { + $queryParams['campaignState'] = $campaignState; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($tags)) { + $tags = ObjectSerializer::serializeCollection($tags, '', true); + } + if ($tags !== null) { + $queryParams['tags'] = $tags; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($campaignGroupId)) { + $campaignGroupId = ObjectSerializer::serializeCollection($campaignGroupId, '', true); + } + if ($campaignGroupId !== null) { + $queryParams['campaignGroupId'] = $campaignGroupId; + } + // query params + if (is_array($templateId)) { + $templateId = ObjectSerializer::serializeCollection($templateId, '', true); + } + if ($templateId !== null) { + $queryParams['templateId'] = $templateId; + } // path params @@ -19920,14 +19887,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; @@ -19972,6 +19931,11 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -19999,36 +19963,56 @@ protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pag } /** - * Operation getCustomerProfile + * Operation getChanges * - * Get customer profile + * Get audit logs for an account * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\CustomerProfile + * @return \TalonOne\Client\Model\InlineResponse20038 */ - public function getCustomerProfile($customerId) + public function getChanges($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - list($response) = $this->getCustomerProfileWithHttpInfo($customerId); + list($response) = $this->getChangesWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); return $response; } /** - * Operation getCustomerProfileWithHttpInfo + * Operation getChangesWithHttpInfo * - * Get customer profile + * Get audit logs for an account * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\CustomerProfile, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20038, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerProfileWithHttpInfo($customerId) + public function getChangesWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - $request = $this->getCustomerProfileRequest($customerId); + $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); try { $options = $this->createHttpClientOption(); @@ -20061,20 +20045,20 @@ public function getCustomerProfileWithHttpInfo($customerId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\CustomerProfile' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20038' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerProfile', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20038', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\CustomerProfile'; + $returnType = '\TalonOne\Client\Model\InlineResponse20038'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20093,7 +20077,7 @@ public function getCustomerProfileWithHttpInfo($customerId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\CustomerProfile', + '\TalonOne\Client\Model\InlineResponse20038', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -20104,18 +20088,28 @@ public function getCustomerProfileWithHttpInfo($customerId) } /** - * Operation getCustomerProfileAsync + * Operation getChangesAsync * - * Get customer profile + * Get audit logs for an account * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfileAsync($customerId) + public function getChangesAsync($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - return $this->getCustomerProfileAsyncWithHttpInfo($customerId) + return $this->getChangesAsyncWithHttpInfo($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld) ->then( function ($response) { return $response[0]; @@ -20124,19 +20118,29 @@ function ($response) { } /** - * Operation getCustomerProfileAsyncWithHttpInfo + * Operation getChangesAsyncWithHttpInfo * - * Get customer profile + * Get audit logs for an account * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfileAsyncWithHttpInfo($customerId) + public function getChangesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - $returnType = '\TalonOne\Client\Model\CustomerProfile'; - $request = $this->getCustomerProfileRequest($customerId); + $returnType = '\TalonOne\Client\Model\InlineResponse20038'; + $request = $this->getChangesRequest($pageSize, $skip, $sort, $applicationId, $entityPath, $userId, $createdBefore, $createdAfter, $withTotalResultSize, $managementKeyId, $includeOld); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20173,39 +20177,119 @@ function ($exception) { } /** - * Create request for operation 'getCustomerProfile' + * Create request for operation 'getChanges' * - * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](/#tag/Customer-data/operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param string $entityPath Filter results on a case insensitive matching of the url path of the entity (optional) + * @param int $userId Filter results by user ID. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param int $managementKeyId Filter results that match the given management key ID. (optional) + * @param bool $includeOld When this flag is set to false, the state without the change will not be returned. The default value is true. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerProfileRequest($customerId) + protected function getChangesRequest($pageSize = 1000, $skip = null, $sort = null, $applicationId = null, $entityPath = null, $userId = null, $createdBefore = null, $createdAfter = null, $withTotalResultSize = null, $managementKeyId = null, $includeOld = null) { - // verify the required parameter 'customerId' is set - if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $customerId when calling getCustomerProfile' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getChanges, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/customers/{customerId}'; + + $resourcePath = '/v1/changes'; $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($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); + } + if ($applicationId !== null) { + $queryParams['applicationId'] = $applicationId; + } + // query params + if (is_array($entityPath)) { + $entityPath = ObjectSerializer::serializeCollection($entityPath, '', true); + } + if ($entityPath !== null) { + $queryParams['entityPath'] = $entityPath; + } + // query params + if (is_array($userId)) { + $userId = ObjectSerializer::serializeCollection($userId, '', true); + } + if ($userId !== null) { + $queryParams['userId'] = $userId; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($managementKeyId)) { + $managementKeyId = ObjectSerializer::serializeCollection($managementKeyId, '', true); + } + if ($managementKeyId !== null) { + $queryParams['managementKeyId'] = $managementKeyId; + } + // query params + if (is_array($includeOld)) { + $includeOld = ObjectSerializer::serializeCollection($includeOld, '', true); + } + if ($includeOld !== null) { + $queryParams['includeOld'] = $includeOld; + } - // path params - if ($customerId !== null) { - $resourcePath = str_replace( - '{' . 'customerId' . '}', - ObjectSerializer::toPathValue($customerId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -20250,6 +20334,11 @@ protected function getCustomerProfileRequest($customerId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -20277,38 +20366,40 @@ protected function getCustomerProfileRequest($customerId) } /** - * Operation getCustomerProfiles + * Operation getCollection * - * List customer profiles + * Get collection * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20018 + * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCustomerProfiles($pageSize = null, $skip = null) + public function getCollection($applicationId, $campaignId, $collectionId) { - list($response) = $this->getCustomerProfilesWithHttpInfo($pageSize, $skip); + list($response) = $this->getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId); return $response; } /** - * Operation getCustomerProfilesWithHttpInfo + * Operation getCollectionWithHttpInfo * - * List customer profiles + * Get collection * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20018, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) + public function getCollectionWithHttpInfo($applicationId, $campaignId, $collectionId) { - $request = $this->getCustomerProfilesRequest($pageSize, $skip); + $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); try { $options = $this->createHttpClientOption(); @@ -20341,20 +20432,32 @@ public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20018' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20018', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20018'; + $returnType = '\TalonOne\Client\Model\Collection'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20373,7 +20476,15 @@ public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20018', + '\TalonOne\Client\Model\Collection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -20384,19 +20495,20 @@ public function getCustomerProfilesWithHttpInfo($pageSize = null, $skip = null) } /** - * Operation getCustomerProfilesAsync + * Operation getCollectionAsync * - * List customer profiles + * Get collection * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfilesAsync($pageSize = null, $skip = null) + public function getCollectionAsync($applicationId, $campaignId, $collectionId) { - return $this->getCustomerProfilesAsyncWithHttpInfo($pageSize, $skip) + return $this->getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) ->then( function ($response) { return $response[0]; @@ -20405,20 +20517,21 @@ function ($response) { } /** - * Operation getCustomerProfilesAsyncWithHttpInfo + * Operation getCollectionAsyncWithHttpInfo * - * List customer profiles + * Get collection * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomerProfilesAsyncWithHttpInfo($pageSize = null, $skip = null) + public function getCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20018'; - $request = $this->getCustomerProfilesRequest($pageSize, $skip); + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->getCollectionRequest($applicationId, $campaignId, $collectionId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20455,48 +20568,70 @@ function ($exception) { } /** - * Create request for operation 'getCustomerProfiles' + * Create request for operation 'getCollection' * - * @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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomerProfilesRequest($pageSize = null, $skip = null) + protected function getCollectionRequest($applicationId, $campaignId, $collectionId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be smaller than or equal to 1000.'); + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getCollection' + ); } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be bigger than or equal to 1.'); + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getCollection' + ); + } + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling getCollection' + ); } - - $resourcePath = '/v1/customers/no_total'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); } - if ($skip !== null) { - $queryParams['skip'] = $skip; + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); } - - // body params $_tempBody = null; @@ -20540,6 +20675,11 @@ protected function getCustomerProfilesRequest($pageSize = null, $skip = null) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -20567,40 +20707,40 @@ protected function getCustomerProfilesRequest($pageSize = null, $skip = null) } /** - * Operation getCustomersByAttributes + * Operation getCollectionItems * - * List customer profiles matching the given attributes + * Get collection items * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20018 + * @return \TalonOne\Client\Model\InlineResponse20016|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getCustomersByAttributes($body, $pageSize = null, $skip = null) + public function getCollectionItems($collectionId, $pageSize = 1000, $skip = null) { - list($response) = $this->getCustomersByAttributesWithHttpInfo($body, $pageSize, $skip); + list($response) = $this->getCollectionItemsWithHttpInfo($collectionId, $pageSize, $skip); return $response; } /** - * Operation getCustomersByAttributesWithHttpInfo + * Operation getCollectionItemsWithHttpInfo * - * List customer profiles matching the given attributes + * Get collection items * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20018, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20016|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $skip = null) + public function getCollectionItemsWithHttpInfo($collectionId, $pageSize = 1000, $skip = null) { - $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip); + $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -20633,20 +20773,32 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $s $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20018' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20016' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20018', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20016', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20018'; + $returnType = '\TalonOne\Client\Model\InlineResponse20016'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20665,7 +20817,15 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $s case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20018', + '\TalonOne\Client\Model\InlineResponse20016', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -20676,20 +20836,20 @@ public function getCustomersByAttributesWithHttpInfo($body, $pageSize = null, $s } /** - * Operation getCustomersByAttributesAsync + * Operation getCollectionItemsAsync * - * List customer profiles matching the given attributes + * Get collection items * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomersByAttributesAsync($body, $pageSize = null, $skip = null) + public function getCollectionItemsAsync($collectionId, $pageSize = 1000, $skip = null) { - return $this->getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize, $skip) + return $this->getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -20698,21 +20858,21 @@ function ($response) { } /** - * Operation getCustomersByAttributesAsyncWithHttpInfo + * Operation getCollectionItemsAsyncWithHttpInfo * - * List customer profiles matching the given attributes + * Get collection items * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize = null, $skip = null) + public function getCollectionItemsAsyncWithHttpInfo($collectionId, $pageSize = 1000, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20018'; - $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\InlineResponse20016'; + $request = $this->getCollectionItemsRequest($collectionId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -20749,32 +20909,32 @@ function ($exception) { } /** - * Create request for operation 'getCustomersByAttributes' + * Create request for operation 'getCollectionItems' * - * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $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 $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getCustomersByAttributesRequest($body, $pageSize = null, $skip = null) + protected function getCollectionItemsRequest($collectionId, $pageSize = 1000, $skip = null) { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling getCustomersByAttributes' + 'Missing the required parameter $collectionId when calling getCollectionItems' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCollectionItems, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/customer_search/no_total'; + $resourcePath = '/v1/collections/{collectionId}/items'; $formParams = []; $queryParams = []; $headerParams = []; @@ -20797,12 +20957,17 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -20811,7 +20976,7 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -20844,6 +21009,11 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -20863,7 +21033,7 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -20871,44 +21041,62 @@ protected function getCustomersByAttributesRequest($body, $pageSize = null, $ski } /** - * Operation getEventTypes + * Operation getCouponsWithoutTotalCount * - * List event types + * List coupons * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20030 + * @return \TalonOne\Client\Model\InlineResponse2008 */ - public function getEventTypes($name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCouponsWithoutTotalCount($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - list($response) = $this->getEventTypesWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort); + list($response) = $this->getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); return $response; } /** - * Operation getEventTypesWithHttpInfo + * Operation getCouponsWithoutTotalCountWithHttpInfo * - * List event types + * List coupons * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20030, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) */ - public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCouponsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); + $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); try { $options = $this->createHttpClientOption(); @@ -20941,20 +21129,20 @@ public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = fa $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20030' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20030', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20030'; + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -20973,7 +21161,7 @@ public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = fa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20030', + '\TalonOne\Client\Model\InlineResponse2008', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -20984,22 +21172,31 @@ public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = fa } /** - * Operation getEventTypesAsync + * Operation getCouponsWithoutTotalCountAsync * - * List event types + * List coupons * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventTypesAsync($name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCouponsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - return $this->getEventTypesAsyncWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort) + return $this->getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch) ->then( function ($response) { return $response[0]; @@ -21008,23 +21205,32 @@ function ($response) { } /** - * Operation getEventTypesAsyncWithHttpInfo + * Operation getCouponsWithoutTotalCountAsyncWithHttpInfo * - * List event types + * List coupons * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEventTypesAsyncWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + public function getCouponsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { - $returnType = '\TalonOne\Client\Model\InlineResponse20030'; - $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $request = $this->getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21061,48 +21267,55 @@ function ($exception) { } /** - * Create request for operation 'getEventTypes' + * Create request for operation 'getCouponsWithoutTotalCount' * - * @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 $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getEventTypesRequest($name = null, $includeOldVersions = false, $pageSize = null, $skip = null, $sort = null) + protected function getCouponsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getCouponsWithoutTotalCount' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling getCouponsWithoutTotalCount' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCouponsWithoutTotalCount, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/event_types'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } - // query params - if (is_array($includeOldVersions)) { - $includeOldVersions = ObjectSerializer::serializeCollection($includeOldVersions, '', true); - } - if ($includeOldVersions !== null) { - $queryParams['includeOldVersions'] = $includeOldVersions; - } // query params if (is_array($pageSize)) { $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); @@ -21124,8 +21337,87 @@ protected function getEventTypesRequest($name = null, $includeOldVersions = fals if ($sort !== null) { $queryParams['sort'] = $sort; } + // query params + if (is_array($value)) { + $value = ObjectSerializer::serializeCollection($value, '', true); + } + if ($value !== null) { + $queryParams['value'] = $value; + } + // query params + if (is_array($createdBefore)) { + $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); + } + if ($createdBefore !== null) { + $queryParams['createdBefore'] = $createdBefore; + } + // query params + if (is_array($createdAfter)) { + $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); + } + if ($createdAfter !== null) { + $queryParams['createdAfter'] = $createdAfter; + } + // query params + if (is_array($valid)) { + $valid = ObjectSerializer::serializeCollection($valid, '', true); + } + if ($valid !== null) { + $queryParams['valid'] = $valid; + } + // query params + if (is_array($usable)) { + $usable = ObjectSerializer::serializeCollection($usable, '', true); + } + if ($usable !== null) { + $queryParams['usable'] = $usable; + } + // query params + if (is_array($referralId)) { + $referralId = ObjectSerializer::serializeCollection($referralId, '', true); + } + if ($referralId !== null) { + $queryParams['referralId'] = $referralId; + } + // query params + if (is_array($recipientIntegrationId)) { + $recipientIntegrationId = ObjectSerializer::serializeCollection($recipientIntegrationId, '', true); + } + if ($recipientIntegrationId !== null) { + $queryParams['recipientIntegrationId'] = $recipientIntegrationId; + } + // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + // query params + if (is_array($exactMatch)) { + $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); + } + if ($exactMatch !== null) { + $queryParams['exactMatch'] = $exactMatch; + } + // path params + 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; @@ -21170,6 +21462,11 @@ protected function getEventTypesRequest($name = null, $includeOldVersions = fals } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -21197,44 +21494,46 @@ protected function getEventTypesRequest($name = null, $includeOldVersions = fals } /** - * Operation getExports + * Operation getCustomerActivityReport * - * Get exports + * Get customer's activity report * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20033 + * @return \TalonOne\Client\Model\CustomerActivityReport */ - public function getExports($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomerActivityReport($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - list($response) = $this->getExportsWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity); + list($response) = $this->getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); return $response; } /** - * Operation getExportsWithHttpInfo + * Operation getCustomerActivityReportWithHttpInfo * - * Get exports + * Get customer's activity report * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20033, 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 getExportsWithHttpInfo($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomerActivityReportWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); + $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -21267,20 +21566,20 @@ public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicat $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20033' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerActivityReport' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20033', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerActivityReport', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20033'; + $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21299,7 +21598,7 @@ public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20033', + '\TalonOne\Client\Model\CustomerActivityReport', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21310,22 +21609,23 @@ public function getExportsWithHttpInfo($pageSize = null, $skip = null, $applicat } /** - * Operation getExportsAsync + * Operation getCustomerActivityReportAsync * - * Get exports + * Get customer's activity report * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getExportsAsync($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomerActivityReportAsync($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - return $this->getExportsAsyncWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity) + return $this->getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -21334,23 +21634,24 @@ function ($response) { } /** - * Operation getExportsAsyncWithHttpInfo + * Operation getCustomerActivityReportAsyncWithHttpInfo * - * Get exports + * Get customer's activity report * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getExportsAsyncWithHttpInfo($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + public function getCustomerActivityReportAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20033'; - $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); + $returnType = '\TalonOne\Client\Model\CustomerActivityReport'; + $request = $this->getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21387,28 +21688,53 @@ function ($exception) { } /** - * Create request for operation 'getExports' + * Create request for operation 'getCustomerActivityReport' * - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) - * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getExportsRequest($pageSize = null, $skip = null, $applicationId = null, $campaignId = null, $entity = null) + protected function getCustomerActivityReportRequest($rangeStart, $rangeEnd, $applicationId, $customerId, $pageSize = 1000, $skip = null) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeStart when calling getCustomerActivityReport' + ); + } + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $rangeEnd when calling getCustomerActivityReport' + ); + } + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling 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' + ); + } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReport, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/exports'; + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -21430,28 +21756,37 @@ 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 (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; } // query params - if (is_array($entity)) { - $entity = ObjectSerializer::serializeCollection($entity, '', true); + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); } - if ($entity !== null) { - $queryParams['entity'] = $entity; + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -21496,6 +21831,11 @@ protected function getExportsRequest($pageSize = null, $skip = null, $applicatio } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -21523,38 +21863,54 @@ protected function getExportsRequest($pageSize = null, $skip = null, $applicatio } /** - * Operation getLoyaltyPoints + * Operation getCustomerActivityReportsWithoutTotalCount * - * Get the Loyalty Ledger for this integrationID + * Get Activity Reports for Application Customers * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyLedger + * @return \TalonOne\Client\Model\InlineResponse20025 */ - public function getLoyaltyPoints($loyaltyProgramId, $integrationId) + public function getCustomerActivityReportsWithoutTotalCount($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - list($response) = $this->getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId); + list($response) = $this->getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $response; } /** - * Operation getLoyaltyPointsWithHttpInfo + * Operation getCustomerActivityReportsWithoutTotalCountWithHttpInfo * - * Get the Loyalty Ledger for this integrationID + * Get Activity Reports for Application Customers * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyLedger, 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 getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) + public function getCustomerActivityReportsWithoutTotalCountWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); + $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); try { $options = $this->createHttpClientOption(); @@ -21587,20 +21943,20 @@ public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyLedger' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20025' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyLedger', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20025', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; + $returnType = '\TalonOne\Client\Model\InlineResponse20025'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21619,7 +21975,7 @@ public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyLedger', + '\TalonOne\Client\Model\InlineResponse20025', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21630,19 +21986,27 @@ public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) } /** - * Operation getLoyaltyPointsAsync + * Operation getCustomerActivityReportsWithoutTotalCountAsync * - * Get the Loyalty Ledger for this integrationID + * Get Activity Reports for Application Customers * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyPointsAsync($loyaltyProgramId, $integrationId) + public function getCustomerActivityReportsWithoutTotalCountAsync($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - return $this->getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) + return $this->getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName) ->then( function ($response) { return $response[0]; @@ -21651,20 +22015,28 @@ function ($response) { } /** - * Operation getLoyaltyPointsAsyncWithHttpInfo + * Operation getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo * - * Get the Loyalty Ledger for this integrationID + * Get Activity Reports for Application Customers * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) + public function getCustomerActivityReportsWithoutTotalCountAsyncWithHttpInfo($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; - $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20025'; + $request = $this->getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize, $skip, $sort, $name, $integrationId, $campaignName, $advocateName); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21701,83 +22073,159 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyPoints' + * Create request for operation 'getCustomerActivityReportsWithoutTotalCount' * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) + * @param \DateTime $rangeStart Only return results from after this timestamp. This must be an RFC3339 timestamp string. (required) + * @param \DateTime $rangeEnd Only return results from before this timestamp. This must be an RFC3339 timestamp string. (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $name Only return reports matching the customer name (optional) + * @param string $integrationId Filter results performing an exact matching against the profile integration identifier. (optional) + * @param string $campaignName Only return reports matching the campaignName (optional) + * @param string $advocateName Only return reports matching the current customer referrer name (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) + protected function getCustomerActivityReportsWithoutTotalCountRequest($rangeStart, $rangeEnd, $applicationId, $pageSize = 1000, $skip = null, $sort = null, $name = null, $integrationId = null, $campaignName = null, $advocateName = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'rangeStart' is set + if ($rangeStart === null || (is_array($rangeStart) && count($rangeStart) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyPoints' + 'Missing the required parameter $rangeStart when calling getCustomerActivityReportsWithoutTotalCount' ); } - // verify the required parameter 'integrationId' is set - if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + // verify the required parameter 'rangeEnd' is set + if ($rangeEnd === null || (is_array($rangeEnd) && count($rangeEnd) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $integrationId when calling getLoyaltyPoints' + 'Missing the required parameter $rangeEnd when calling getCustomerActivityReportsWithoutTotalCount' + ); + } + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getCustomerActivityReportsWithoutTotalCount' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerActivityReportsWithoutTotalCount, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}'; + + $resourcePath = '/v1/applications/{applicationId}/customer_activity_reports/no_total'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); } - // path params - if ($integrationId !== null) { - $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), - $resourcePath - ); + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; } - - // body params - $_tempBody = null; - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - ['application/json'], - [] - ); + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); } - - // 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, + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($rangeStart)) { + $rangeStart = ObjectSerializer::serializeCollection($rangeStart, '', true); + } + if ($rangeStart !== null) { + $queryParams['rangeStart'] = $rangeStart; + } + // query params + if (is_array($rangeEnd)) { + $rangeEnd = ObjectSerializer::serializeCollection($rangeEnd, '', true); + } + if ($rangeEnd !== null) { + $queryParams['rangeEnd'] = $rangeEnd; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($integrationId)) { + $integrationId = ObjectSerializer::serializeCollection($integrationId, '', true); + } + if ($integrationId !== null) { + $queryParams['integrationId'] = $integrationId; + } + // query params + if (is_array($campaignName)) { + $campaignName = ObjectSerializer::serializeCollection($campaignName, '', true); + } + if ($campaignName !== null) { + $queryParams['campaignName'] = $campaignName; + } + // query params + if (is_array($advocateName)) { + $advocateName = ObjectSerializer::serializeCollection($advocateName, '', true); + } + if ($advocateName !== null) { + $queryParams['advocateName'] = $advocateName; + } + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, 'contents' => $formParamValue ]; } @@ -21793,6 +22241,11 @@ protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -21820,36 +22273,44 @@ protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) } /** - * Operation getLoyaltyProgram + * Operation getCustomerAnalytics * - * Get loyalty program + * Get customer's analytics report * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyProgram + * @return \TalonOne\Client\Model\CustomerAnalytics */ - public function getLoyaltyProgram($loyaltyProgramId) + public function getCustomerAnalytics($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getLoyaltyProgramWithHttpInfo($loyaltyProgramId); + list($response) = $this->getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort); return $response; } /** - * Operation getLoyaltyProgramWithHttpInfo + * Operation getCustomerAnalyticsWithHttpInfo * - * Get loyalty program + * Get customer's analytics report * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyProgram, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CustomerAnalytics, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) + public function getCustomerAnalyticsWithHttpInfo($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); + $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -21882,20 +22343,20 @@ public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyProgram' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerAnalytics' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyProgram', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerAnalytics', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; + $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -21914,7 +22375,7 @@ public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyProgram', + '\TalonOne\Client\Model\CustomerAnalytics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -21925,18 +22386,22 @@ public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) } /** - * Operation getLoyaltyProgramAsync + * Operation getCustomerAnalyticsAsync * - * Get loyalty program + * Get customer's analytics report * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramAsync($loyaltyProgramId) + public function getCustomerAnalyticsAsync($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) + return $this->getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -21945,19 +22410,23 @@ function ($response) { } /** - * Operation getLoyaltyProgramAsyncWithHttpInfo + * Operation getCustomerAnalyticsAsyncWithHttpInfo * - * Get loyalty program + * Get customer's analytics report * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) + public function getCustomerAnalyticsAsyncWithHttpInfo($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; - $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); + $returnType = '\TalonOne\Client\Model\CustomerAnalytics'; + $request = $this->getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -21994,36 +22463,82 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyProgram' + * Create request for operation 'getCustomerAnalytics' * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyProgramRequest($loyaltyProgramId) + protected function getCustomerAnalyticsRequest($applicationId, $customerId, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgram' + 'Missing the required parameter $applicationId when calling getCustomerAnalytics' + ); + } + // verify the required parameter 'customerId' is set + if ($customerId === null || (is_array($customerId) && count($customerId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $customerId when calling getCustomerAnalytics' ); } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerAnalytics, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}'; + + $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 ($loyaltyProgramId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), $resourcePath ); } @@ -22071,6 +22586,11 @@ protected function getLoyaltyProgramRequest($loyaltyProgramId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -22098,34 +22618,36 @@ protected function getLoyaltyProgramRequest($loyaltyProgramId) } /** - * Operation getLoyaltyPrograms + * Operation getCustomerProfile * - * List loyalty programs + * Get customer profile * + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2009 + * @return \TalonOne\Client\Model\CustomerProfile */ - public function getLoyaltyPrograms() + public function getCustomerProfile($customerId) { - list($response) = $this->getLoyaltyProgramsWithHttpInfo(); + list($response) = $this->getCustomerProfileWithHttpInfo($customerId); return $response; } /** - * Operation getLoyaltyProgramsWithHttpInfo + * Operation getCustomerProfileWithHttpInfo * - * List loyalty programs + * Get customer profile * + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\CustomerProfile, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyProgramsWithHttpInfo() + public function getCustomerProfileWithHttpInfo($customerId) { - $request = $this->getLoyaltyProgramsRequest(); + $request = $this->getCustomerProfileRequest($customerId); try { $options = $this->createHttpClientOption(); @@ -22158,20 +22680,20 @@ public function getLoyaltyProgramsWithHttpInfo() $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2009' === '\SplFileObject') { + if ('\TalonOne\Client\Model\CustomerProfile' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2009', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\CustomerProfile', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2009'; + $returnType = '\TalonOne\Client\Model\CustomerProfile'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22190,7 +22712,7 @@ public function getLoyaltyProgramsWithHttpInfo() case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2009', + '\TalonOne\Client\Model\CustomerProfile', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22201,17 +22723,18 @@ public function getLoyaltyProgramsWithHttpInfo() } /** - * Operation getLoyaltyProgramsAsync + * Operation getCustomerProfileAsync * - * List loyalty programs + * Get customer profile * + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramsAsync() + public function getCustomerProfileAsync($customerId) { - return $this->getLoyaltyProgramsAsyncWithHttpInfo() + return $this->getCustomerProfileAsyncWithHttpInfo($customerId) ->then( function ($response) { return $response[0]; @@ -22220,18 +22743,19 @@ function ($response) { } /** - * Operation getLoyaltyProgramsAsyncWithHttpInfo + * Operation getCustomerProfileAsyncWithHttpInfo * - * List loyalty programs + * Get customer profile * + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyProgramsAsyncWithHttpInfo() + public function getCustomerProfileAsyncWithHttpInfo($customerId) { - $returnType = '\TalonOne\Client\Model\InlineResponse2009'; - $request = $this->getLoyaltyProgramsRequest(); + $returnType = '\TalonOne\Client\Model\CustomerProfile'; + $request = $this->getCustomerProfileRequest($customerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22268,16 +22792,23 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyPrograms' + * Create request for operation 'getCustomerProfile' * + * @param int $customerId The value of the `id` property of a customer profile. Get it with the [List Application's customers](https://docs.talon.one/management-api#operation/getApplicationCustomers) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyProgramsRequest() + 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/loyalty_programs'; + $resourcePath = '/v1/customers/{customerId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -22286,6 +22817,14 @@ protected function getLoyaltyProgramsRequest() + // path params + if ($customerId !== null) { + $resourcePath = str_replace( + '{' . 'customerId' . '}', + ObjectSerializer::toPathValue($customerId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -22330,6 +22869,11 @@ protected function getLoyaltyProgramsRequest() } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -22357,36 +22901,40 @@ protected function getLoyaltyProgramsRequest() } /** - * Operation getLoyaltyStatistics + * Operation getCustomerProfiles * - * Get loyalty program statistics by loyalty program ID + * List customer profiles * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\LoyaltyStatistics + * @return \TalonOne\Client\Model\InlineResponse20024 */ - public function getLoyaltyStatistics($loyaltyProgramId) + public function getCustomerProfiles($pageSize = 1000, $skip = null, $sandbox = false) { - list($response) = $this->getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId); + list($response) = $this->getCustomerProfilesWithHttpInfo($pageSize, $skip, $sandbox); return $response; } /** - * Operation getLoyaltyStatisticsWithHttpInfo + * Operation getCustomerProfilesWithHttpInfo * - * Get loyalty program statistics by loyalty program ID + * List customer profiles * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\LoyaltyStatistics, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20024, HTTP status code, HTTP response headers (array of strings) */ - public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) + public function getCustomerProfilesWithHttpInfo($pageSize = 1000, $skip = null, $sandbox = false) { - $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); + $request = $this->getCustomerProfilesRequest($pageSize, $skip, $sandbox); try { $options = $this->createHttpClientOption(); @@ -22419,20 +22967,20 @@ public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\LoyaltyStatistics' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20024' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyStatistics', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20024', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\LoyaltyStatistics'; + $returnType = '\TalonOne\Client\Model\InlineResponse20024'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22451,7 +22999,7 @@ public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\LoyaltyStatistics', + '\TalonOne\Client\Model\InlineResponse20024', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22462,18 +23010,20 @@ public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) } /** - * Operation getLoyaltyStatisticsAsync + * Operation getCustomerProfilesAsync * - * Get loyalty program statistics by loyalty program ID + * List customer profiles * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyStatisticsAsync($loyaltyProgramId) + public function getCustomerProfilesAsync($pageSize = 1000, $skip = null, $sandbox = false) { - return $this->getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) + return $this->getCustomerProfilesAsyncWithHttpInfo($pageSize, $skip, $sandbox) ->then( function ($response) { return $response[0]; @@ -22482,19 +23032,21 @@ function ($response) { } /** - * Operation getLoyaltyStatisticsAsyncWithHttpInfo + * Operation getCustomerProfilesAsyncWithHttpInfo * - * Get loyalty program statistics by loyalty program ID + * List customer profiles * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) + public function getCustomerProfilesAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sandbox = false) { - $returnType = '\TalonOne\Client\Model\LoyaltyStatistics'; - $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); + $returnType = '\TalonOne\Client\Model\InlineResponse20024'; + $request = $this->getCustomerProfilesRequest($pageSize, $skip, $sandbox); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22531,39 +23083,55 @@ function ($exception) { } /** - * Create request for operation 'getLoyaltyStatistics' + * Create request for operation 'getCustomerProfiles' * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getLoyaltyStatisticsRequest($loyaltyProgramId) + protected function getCustomerProfilesRequest($pageSize = 1000, $skip = null, $sandbox = false) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyStatistics' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomerProfiles, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/statistics'; + + $resourcePath = '/v1/customers/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($sandbox)) { + $sandbox = ObjectSerializer::serializeCollection($sandbox, '', true); + } + if ($sandbox !== null) { + $queryParams['sandbox'] = $sandbox; + } - // path params - if ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -22608,6 +23176,11 @@ protected function getLoyaltyStatisticsRequest($loyaltyProgramId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -22635,38 +23208,42 @@ protected function getLoyaltyStatisticsRequest($loyaltyProgramId) } /** - * Operation getNotificationWebhook + * Operation getCustomersByAttributes * - * Get notification webhook + * List customer profiles matching the given attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId notificationWebhookId (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NotificationWebhook + * @return \TalonOne\Client\Model\InlineResponse20023 */ - public function getNotificationWebhook($applicationId, $notificationWebhookId) + public function getCustomersByAttributes($body, $pageSize = 1000, $skip = null, $sandbox = false) { - list($response) = $this->getNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId); + list($response) = $this->getCustomersByAttributesWithHttpInfo($body, $pageSize, $skip, $sandbox); return $response; } /** - * Operation getNotificationWebhookWithHttpInfo + * Operation getCustomersByAttributesWithHttpInfo * - * Get notification webhook + * List customer profiles matching the given attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NotificationWebhook, 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 getNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId) + public function getCustomersByAttributesWithHttpInfo($body, $pageSize = 1000, $skip = null, $sandbox = false) { - $request = $this->getNotificationWebhookRequest($applicationId, $notificationWebhookId); + $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip, $sandbox); try { $options = $this->createHttpClientOption(); @@ -22699,20 +23276,20 @@ public function getNotificationWebhookWithHttpInfo($applicationId, $notification $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\NotificationWebhook' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20023' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NotificationWebhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20023', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $returnType = '\TalonOne\Client\Model\InlineResponse20023'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -22731,7 +23308,7 @@ public function getNotificationWebhookWithHttpInfo($applicationId, $notification case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NotificationWebhook', + '\TalonOne\Client\Model\InlineResponse20023', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -22742,19 +23319,21 @@ public function getNotificationWebhookWithHttpInfo($applicationId, $notification } /** - * Operation getNotificationWebhookAsync + * Operation getCustomersByAttributesAsync * - * Get notification webhook + * List customer profiles matching the given attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhookAsync($applicationId, $notificationWebhookId) + public function getCustomersByAttributesAsync($body, $pageSize = 1000, $skip = null, $sandbox = false) { - return $this->getNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + return $this->getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize, $skip, $sandbox) ->then( function ($response) { return $response[0]; @@ -22763,20 +23342,22 @@ function ($response) { } /** - * Operation getNotificationWebhookAsyncWithHttpInfo + * Operation getCustomersByAttributesAsyncWithHttpInfo * - * Get notification webhook + * List customer profiles matching the given attributes * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) + public function getCustomersByAttributesAsyncWithHttpInfo($body, $pageSize = 1000, $skip = null, $sandbox = false) { - $returnType = '\TalonOne\Client\Model\NotificationWebhook'; - $request = $this->getNotificationWebhookRequest($applicationId, $notificationWebhookId); + $returnType = '\TalonOne\Client\Model\InlineResponse20023'; + $request = $this->getCustomersByAttributesRequest($body, $pageSize, $skip, $sandbox); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -22813,57 +23394,68 @@ function ($exception) { } /** - * Create request for operation 'getNotificationWebhook' + * Create request for operation 'getCustomersByAttributes' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) + * @param \TalonOne\Client\Model\CustomerProfileSearchQuery $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param bool $sandbox Indicates whether you are pointing to a sandbox or Live customer. (optional, default to false) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getNotificationWebhookRequest($applicationId, $notificationWebhookId) + protected function getCustomersByAttributesRequest($body, $pageSize = 1000, $skip = null, $sandbox = false) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getNotificationWebhook' + 'Missing the required parameter $body when calling getCustomersByAttributes' ); } - // verify the required parameter 'notificationWebhookId' is set - if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $notificationWebhookId when calling getNotificationWebhook' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getCustomersByAttributes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}'; + + $resourcePath = '/v1/customer_search/no_total'; $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 ($notificationWebhookId !== null) { - $resourcePath = str_replace( - '{' . 'notificationWebhookId' . '}', - ObjectSerializer::toPathValue($notificationWebhookId), - $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($sandbox)) { + $sandbox = ObjectSerializer::serializeCollection($sandbox, '', true); } + if ($sandbox !== null) { + $queryParams['sandbox'] = $sandbox; + } + + // body params $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -22872,7 +23464,7 @@ protected function getNotificationWebhookRequest($applicationId, $notificationWe } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - [] + ['application/json'] ); } @@ -22905,6 +23497,11 @@ protected function getNotificationWebhookRequest($applicationId, $notificationWe } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -22924,7 +23521,7 @@ protected function getNotificationWebhookRequest($applicationId, $notificationWe $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -22932,36 +23529,44 @@ protected function getNotificationWebhookRequest($applicationId, $notificationWe } /** - * Operation getNotificationWebhooks + * Operation getEventTypes * - * List notification webhooks + * List event types * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2004 + * @return \TalonOne\Client\Model\InlineResponse20036 */ - public function getNotificationWebhooks($applicationId) + public function getEventTypes($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->getNotificationWebhooksWithHttpInfo($applicationId); + list($response) = $this->getEventTypesWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort); return $response; } /** - * Operation getNotificationWebhooksWithHttpInfo + * Operation getEventTypesWithHttpInfo * - * List notification webhooks + * List event types * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @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\InlineResponse20036, HTTP status code, HTTP response headers (array of strings) */ - public function getNotificationWebhooksWithHttpInfo($applicationId) + public function getEventTypesWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->getNotificationWebhooksRequest($applicationId); + $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -22994,20 +23599,20 @@ public function getNotificationWebhooksWithHttpInfo($applicationId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2004' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20036' === '\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\InlineResponse20036', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; + $returnType = '\TalonOne\Client\Model\InlineResponse20036'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23026,7 +23631,7 @@ public function getNotificationWebhooksWithHttpInfo($applicationId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2004', + '\TalonOne\Client\Model\InlineResponse20036', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23037,18 +23642,22 @@ public function getNotificationWebhooksWithHttpInfo($applicationId) } /** - * Operation getNotificationWebhooksAsync + * Operation getEventTypesAsync * - * List notification webhooks + * List event types * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhooksAsync($applicationId) + public function getEventTypesAsync($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - return $this->getNotificationWebhooksAsyncWithHttpInfo($applicationId) + return $this->getEventTypesAsyncWithHttpInfo($name, $includeOldVersions, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -23057,19 +23666,23 @@ function ($response) { } /** - * Operation getNotificationWebhooksAsyncWithHttpInfo + * Operation getEventTypesAsyncWithHttpInfo * - * List notification webhooks + * List event types * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getNotificationWebhooksAsyncWithHttpInfo($applicationId) + public function getEventTypesAsyncWithHttpInfo($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2004'; - $request = $this->getNotificationWebhooksRequest($applicationId); + $returnType = '\TalonOne\Client\Model\InlineResponse20036'; + $request = $this->getEventTypesRequest($name, $includeOldVersions, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23106,39 +23719,71 @@ function ($exception) { } /** - * Create request for operation 'getNotificationWebhooks' + * Create request for operation 'getEventTypes' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param string $name Filter results to event types with the given name. This parameter implies `includeOldVersions`. (optional) + * @param bool $includeOldVersions Include all versions of every event type. (optional, default to false) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getNotificationWebhooksRequest($applicationId) + protected function getEventTypesRequest($name = null, $includeOldVersions = false, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getNotificationWebhooks' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getEventTypes, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/notification_webhooks'; + + $resourcePath = '/v1/event_types'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + // query params + if (is_array($includeOldVersions)) { + $includeOldVersions = ObjectSerializer::serializeCollection($includeOldVersions, '', true); + } + if ($includeOldVersions !== null) { + $queryParams['includeOldVersions'] = $includeOldVersions; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -23183,6 +23828,11 @@ protected function getNotificationWebhooksRequest($applicationId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -23210,56 +23860,44 @@ protected function getNotificationWebhooksRequest($applicationId) } /** - * Operation getReferralsWithoutTotalCount + * Operation getExports * - * List referrals + * Get exports * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. 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) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2008 + * @return \TalonOne\Client\Model\InlineResponse20039 */ - public function getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) + public function getExports($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - list($response) = $this->getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); + list($response) = $this->getExportsWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity); return $response; } /** - * Operation getReferralsWithoutTotalCountWithHttpInfo + * Operation getExportsWithHttpInfo * - * List referrals + * Get exports * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. 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) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20039, HTTP status code, HTTP response headers (array of strings) */ - public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) + public function getExportsWithHttpInfo($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - $request = $this->getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); + $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); try { $options = $this->createHttpClientOption(); @@ -23292,20 +23930,20 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20039' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20039', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $returnType = '\TalonOne\Client\Model\InlineResponse20039'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23324,7 +23962,7 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2008', + '\TalonOne\Client\Model\InlineResponse20039', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23335,28 +23973,22 @@ public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campa } /** - * Operation getReferralsWithoutTotalCountAsync + * Operation getExportsAsync * - * List referrals + * Get exports * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. 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) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReferralsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) + public function getExportsAsync($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - return $this->getReferralsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate) + return $this->getExportsAsyncWithHttpInfo($pageSize, $skip, $applicationId, $campaignId, $entity) ->then( function ($response) { return $response[0]; @@ -23365,29 +23997,23 @@ function ($response) { } /** - * Operation getReferralsWithoutTotalCountAsyncWithHttpInfo + * Operation getExportsAsyncWithHttpInfo * - * List referrals + * Get exports * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. 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) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getReferralsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) + public function getExportsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2008'; - $request = $this->getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); + $returnType = '\TalonOne\Client\Model\InlineResponse20039'; + $request = $this->getExportsRequest($pageSize, $skip, $applicationId, $campaignId, $entity); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23424,46 +24050,28 @@ function ($exception) { } /** - * Create request for operation 'getReferralsWithoutTotalCount' + * Create request for operation 'getExports' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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. 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) + * @param float $applicationId Filter results by Application ID. (optional) + * @param int $campaignId Filter by the campaign ID on which the limit counters are used. (optional) + * @param string $entity The name of the entity type that was exported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) + protected function getExportsRequest($pageSize = 1000, $skip = null, $applicationId = null, $campaignId = null, $entity = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getReferralsWithoutTotalCount' - ); - } - // 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 getReferralsWithoutTotalCount' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getReferralsWithoutTotalCount, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getReferralsWithoutTotalCount, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getExports, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total'; + $resourcePath = '/v1/exports'; $formParams = []; $queryParams = []; $headerParams = []; @@ -23485,72 +24093,28 @@ protected function getReferralsWithoutTotalCountRequest($applicationId, $campaig $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($code)) { - $code = ObjectSerializer::serializeCollection($code, '', true); - } - if ($code !== null) { - $queryParams['code'] = $code; - } - // 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 (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); } - if ($valid !== null) { - $queryParams['valid'] = $valid; + if ($applicationId !== null) { + $queryParams['applicationId'] = $applicationId; } // query params - if (is_array($usable)) { - $usable = ObjectSerializer::serializeCollection($usable, '', true); + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); } - if ($usable !== null) { - $queryParams['usable'] = $usable; + if ($campaignId !== null) { + $queryParams['campaignId'] = $campaignId; } // query params - if (is_array($advocate)) { - $advocate = ObjectSerializer::serializeCollection($advocate, '', true); + if (is_array($entity)) { + $entity = ObjectSerializer::serializeCollection($entity, '', true); } - if ($advocate !== null) { - $queryParams['advocate'] = $advocate; + if ($entity !== null) { + $queryParams['entity'] = $entity; } - // 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; @@ -23595,6 +24159,11 @@ protected function getReferralsWithoutTotalCountRequest($applicationId, $campaig } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -23622,36 +24191,38 @@ protected function getReferralsWithoutTotalCountRequest($applicationId, $campaig } /** - * Operation getRole + * Operation getLoyaltyCard * - * Get role + * Get loyalty card * - * @param int $roleId The Id of role. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Role + * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getRole($roleId) + public function getLoyaltyCard($loyaltyProgramId, $loyaltyCardId) { - list($response) = $this->getRoleWithHttpInfo($roleId); + list($response) = $this->getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId); return $response; } /** - * Operation getRoleWithHttpInfo + * Operation getLoyaltyCardWithHttpInfo * - * Get role + * Get loyalty card * - * @param int $roleId The Id of role. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Role, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getRoleWithHttpInfo($roleId) + public function getLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId) { - $request = $this->getRoleRequest($roleId); + $request = $this->getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); try { $options = $this->createHttpClientOption(); @@ -23684,20 +24255,56 @@ public function getRoleWithHttpInfo($roleId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Role' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Role', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Role'; + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23716,7 +24323,31 @@ public function getRoleWithHttpInfo($roleId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Role', + '\TalonOne\Client\Model\LoyaltyCard', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -23727,18 +24358,19 @@ public function getRoleWithHttpInfo($roleId) } /** - * Operation getRoleAsync + * Operation getLoyaltyCardAsync * - * Get role + * Get loyalty card * - * @param int $roleId The Id of role. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRoleAsync($roleId) + public function getLoyaltyCardAsync($loyaltyProgramId, $loyaltyCardId) { - return $this->getRoleAsyncWithHttpInfo($roleId) + return $this->getLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) ->then( function ($response) { return $response[0]; @@ -23747,19 +24379,20 @@ function ($response) { } /** - * Operation getRoleAsyncWithHttpInfo + * Operation getLoyaltyCardAsyncWithHttpInfo * - * Get role + * Get loyalty card * - * @param int $roleId The Id of role. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRoleAsyncWithHttpInfo($roleId) + public function getLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId) { - $returnType = '\TalonOne\Client\Model\Role'; - $request = $this->getRoleRequest($roleId); + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $request = $this->getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -23796,23 +24429,34 @@ function ($exception) { } /** - * Create request for operation 'getRole' + * Create request for operation 'getLoyaltyCard' * - * @param int $roleId The Id of role. (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getRoleRequest($roleId) + protected function getLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId) { - // verify the required parameter 'roleId' is set - if ($roleId === null || (is_array($roleId) && count($roleId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $roleId when calling getRole' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCard' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCard' ); } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.getLoyaltyCard, must be smaller than or equal to 108.'); + } - $resourcePath = '/v1/roles/{roleId}'; + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -23822,10 +24466,18 @@ protected function getRoleRequest($roleId) // path params - if ($roleId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'roleId' . '}', - ObjectSerializer::toPathValue($roleId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -23873,6 +24525,11 @@ protected function getRoleRequest($roleId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -23900,40 +24557,48 @@ protected function getRoleRequest($roleId) } /** - * Operation getRuleset + * Operation getLoyaltyCardTransactionLogs * - * Get ruleset + * List card's transactions * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $rulesetId rulesetId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Ruleset + * @return \TalonOne\Client\Model\InlineResponse20014|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getRuleset($applicationId, $campaignId, $rulesetId) + public function getLoyaltyCardTransactionLogs($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - list($response) = $this->getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId); + list($response) = $this->getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); return $response; } /** - * Operation getRulesetWithHttpInfo + * Operation getLoyaltyCardTransactionLogsWithHttpInfo * - * Get ruleset + * List card's transactions * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $rulesetId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @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\InlineResponse20014|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) + public function getLoyaltyCardTransactionLogsWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - $request = $this->getRulesetRequest($applicationId, $campaignId, $rulesetId); + $request = $this->getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); try { $options = $this->createHttpClientOption(); @@ -23966,20 +24631,44 @@ public function getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Ruleset' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20014' === '\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\InlineResponse20014', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Ruleset'; + $returnType = '\TalonOne\Client\Model\InlineResponse20014'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -23998,7 +24687,23 @@ public function getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Ruleset', + '\TalonOne\Client\Model\InlineResponse20014', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -24009,20 +24714,24 @@ public function getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) } /** - * Operation getRulesetAsync + * Operation getLoyaltyCardTransactionLogsAsync * - * Get ruleset + * List card's transactions * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $rulesetId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRulesetAsync($applicationId, $campaignId, $rulesetId) + public function getLoyaltyCardTransactionLogsAsync($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - return $this->getRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) + return $this->getLoyaltyCardTransactionLogsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId) ->then( function ($response) { return $response[0]; @@ -24031,21 +24740,25 @@ function ($response) { } /** - * Operation getRulesetAsyncWithHttpInfo + * Operation getLoyaltyCardTransactionLogsAsyncWithHttpInfo * - * Get ruleset + * List card's transactions * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $rulesetId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) + public function getLoyaltyCardTransactionLogsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - $returnType = '\TalonOne\Client\Model\Ruleset'; - $request = $this->getRulesetRequest($applicationId, $campaignId, $rulesetId); + $returnType = '\TalonOne\Client\Model\InlineResponse20014'; + $request = $this->getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate, $endDate, $pageSize, $skip, $subledgerId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24082,66 +24795,102 @@ function ($exception) { } /** - * Create request for operation 'getRuleset' + * Create request for operation 'getLoyaltyCardTransactionLogs' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $rulesetId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getRulesetRequest($applicationId, $campaignId, $rulesetId) + protected function getLoyaltyCardTransactionLogsRequest($loyaltyProgramId, $loyaltyCardId, $startDate = null, $endDate = null, $pageSize = 1000, $skip = null, $subledgerId = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getRuleset' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCardTransactionLogs' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling getRuleset' + 'Missing the required parameter $loyaltyCardId when calling getLoyaltyCardTransactionLogs' ); } - // 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 getRuleset' - ); + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be smaller than or equal to 108.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}'; + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCardTransactionLogs, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } // path params - if ($rulesetId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'rulesetId' . '}', - ObjectSerializer::toPathValue($rulesetId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -24189,6 +24938,11 @@ protected function getRulesetRequest($applicationId, $campaignId, $rulesetId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -24216,44 +24970,46 @@ protected function getRulesetRequest($applicationId, $campaignId, $rulesetId) } /** - * Operation getRulesets + * Operation getLoyaltyCards * - * List campaign rulesets + * List loyalty cards * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2005 + * @return \TalonOne\Client\Model\InlineResponse20013|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getRulesets($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null) + public function getLoyaltyCards($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - list($response) = $this->getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort); + list($response) = $this->getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); return $response; } /** - * Operation getRulesetsWithHttpInfo + * Operation getLoyaltyCardsWithHttpInfo * - * List campaign rulesets + * List loyalty cards * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20013|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null) + public function getLoyaltyCardsWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - $request = $this->getRulesetsRequest($applicationId, $campaignId, $pageSize, $skip, $sort); + $request = $this->getLoyaltyCardsRequest($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); try { $options = $this->createHttpClientOption(); @@ -24286,20 +25042,44 @@ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2005' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20013' === '\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\InlineResponse20013', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2005'; + $returnType = '\TalonOne\Client\Model\InlineResponse20013'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -24318,7 +25098,23 @@ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2005', + '\TalonOne\Client\Model\InlineResponse20013', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -24329,22 +25125,23 @@ public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = } /** - * Operation getRulesetsAsync + * Operation getLoyaltyCardsAsync * - * List campaign rulesets + * List loyalty cards * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRulesetsAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null) + public function getLoyaltyCardsAsync($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - return $this->getRulesetsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort) + return $this->getLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId) ->then( function ($response) { return $response[0]; @@ -24353,23 +25150,24 @@ function ($response) { } /** - * Operation getRulesetsAsyncWithHttpInfo + * Operation getLoyaltyCardsAsyncWithHttpInfo * - * List campaign rulesets + * List loyalty cards * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getRulesetsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null) + public function getLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2005'; - $request = $this->getRulesetsRequest($applicationId, $campaignId, $pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\InlineResponse20013'; + $request = $this->getLoyaltyCardsRequest($loyaltyProgramId, $pageSize, $skip, $sort, $identifier, $profileId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24406,40 +25204,43 @@ function ($exception) { } /** - * Create request for operation 'getRulesets' + * Create request for operation 'getLoyaltyCards' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $identifier Optional query parameter to search cards by identifier. (optional) + * @param int $profileId Filter by the profile ID. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getRulesetsRequest($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null) + protected function getLoyaltyCardsRequest($loyaltyProgramId, $pageSize = 1000, $skip = null, $sort = null, $identifier = null, $profileId = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling getRulesets' - ); - } - // 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 getRulesets' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyCards' ); } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getRulesets, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCards, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getRulesets, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 1.'); + } + + if ($identifier !== null && strlen($identifier) < 4) { + throw new \InvalidArgumentException('invalid length for "$identifier" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 4.'); + } + + if ($profileId !== null && $profileId < 1) { + throw new \InvalidArgumentException('invalid value for "$profileId" when calling ManagementApi.getLoyaltyCards, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards'; $formParams = []; $queryParams = []; $headerParams = []; @@ -24467,21 +25268,27 @@ protected function getRulesetsRequest($applicationId, $campaignId, $pageSize = n if ($sort !== null) { $queryParams['sort'] = $sort; } + // query params + if (is_array($identifier)) { + $identifier = ObjectSerializer::serializeCollection($identifier, '', true); + } + if ($identifier !== null) { + $queryParams['identifier'] = $identifier; + } + // query params + if (is_array($profileId)) { + $profileId = ObjectSerializer::serializeCollection($profileId, '', true); + } + if ($profileId !== null) { + $queryParams['profileId'] = $profileId; + } // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -24529,6 +25336,11 @@ protected function getRulesetsRequest($applicationId, $campaignId, $pageSize = n } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -24556,36 +25368,38 @@ protected function getRulesetsRequest($applicationId, $campaignId, $pageSize = n } /** - * Operation getUser + * Operation getLoyaltyPoints * - * Get user + * Get customer's full loyalty ledger * - * @param int $userId The ID of the user. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\User + * @return \TalonOne\Client\Model\LoyaltyLedger */ - public function getUser($userId) + public function getLoyaltyPoints($loyaltyProgramId, $integrationId) { - list($response) = $this->getUserWithHttpInfo($userId); + list($response) = $this->getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId); return $response; } /** - * Operation getUserWithHttpInfo + * Operation getLoyaltyPointsWithHttpInfo * - * Get user + * Get customer's full loyalty ledger * - * @param int $userId The ID of the user. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\User, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyLedger, HTTP status code, HTTP response headers (array of strings) */ - public function getUserWithHttpInfo($userId) + public function getLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId) { - $request = $this->getUserRequest($userId); + $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); try { $options = $this->createHttpClientOption(); @@ -24618,20 +25432,20 @@ public function getUserWithHttpInfo($userId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\User' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyLedger' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\User', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyLedger', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\User'; + $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -24650,7 +25464,7 @@ public function getUserWithHttpInfo($userId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\User', + '\TalonOne\Client\Model\LoyaltyLedger', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -24661,18 +25475,19 @@ public function getUserWithHttpInfo($userId) } /** - * Operation getUserAsync + * Operation getLoyaltyPointsAsync * - * Get user + * Get customer's full loyalty ledger * - * @param int $userId The ID of the user. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserAsync($userId) + public function getLoyaltyPointsAsync($loyaltyProgramId, $integrationId) { - return $this->getUserAsyncWithHttpInfo($userId) + return $this->getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) ->then( function ($response) { return $response[0]; @@ -24681,19 +25496,20 @@ function ($response) { } /** - * Operation getUserAsyncWithHttpInfo + * Operation getLoyaltyPointsAsyncWithHttpInfo * - * Get user + * Get customer's full loyalty ledger * - * @param int $userId The ID of the user. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUserAsyncWithHttpInfo($userId) + public function getLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId) { - $returnType = '\TalonOne\Client\Model\User'; - $request = $this->getUserRequest($userId); + $returnType = '\TalonOne\Client\Model\LoyaltyLedger'; + $request = $this->getLoyaltyPointsRequest($loyaltyProgramId, $integrationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -24730,23 +25546,30 @@ function ($exception) { } /** - * Create request for operation 'getUser' + * Create request for operation 'getLoyaltyPoints' * - * @param int $userId The ID of the user. (required) + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getUserRequest($userId) + protected function getLoyaltyPointsRequest($loyaltyProgramId, $integrationId) { - // verify the required parameter 'userId' is set - if ($userId === null || (is_array($userId) && count($userId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $userId when calling getUser' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyPoints' + ); + } + // verify the required parameter 'integrationId' is set + if ($integrationId === null || (is_array($integrationId) && count($integrationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $integrationId when calling getLoyaltyPoints' ); } - $resourcePath = '/v1/users/{userId}'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -24756,10 +25579,18 @@ protected function getUserRequest($userId) // path params - if ($userId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'userId' . '}', - ObjectSerializer::toPathValue($userId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), $resourcePath ); } @@ -24807,6 +25638,11 @@ protected function getUserRequest($userId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -24834,40 +25670,36 @@ protected function getUserRequest($userId) } /** - * Operation getUsers + * Operation getLoyaltyProgram * - * List users in account + * Get loyalty program * - * @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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20031 + * @return \TalonOne\Client\Model\LoyaltyProgram */ - public function getUsers($pageSize = null, $skip = null, $sort = null) + public function getLoyaltyProgram($loyaltyProgramId) { - list($response) = $this->getUsersWithHttpInfo($pageSize, $skip, $sort); + list($response) = $this->getLoyaltyProgramWithHttpInfo($loyaltyProgramId); return $response; } /** - * Operation getUsersWithHttpInfo + * Operation getLoyaltyProgramWithHttpInfo * - * List users in account + * Get loyalty program * - * @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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20031, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyProgram, HTTP status code, HTTP response headers (array of strings) */ - public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = null) + public function getLoyaltyProgramWithHttpInfo($loyaltyProgramId) { - $request = $this->getUsersRequest($pageSize, $skip, $sort); + $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); try { $options = $this->createHttpClientOption(); @@ -24900,20 +25732,20 @@ public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20031' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyProgram' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20031', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyProgram', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20031'; + $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -24932,7 +25764,7 @@ public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20031', + '\TalonOne\Client\Model\LoyaltyProgram', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -24943,20 +25775,18 @@ public function getUsersWithHttpInfo($pageSize = null, $skip = null, $sort = nul } /** - * Operation getUsersAsync + * Operation getLoyaltyProgramAsync * - * List users in account + * Get loyalty program * - * @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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsersAsync($pageSize = null, $skip = null, $sort = null) + public function getLoyaltyProgramAsync($loyaltyProgramId) { - return $this->getUsersAsyncWithHttpInfo($pageSize, $skip, $sort) + return $this->getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) ->then( function ($response) { return $response[0]; @@ -24965,21 +25795,19 @@ function ($response) { } /** - * Operation getUsersAsyncWithHttpInfo + * Operation getLoyaltyProgramAsyncWithHttpInfo * - * List users in account + * Get loyalty program * - * @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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getUsersAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null) + public function getLoyaltyProgramAsyncWithHttpInfo($loyaltyProgramId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20031'; - $request = $this->getUsersRequest($pageSize, $skip, $sort); + $returnType = '\TalonOne\Client\Model\LoyaltyProgram'; + $request = $this->getLoyaltyProgramRequest($loyaltyProgramId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25016,55 +25844,39 @@ function ($exception) { } /** - * Create request for operation 'getUsers' + * Create request for operation 'getLoyaltyProgram' * - * @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 $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getUsersRequest($pageSize = null, $skip = null, $sort = null) + protected function getLoyaltyProgramRequest($loyaltyProgramId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be bigger than or equal to 1.'); + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgram' + ); } - - $resourcePath = '/v1/users'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}'; $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 ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -25109,6 +25921,11 @@ protected function getUsersRequest($pageSize = null, $skip = null, $sort = null) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -25136,36 +25953,48 @@ protected function getUsersRequest($pageSize = null, $skip = null, $sort = null) } /** - * Operation getWebhook + * Operation getLoyaltyProgramTransactions * - * Get webhook + * List loyalty program transactions * - * @param int $webhookId webhookId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Webhook + * @return \TalonOne\Client\Model\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function getWebhook($webhookId) + public function getLoyaltyProgramTransactions($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - list($response) = $this->getWebhookWithHttpInfo($webhookId); + list($response) = $this->getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); return $response; } /** - * Operation getWebhookWithHttpInfo + * Operation getLoyaltyProgramTransactionsWithHttpInfo * - * Get webhook + * List loyalty program transactions * - * @param int $webhookId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Webhook, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhookWithHttpInfo($webhookId) + public function getLoyaltyProgramTransactionsWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - $request = $this->getWebhookRequest($webhookId); + $request = $this->getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -25198,20 +26027,56 @@ public function getWebhookWithHttpInfo($webhookId) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Webhook' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20012' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Webhook', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20012', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Webhook'; + $returnType = '\TalonOne\Client\Model\InlineResponse20012'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -25230,7 +26095,31 @@ public function getWebhookWithHttpInfo($webhookId) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Webhook', + '\TalonOne\Client\Model\InlineResponse20012', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -25241,18 +26130,24 @@ public function getWebhookWithHttpInfo($webhookId) } /** - * Operation getWebhookAsync + * Operation getLoyaltyProgramTransactionsAsync * - * Get webhook + * List loyalty program transactions * - * @param int $webhookId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookAsync($webhookId) + public function getLoyaltyProgramTransactionsAsync($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - return $this->getWebhookAsyncWithHttpInfo($webhookId) + return $this->getLoyaltyProgramTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -25261,19 +26156,25 @@ function ($response) { } /** - * Operation getWebhookAsyncWithHttpInfo + * Operation getLoyaltyProgramTransactionsAsyncWithHttpInfo * - * Get webhook + * List loyalty program transactions * - * @param int $webhookId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookAsyncWithHttpInfo($webhookId) + public function getLoyaltyProgramTransactionsAsyncWithHttpInfo($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - $returnType = '\TalonOne\Client\Model\Webhook'; - $request = $this->getWebhookRequest($webhookId); + $returnType = '\TalonOne\Client\Model\InlineResponse20012'; + $request = $this->getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType, $subledgerId, $startDate, $endDate, $pageSize, $skip); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25310,36 +26211,95 @@ function ($exception) { } /** - * Create request for operation 'getWebhook' + * Create request for operation 'getLoyaltyProgramTransactions' * - * @param int $webhookId (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyTransactionType Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) + * @param string $subledgerId The ID of the subledger by which we filter the data. (optional) + * @param \DateTime $startDate Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param \DateTime $endDate Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 50) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhookRequest($webhookId) + protected function getLoyaltyProgramTransactionsRequest($loyaltyProgramId, $loyaltyTransactionType = null, $subledgerId = null, $startDate = null, $endDate = null, $pageSize = 50, $skip = null) { - // verify the required parameter 'webhookId' is set - if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $webhookId when calling getWebhook' + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyProgramTransactions' ); } + if ($loyaltyTransactionType !== null && strlen($loyaltyTransactionType) > 255) { + throw new \InvalidArgumentException('invalid length for "$loyaltyTransactionType" when calling ManagementApi.getLoyaltyProgramTransactions, must be smaller than or equal to 255.'); + } - $resourcePath = '/v1/webhooks/{webhookId}'; + if ($pageSize !== null && $pageSize > 50) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyProgramTransactions, must be smaller than or equal to 50.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getLoyaltyProgramTransactions, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/transactions'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + if (is_array($loyaltyTransactionType)) { + $loyaltyTransactionType = ObjectSerializer::serializeCollection($loyaltyTransactionType, '', true); + } + if ($loyaltyTransactionType !== null) { + $queryParams['loyaltyTransactionType'] = $loyaltyTransactionType; + } + // query params + if (is_array($subledgerId)) { + $subledgerId = ObjectSerializer::serializeCollection($subledgerId, '', true); + } + if ($subledgerId !== null) { + $queryParams['subledgerId'] = $subledgerId; + } + // query params + if (is_array($startDate)) { + $startDate = ObjectSerializer::serializeCollection($startDate, '', true); + } + if ($startDate !== null) { + $queryParams['startDate'] = $startDate; + } + // query params + if (is_array($endDate)) { + $endDate = ObjectSerializer::serializeCollection($endDate, '', true); + } + if ($endDate !== null) { + $queryParams['endDate'] = $endDate; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } // path params - if ($webhookId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'webhookId' . '}', - ObjectSerializer::toPathValue($webhookId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } @@ -25387,6 +26347,11 @@ protected function getWebhookRequest($webhookId) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -25414,52 +26379,34 @@ protected function getWebhookRequest($webhookId) } /** - * Operation getWebhookActivationLogs + * Operation getLoyaltyPrograms * - * List webhook activation log entries + * List loyalty programs * - * @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 $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20028 + * @return \TalonOne\Client\Model\InlineResponse20011 */ - public function getWebhookActivationLogs($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyPrograms() { - list($response) = $this->getWebhookActivationLogsWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + list($response) = $this->getLoyaltyProgramsWithHttpInfo(); return $response; } /** - * Operation getWebhookActivationLogsWithHttpInfo + * Operation getLoyaltyProgramsWithHttpInfo * - * List webhook activation log entries + * List loyalty programs * - * @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 $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20028, 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 getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyProgramsWithHttpInfo() { - $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + $request = $this->getLoyaltyProgramsRequest(); try { $options = $this->createHttpClientOption(); @@ -25492,20 +26439,20 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = n $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20028' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20011' === '\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\InlineResponse20011', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20028'; + $returnType = '\TalonOne\Client\Model\InlineResponse20011'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -25524,7 +26471,7 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = n case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20028', + '\TalonOne\Client\Model\InlineResponse20011', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -25535,26 +26482,17 @@ public function getWebhookActivationLogsWithHttpInfo($pageSize = null, $skip = n } /** - * Operation getWebhookActivationLogsAsync + * Operation getLoyaltyProgramsAsync * - * List webhook activation log entries + * List loyalty programs * - * @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 $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookActivationLogsAsync($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyProgramsAsync() { - return $this->getWebhookActivationLogsAsyncWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) + return $this->getLoyaltyProgramsAsyncWithHttpInfo() ->then( function ($response) { return $response[0]; @@ -25563,27 +26501,18 @@ function ($response) { } /** - * Operation getWebhookActivationLogsAsyncWithHttpInfo + * Operation getLoyaltyProgramsAsyncWithHttpInfo * - * List webhook activation log entries + * List loyalty programs * - * @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 $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookActivationLogsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyProgramsAsyncWithHttpInfo() { - $returnType = '\TalonOne\Client\Model\InlineResponse20028'; - $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); + $returnType = '\TalonOne\Client\Model\InlineResponse20011'; + $request = $this->getLoyaltyProgramsRequest(); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25620,101 +26549,22 @@ function ($exception) { } /** - * Create request for operation 'getWebhookActivationLogs' + * Create request for operation 'getLoyaltyPrograms' * - * @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 $integrationRequestUuid Filter results by integration request UUID. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) - * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhookActivationLogsRequest($pageSize = null, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) + protected function getLoyaltyProgramsRequest() { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/webhook_activation_logs'; + $resourcePath = '/v1/loyalty_programs'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($integrationRequestUuid)) { - $integrationRequestUuid = ObjectSerializer::serializeCollection($integrationRequestUuid, '', true); - } - if ($integrationRequestUuid !== null) { - $queryParams['integrationRequestUuid'] = $integrationRequestUuid; - } - // query params - if (is_array($webhookId)) { - $webhookId = ObjectSerializer::serializeCollection($webhookId, '', true); - } - if ($webhookId !== null) { - $queryParams['webhookId'] = $webhookId; - } - // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); - } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; - } - // query params - if (is_array($campaignId)) { - $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); - } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } @@ -25761,6 +26611,11 @@ protected function getWebhookActivationLogsRequest($pageSize = null, $skip = nul } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -25788,54 +26643,36 @@ protected function getWebhookActivationLogsRequest($pageSize = null, $skip = nul } /** - * Operation getWebhookLogs + * Operation getLoyaltyStatistics * - * List webhook log entries + * Get loyalty program statistics * - * @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 $status Filter results by HTTP status codes. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. 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) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20029 + * @return \TalonOne\Client\Model\LoyaltyStatistics */ - public function getWebhookLogs($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyStatistics($loyaltyProgramId) { - list($response) = $this->getWebhookLogsWithHttpInfo($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); + list($response) = $this->getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId); return $response; } /** - * Operation getWebhookLogsWithHttpInfo + * Operation getLoyaltyStatisticsWithHttpInfo * - * List webhook log entries + * Get loyalty program statistics * - * @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 $status Filter results by HTTP status codes. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. 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) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20029, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyStatistics, 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) + public function getLoyaltyStatisticsWithHttpInfo($loyaltyProgramId) { - $request = $this->getWebhookLogsRequest($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); + $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); try { $options = $this->createHttpClientOption(); @@ -25868,20 +26705,20 @@ public function getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20029' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyStatistics' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20029', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyStatistics', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20029'; + $returnType = '\TalonOne\Client\Model\LoyaltyStatistics'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -25900,7 +26737,7 @@ public function getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20029', + '\TalonOne\Client\Model\LoyaltyStatistics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -25911,27 +26748,18 @@ public function getWebhookLogsWithHttpInfo($pageSize = null, $skip = null, $sort } /** - * Operation getWebhookLogsAsync + * Operation getLoyaltyStatisticsAsync * - * List webhook log entries + * Get loyalty program statistics * - * @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 $status Filter results by HTTP status codes. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. 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) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookLogsAsync($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyStatisticsAsync($loyaltyProgramId) { - return $this->getWebhookLogsAsyncWithHttpInfo($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) + return $this->getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) ->then( function ($response) { return $response[0]; @@ -25940,28 +26768,19 @@ function ($response) { } /** - * Operation getWebhookLogsAsyncWithHttpInfo + * Operation getLoyaltyStatisticsAsyncWithHttpInfo * - * List webhook log entries + * Get loyalty program statistics * - * @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 $status Filter results by HTTP status codes. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. 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) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhookLogsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) + public function getLoyaltyStatisticsAsyncWithHttpInfo($loyaltyProgramId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20029'; - $request = $this->getWebhookLogsRequest($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); + $returnType = '\TalonOne\Client\Model\LoyaltyStatistics'; + $request = $this->getLoyaltyStatisticsRequest($loyaltyProgramId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -25998,111 +26817,39 @@ function ($exception) { } /** - * Create request for operation 'getWebhookLogs' + * Create request for operation 'getLoyaltyStatistics' * - * @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 $status Filter results by HTTP status codes. (optional) - * @param float $webhookId Filter results by Webhook. (optional) - * @param float $applicationId Filter results by Application ID. (optional) - * @param float $campaignId Filter results by campaign. (optional) - * @param 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. 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) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhookLogsRequest($pageSize = null, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) + protected function getLoyaltyStatisticsRequest($loyaltyProgramId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookLogs, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookLogs, must be bigger than or equal to 1.'); + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling getLoyaltyStatistics' + ); } - - $resourcePath = '/v1/webhook_logs'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/statistics'; $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($status)) { - $status = ObjectSerializer::serializeCollection($status, '', true); - } - if ($status !== null) { - $queryParams['status'] = $status; - } - // query params - if (is_array($webhookId)) { - $webhookId = ObjectSerializer::serializeCollection($webhookId, '', true); - } - if ($webhookId !== null) { - $queryParams['webhookId'] = $webhookId; - } - // query params - if (is_array($applicationId)) { - $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); - } - if ($applicationId !== null) { - $queryParams['applicationId'] = $applicationId; - } - // query params - if (is_array($campaignId)) { - $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); - } - if ($campaignId !== null) { - $queryParams['campaignId'] = $campaignId; - } - // query params - if (is_array($requestUuid)) { - $requestUuid = ObjectSerializer::serializeCollection($requestUuid, '', true); - } - if ($requestUuid !== null) { - $queryParams['requestUuid'] = $requestUuid; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -26147,6 +26894,11 @@ protected function getWebhookLogsRequest($pageSize = null, $skip = null, $sort = } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -26174,42 +26926,38 @@ protected function getWebhookLogsRequest($pageSize = null, $skip = null, $sort = } /** - * Operation getWebhooks + * Operation getNotificationWebhook * - * List webhooks + * Get notification about campaign-related changes * - * @param string $applicationIds Filter by one or more application ids separated by comma. (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 $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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20027 + * @return \TalonOne\Client\Model\NotificationWebhook */ - public function getWebhooks($applicationIds = null, $sort = null, $pageSize = null, $skip = null) + public function getNotificationWebhook($applicationId, $notificationWebhookId) { - list($response) = $this->getWebhooksWithHttpInfo($applicationIds, $sort, $pageSize, $skip); + list($response) = $this->getNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId); return $response; } /** - * Operation getWebhooksWithHttpInfo + * Operation getNotificationWebhookWithHttpInfo * - * List webhooks + * Get notification about campaign-related changes * - * @param string $applicationIds Filter by one or more application ids separated by comma. (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 $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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20027, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\NotificationWebhook, HTTP status code, HTTP response headers (array of strings) */ - public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $pageSize = null, $skip = null) + public function getNotificationWebhookWithHttpInfo($applicationId, $notificationWebhookId) { - $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); + $request = $this->getNotificationWebhookRequest($applicationId, $notificationWebhookId); try { $options = $this->createHttpClientOption(); @@ -26242,20 +26990,20 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20027' === '\SplFileObject') { + if ('\TalonOne\Client\Model\NotificationWebhook' === '\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\NotificationWebhook', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20027'; + $returnType = '\TalonOne\Client\Model\NotificationWebhook'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -26274,7 +27022,7 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20027', + '\TalonOne\Client\Model\NotificationWebhook', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -26285,21 +27033,19 @@ public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $p } /** - * Operation getWebhooksAsync + * Operation getNotificationWebhookAsync * - * List webhooks + * Get notification about campaign-related changes * - * @param string $applicationIds Filter by one or more application ids separated by comma. (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 $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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhooksAsync($applicationIds = null, $sort = null, $pageSize = null, $skip = null) + public function getNotificationWebhookAsync($applicationId, $notificationWebhookId) { - return $this->getWebhooksAsyncWithHttpInfo($applicationIds, $sort, $pageSize, $skip) + return $this->getNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) ->then( function ($response) { return $response[0]; @@ -26308,22 +27054,20 @@ function ($response) { } /** - * Operation getWebhooksAsyncWithHttpInfo + * Operation getNotificationWebhookAsyncWithHttpInfo * - * List webhooks + * Get notification about campaign-related changes * - * @param string $applicationIds Filter by one or more application ids separated by comma. (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 $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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getWebhooksAsyncWithHttpInfo($applicationIds = null, $sort = null, $pageSize = null, $skip = null) + public function getNotificationWebhookAsyncWithHttpInfo($applicationId, $notificationWebhookId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20027'; - $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); + $returnType = '\TalonOne\Client\Model\NotificationWebhook'; + $request = $this->getNotificationWebhookRequest($applicationId, $notificationWebhookId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26360,63 +27104,54 @@ function ($exception) { } /** - * Create request for operation 'getWebhooks' + * Create request for operation 'getNotificationWebhook' * - * @param string $applicationIds Filter by one or more application ids separated by comma. (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 $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 The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getWebhooksRequest($applicationIds = null, $sort = null, $pageSize = null, $skip = null) + protected function getNotificationWebhookRequest($applicationId, $notificationWebhookId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be smaller than or equal to 1000.'); + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling getNotificationWebhook' + ); } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be bigger than or equal to 1.'); + // verify the required parameter 'notificationWebhookId' is set + if ($notificationWebhookId === null || (is_array($notificationWebhookId) && count($notificationWebhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $notificationWebhookId when calling getNotificationWebhook' + ); } - - $resourcePath = '/v1/webhooks'; + $resourcePath = '/v1/applications/{applicationId}/notification_webhooks/{notificationWebhookId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($applicationIds)) { - $applicationIds = ObjectSerializer::serializeCollection($applicationIds, '', true); - } - if ($applicationIds !== null) { - $queryParams['applicationIds'] = $applicationIds; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($notificationWebhookId !== null) { + $resourcePath = str_replace( + '{' . 'notificationWebhookId' . '}', + ObjectSerializer::toPathValue($notificationWebhookId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -26461,6 +27196,11 @@ protected function getWebhooksRequest($applicationIds = null, $sort = null, $pag } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -26488,38 +27228,36 @@ protected function getWebhooksRequest($applicationIds = null, $sort = null, $pag } /** - * Operation importAccountCollection + * Operation getNotificationWebhooks * - * Import data in existing account-level collection + * List notifications about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2005 */ - public function importAccountCollection($collectionId, $upFile = null) + public function getNotificationWebhooks($applicationId) { - list($response) = $this->importAccountCollectionWithHttpInfo($collectionId, $upFile); + list($response) = $this->getNotificationWebhooksWithHttpInfo($applicationId); return $response; } /** - * Operation importAccountCollectionWithHttpInfo + * Operation getNotificationWebhooksWithHttpInfo * - * Import data in existing account-level collection + * List notifications about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2005, HTTP status code, HTTP response headers (array of strings) */ - public function importAccountCollectionWithHttpInfo($collectionId, $upFile = null) + public function getNotificationWebhooksWithHttpInfo($applicationId) { - $request = $this->importAccountCollectionRequest($collectionId, $upFile); + $request = $this->getNotificationWebhooksRequest($applicationId); try { $options = $this->createHttpClientOption(); @@ -26552,44 +27290,20 @@ public function importAccountCollectionWithHttpInfo($collectionId, $upFile = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2005' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2005', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse2005'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -26608,23 +27322,7 @@ public function importAccountCollectionWithHttpInfo($collectionId, $upFile = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse2005', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -26635,19 +27333,18 @@ public function importAccountCollectionWithHttpInfo($collectionId, $upFile = nul } /** - * Operation importAccountCollectionAsync + * Operation getNotificationWebhooksAsync * - * Import data in existing account-level collection + * List notifications about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAccountCollectionAsync($collectionId, $upFile = null) + public function getNotificationWebhooksAsync($applicationId) { - return $this->importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile) + return $this->getNotificationWebhooksAsyncWithHttpInfo($applicationId) ->then( function ($response) { return $response[0]; @@ -26656,20 +27353,19 @@ function ($response) { } /** - * Operation importAccountCollectionAsyncWithHttpInfo + * Operation getNotificationWebhooksAsyncWithHttpInfo * - * Import data in existing account-level collection + * List notifications about campaign-related changes * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile = null) + public function getNotificationWebhooksAsyncWithHttpInfo($applicationId) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importAccountCollectionRequest($collectionId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse2005'; + $request = $this->getNotificationWebhooksRequest($applicationId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -26706,24 +27402,23 @@ function ($exception) { } /** - * Create request for operation 'importAccountCollection' + * Create request for operation 'getNotificationWebhooks' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importAccountCollectionRequest($collectionId, $upFile = null) + protected function getNotificationWebhooksRequest($applicationId) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling importAccountCollection' + 'Missing the required parameter $applicationId when calling getNotificationWebhooks' ); } - $resourcePath = '/v1/collections/{collectionId}/import'; + $resourcePath = '/v1/applications/{applicationId}/notification_webhooks'; $formParams = []; $queryParams = []; $headerParams = []; @@ -26733,18 +27428,14 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) // path params - if ($collectionId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); - } // body params $_tempBody = null; @@ -26755,7 +27446,7 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -26788,6 +27479,11 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -26807,7 +27503,7 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -26815,38 +27511,56 @@ protected function importAccountCollectionRequest($collectionId, $upFile = null) } /** - * Operation importAllowedList + * Operation getReferralsWithoutTotalCount * - * Import allowed values for attribute + * List referrals * - * @param int $attributeId attributeId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @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 expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) + * @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) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse2009 */ - public function importAllowedList($attributeId, $upFile = null) + public function getReferralsWithoutTotalCount($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { - list($response) = $this->importAllowedListWithHttpInfo($attributeId, $upFile); + list($response) = $this->getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); return $response; } /** - * Operation importAllowedListWithHttpInfo + * Operation getReferralsWithoutTotalCountWithHttpInfo * - * Import allowed values for attribute + * List referrals * - * @param int $attributeId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @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 expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) + * @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) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2009, HTTP status code, HTTP response headers (array of strings) */ - public function importAllowedListWithHttpInfo($attributeId, $upFile = null) + public function getReferralsWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { - $request = $this->importAllowedListRequest($attributeId, $upFile); + $request = $this->getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); try { $options = $this->createHttpClientOption(); @@ -26879,56 +27593,20 @@ public function importAllowedListWithHttpInfo($attributeId, $upFile = null) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2009' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2009', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -26947,31 +27625,7 @@ public function importAllowedListWithHttpInfo($attributeId, $upFile = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse2009', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -26982,19 +27636,28 @@ public function importAllowedListWithHttpInfo($attributeId, $upFile = null) } /** - * Operation importAllowedListAsync + * Operation getReferralsWithoutTotalCountAsync * - * Import allowed values for attribute + * List referrals * - * @param int $attributeId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @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 expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAllowedListAsync($attributeId, $upFile = null) + public function getReferralsWithoutTotalCountAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { - return $this->importAllowedListAsyncWithHttpInfo($attributeId, $upFile) + return $this->getReferralsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate) ->then( function ($response) { return $response[0]; @@ -27003,20 +27666,29 @@ function ($response) { } /** - * Operation importAllowedListAsyncWithHttpInfo + * Operation getReferralsWithoutTotalCountAsyncWithHttpInfo * - * Import allowed values for attribute + * List referrals * - * @param int $attributeId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @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 expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importAllowedListAsyncWithHttpInfo($attributeId, $upFile = null) + public function getReferralsWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importAllowedListRequest($attributeId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse2009'; + $request = $this->getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $code, $createdBefore, $createdAfter, $valid, $usable, $advocate); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27053,45 +27725,134 @@ function ($exception) { } /** - * Create request for operation 'importAllowedList' + * Create request for operation 'getReferralsWithoutTotalCount' * - * @param int $attributeId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $code Filter results performing case-insensitive matching against the referral code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @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 expiration date is set and in the past. The second matches referrals in which start date is null or in the past and expiration date is null or in the future, the third matches referrals in which start date is set and in the future. (optional) + * @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) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importAllowedListRequest($attributeId, $upFile = null) + protected function getReferralsWithoutTotalCountRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $code = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $advocate = null) { - // verify the required parameter 'attributeId' is set - if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeId when calling importAllowedList' + 'Missing the required parameter $applicationId when calling getReferralsWithoutTotalCount' ); } + // 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 getReferralsWithoutTotalCount' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getReferralsWithoutTotalCount, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getReferralsWithoutTotalCount, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/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($code)) { + $code = ObjectSerializer::serializeCollection($code, '', true); + } + if ($code !== null) { + $queryParams['code'] = $code; + } + // 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($advocate)) { + $advocate = ObjectSerializer::serializeCollection($advocate, '', true); + } + if ($advocate !== null) { + $queryParams['advocate'] = $advocate; + } + - $resourcePath = '/v1/attributes/{attributeId}/allowed_list/import'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - // path params - if ($attributeId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'attributeId' . '}', - ObjectSerializer::toPathValue($attributeId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } - - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); } + // body params $_tempBody = null; @@ -27102,7 +27863,7 @@ protected function importAllowedListRequest($attributeId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -27135,6 +27896,11 @@ protected function importAllowedListRequest($attributeId, $upFile = null) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -27154,7 +27920,7 @@ protected function importAllowedListRequest($attributeId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -27162,42 +27928,36 @@ protected function importAllowedListRequest($attributeId, $upFile = null) } /** - * Operation importCollection + * Operation getRole * - * Import data in existing collection + * Get role * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $roleId The Id of role. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Role */ - public function importCollection($applicationId, $campaignId, $collectionId, $upFile = null) + public function getRole($roleId) { - list($response) = $this->importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile); + list($response) = $this->getRoleWithHttpInfo($roleId); return $response; } /** - * Operation importCollectionWithHttpInfo + * Operation getRoleWithHttpInfo * - * Import data in existing collection + * Get role * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $roleId The Id of role. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Role, HTTP status code, HTTP response headers (array of strings) */ - public function importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + public function getRoleWithHttpInfo($roleId) { - $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + $request = $this->getRoleRequest($roleId); try { $options = $this->createHttpClientOption(); @@ -27230,32 +27990,20 @@ public function importCollectionWithHttpInfo($applicationId, $campaignId, $colle $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Role' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Role', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\Role'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -27274,15 +28022,7 @@ public function importCollectionWithHttpInfo($applicationId, $campaignId, $colle case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Role', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -27293,21 +28033,18 @@ public function importCollectionWithHttpInfo($applicationId, $campaignId, $colle } /** - * Operation importCollectionAsync + * Operation getRoleAsync * - * Import data in existing collection + * Get role * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $roleId The Id of role. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCollectionAsync($applicationId, $campaignId, $collectionId, $upFile = null) + public function getRoleAsync($roleId) { - return $this->importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile) + return $this->getRoleAsyncWithHttpInfo($roleId) ->then( function ($response) { return $response[0]; @@ -27316,22 +28053,19 @@ function ($response) { } /** - * Operation importCollectionAsyncWithHttpInfo + * Operation getRoleAsyncWithHttpInfo * - * Import data in existing collection + * Get role * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $roleId The Id of role. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + public function getRoleAsyncWithHttpInfo($roleId) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + $returnType = '\TalonOne\Client\Model\Role'; + $request = $this->getRoleRequest($roleId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27368,38 +28102,23 @@ function ($exception) { } /** - * Create request for operation 'importCollection' + * Create request for operation 'getRole' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $roleId The Id of role. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile = null) + protected function getRoleRequest($roleId) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling importCollection' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling importCollection' - ); - } - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'roleId' is set + if ($roleId === null || (is_array($roleId) && count($roleId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling importCollection' + 'Missing the required parameter $roleId when calling getRole' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import'; + $resourcePath = '/v1/roles/{roleId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -27409,34 +28128,14 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - // path params - if ($collectionId !== null) { + if ($roleId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'roleId' . '}', + ObjectSerializer::toPathValue($roleId), $resourcePath ); } - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); - } // body params $_tempBody = null; @@ -27447,7 +28146,7 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -27480,6 +28179,11 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -27499,7 +28203,7 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -27507,40 +28211,40 @@ protected function importCollectionRequest($applicationId, $campaignId, $collect } /** - * Operation importCoupons + * Operation getRuleset * - * Import coupons + * Get ruleset * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $rulesetId The ID of the ruleset. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\Ruleset */ - public function importCoupons($applicationId, $campaignId, $upFile = null) + public function getRuleset($applicationId, $campaignId, $rulesetId) { - list($response) = $this->importCouponsWithHttpInfo($applicationId, $campaignId, $upFile); + list($response) = $this->getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId); return $response; } /** - * Operation importCouponsWithHttpInfo + * Operation getRulesetWithHttpInfo * - * Import coupons + * Get ruleset * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $rulesetId The ID of the ruleset. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Ruleset, HTTP status code, HTTP response headers (array of strings) */ - public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function getRulesetWithHttpInfo($applicationId, $campaignId, $rulesetId) { - $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + $request = $this->getRulesetRequest($applicationId, $campaignId, $rulesetId); try { $options = $this->createHttpClientOption(); @@ -27573,20 +28277,20 @@ public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Ruleset' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Ruleset', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\Ruleset'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -27605,7 +28309,7 @@ public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\Ruleset', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -27616,20 +28320,20 @@ public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = } /** - * Operation importCouponsAsync + * Operation getRulesetAsync * - * Import coupons + * Get ruleset * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $rulesetId The ID of the ruleset. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCouponsAsync($applicationId, $campaignId, $upFile = null) + public function getRulesetAsync($applicationId, $campaignId, $rulesetId) { - return $this->importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + return $this->getRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) ->then( function ($response) { return $response[0]; @@ -27638,21 +28342,21 @@ function ($response) { } /** - * Operation importCouponsAsyncWithHttpInfo + * Operation getRulesetAsyncWithHttpInfo * - * Import coupons + * Get ruleset * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $rulesetId The ID of the ruleset. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function getRulesetAsyncWithHttpInfo($applicationId, $campaignId, $rulesetId) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + $returnType = '\TalonOne\Client\Model\Ruleset'; + $request = $this->getRulesetRequest($applicationId, $campaignId, $rulesetId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27689,31 +28393,37 @@ function ($exception) { } /** - * Create request for operation 'importCoupons' + * Create request for operation 'getRuleset' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $rulesetId The ID of the ruleset. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importCouponsRequest($applicationId, $campaignId, $upFile = null) + protected function getRulesetRequest($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 importCoupons' + 'Missing the required parameter $applicationId when calling getRuleset' ); } // verify the required parameter 'campaignId' is set if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling importCoupons' + 'Missing the required parameter $campaignId when calling getRuleset' + ); + } + // 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 getRuleset' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -27738,11 +28448,15 @@ protected function importCouponsRequest($applicationId, $campaignId, $upFile = n $resourcePath ); } - - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + // path params + if ($rulesetId !== null) { + $resourcePath = str_replace( + '{' . 'rulesetId' . '}', + ObjectSerializer::toPathValue($rulesetId), + $resourcePath + ); } + // body params $_tempBody = null; @@ -27753,7 +28467,7 @@ protected function importCouponsRequest($applicationId, $campaignId, $upFile = n } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -27786,6 +28500,11 @@ protected function importCouponsRequest($applicationId, $campaignId, $upFile = n } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -27805,7 +28524,7 @@ protected function importCouponsRequest($applicationId, $campaignId, $upFile = n $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -27813,38 +28532,44 @@ protected function importCouponsRequest($applicationId, $campaignId, $upFile = n } /** - * Operation importLoyaltyPoints + * Operation getRulesets * - * Import loyalty points + * List campaign rulesets * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\InlineResponse2006 */ - public function importLoyaltyPoints($loyaltyProgramId, $upFile = null) + public function getRulesets($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile); + list($response) = $this->getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort); return $response; } /** - * Operation importLoyaltyPointsWithHttpInfo + * Operation getRulesetsWithHttpInfo * - * Import loyalty points + * List campaign rulesets * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse2006, HTTP status code, HTTP response headers (array of strings) */ - public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = null) + public function getRulesetsWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { - $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); + $request = $this->getRulesetsRequest($applicationId, $campaignId, $pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -27877,20 +28602,20 @@ public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse2006' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2006', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -27909,7 +28634,7 @@ public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\InlineResponse2006', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -27920,19 +28645,22 @@ public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = nul } /** - * Operation importLoyaltyPointsAsync + * Operation getRulesetsAsync * - * Import loyalty points + * List campaign rulesets * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importLoyaltyPointsAsync($loyaltyProgramId, $upFile = null) + public function getRulesetsAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { - return $this->importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile) + return $this->getRulesetsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -27941,20 +28669,23 @@ function ($response) { } /** - * Operation importLoyaltyPointsAsyncWithHttpInfo + * Operation getRulesetsAsyncWithHttpInfo * - * Import loyalty points + * List campaign rulesets * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) + public function getRulesetsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse2006'; + $request = $this->getRulesetsRequest($applicationId, $campaignId, $pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -27991,45 +28722,86 @@ function ($exception) { } /** - * Create request for operation 'importLoyaltyPoints' + * Create request for operation 'getRulesets' * - * @param int $loyaltyProgramId Identifier of the loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs endpoint](https://docs.talon.one/management-api/#operation/getLoyaltyPrograms). (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) + protected function getRulesetsRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyPoints' + 'Missing the required parameter $applicationId when calling getRulesets' ); } + // 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 getRulesets' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getRulesets, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getRulesets, must be bigger than or equal to 1.'); + } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_points'; + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets'; $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 ($loyaltyProgramId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), $resourcePath ); } - - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); } + // body params $_tempBody = null; @@ -28040,7 +28812,7 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -28073,6 +28845,11 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -28092,7 +28869,7 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -28100,38 +28877,36 @@ protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) } /** - * Operation importPoolGiveaways + * Operation getUser * - * Import giveaway codes into a giveaway pool + * Get user * - * @param int $poolId poolId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $userId The ID of the user. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\User */ - public function importPoolGiveaways($poolId, $upFile = null) + public function getUser($userId) { - list($response) = $this->importPoolGiveawaysWithHttpInfo($poolId, $upFile); + list($response) = $this->getUserWithHttpInfo($userId); return $response; } /** - * Operation importPoolGiveawaysWithHttpInfo + * Operation getUserWithHttpInfo * - * Import giveaway codes into a giveaway pool + * Get user * - * @param int $poolId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $userId The ID of the user. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\User, HTTP status code, HTTP response headers (array of strings) */ - public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) + public function getUserWithHttpInfo($userId) { - $request = $this->importPoolGiveawaysRequest($poolId, $upFile); + $request = $this->getUserRequest($userId); try { $options = $this->createHttpClientOption(); @@ -28164,20 +28939,20 @@ public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\User' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\User', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\User'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -28196,7 +28971,7 @@ public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\User', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -28207,19 +28982,18 @@ public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) } /** - * Operation importPoolGiveawaysAsync + * Operation getUserAsync * - * Import giveaway codes into a giveaway pool + * Get user * - * @param int $poolId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $userId The ID of the user. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importPoolGiveawaysAsync($poolId, $upFile = null) + public function getUserAsync($userId) { - return $this->importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile) + return $this->getUserAsyncWithHttpInfo($userId) ->then( function ($response) { return $response[0]; @@ -28228,20 +29002,19 @@ function ($response) { } /** - * Operation importPoolGiveawaysAsyncWithHttpInfo + * Operation getUserAsyncWithHttpInfo * - * Import giveaway codes into a giveaway pool + * Get user * - * @param int $poolId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $userId The ID of the user. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile = null) + public function getUserAsyncWithHttpInfo($userId) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importPoolGiveawaysRequest($poolId, $upFile); + $returnType = '\TalonOne\Client\Model\User'; + $request = $this->getUserRequest($userId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -28278,24 +29051,23 @@ function ($exception) { } /** - * Create request for operation 'importPoolGiveaways' + * Create request for operation 'getUser' * - * @param int $poolId (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $userId The ID of the user. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importPoolGiveawaysRequest($poolId, $upFile = null) + protected function getUserRequest($userId) { - // verify the required parameter 'poolId' is set - if ($poolId === null || (is_array($poolId) && count($poolId) === 0)) { + // verify the required parameter 'userId' is set + if ($userId === null || (is_array($userId) && count($userId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $poolId when calling importPoolGiveaways' + 'Missing the required parameter $userId when calling getUser' ); } - $resourcePath = '/v1/giveaways/pools/{poolId}/import'; + $resourcePath = '/v1/users/{userId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -28305,18 +29077,14 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) // path params - if ($poolId !== null) { + if ($userId !== null) { $resourcePath = str_replace( - '{' . 'poolId' . '}', - ObjectSerializer::toPathValue($poolId), + '{' . 'userId' . '}', + ObjectSerializer::toPathValue($userId), $resourcePath ); } - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); - } // body params $_tempBody = null; @@ -28327,7 +29095,7 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -28360,6 +29128,11 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -28379,7 +29152,7 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -28387,40 +29160,40 @@ protected function importPoolGiveawaysRequest($poolId, $upFile = null) } /** - * Operation importReferrals + * Operation getUsers * - * Import referrals + * List users in account * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Import + * @return \TalonOne\Client\Model\InlineResponse20037 */ - public function importReferrals($applicationId, $campaignId, $upFile = null) + public function getUsers($pageSize = 1000, $skip = null, $sort = null) { - list($response) = $this->importReferralsWithHttpInfo($applicationId, $campaignId, $upFile); + list($response) = $this->getUsersWithHttpInfo($pageSize, $skip, $sort); return $response; } /** - * Operation importReferralsWithHttpInfo + * Operation getUsersWithHttpInfo * - * Import referrals + * List users in account * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20037, HTTP status code, HTTP response headers (array of strings) */ - public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function getUsersWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); + $request = $this->getUsersRequest($pageSize, $skip, $sort); try { $options = $this->createHttpClientOption(); @@ -28453,20 +29226,20 @@ public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20037' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20037', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Import'; + $returnType = '\TalonOne\Client\Model\InlineResponse20037'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -28485,7 +29258,7 @@ public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Import', + '\TalonOne\Client\Model\InlineResponse20037', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -28496,20 +29269,20 @@ public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile } /** - * Operation importReferralsAsync + * Operation getUsersAsync * - * Import referrals + * List users in account * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importReferralsAsync($applicationId, $campaignId, $upFile = null) + public function getUsersAsync($pageSize = 1000, $skip = null, $sort = null) { - return $this->importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + return $this->getUsersAsyncWithHttpInfo($pageSize, $skip, $sort) ->then( function ($response) { return $response[0]; @@ -28518,21 +29291,21 @@ function ($response) { } /** - * Operation importReferralsAsyncWithHttpInfo + * Operation getUsersAsyncWithHttpInfo * - * Import referrals + * List users in account * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + public function getUsersAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null) { - $returnType = '\TalonOne\Client\Model\Import'; - $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); + $returnType = '\TalonOne\Client\Model\InlineResponse20037'; + $request = $this->getUsersRequest($pageSize, $skip, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -28569,60 +29342,56 @@ function ($exception) { } /** - * Create request for operation 'importReferrals' + * Create request for operation 'getUsers' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $upFile The file with the information about the data that should be imported. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function importReferralsRequest($applicationId, $campaignId, $upFile = null) + protected function getUsersRequest($pageSize = 1000, $skip = null, $sort = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling importReferrals' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be smaller than or equal to 1000.'); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling importReferrals' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getUsers, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals'; + + $resourcePath = '/v1/users'; $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; } - - // form params - if ($upFile !== null) { - $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; } + + + // body params $_tempBody = null; @@ -28633,7 +29402,7 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['multipart/form-data'] + [] ); } @@ -28666,6 +29435,11 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -28685,7 +29459,7 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -28693,44 +29467,36 @@ protected function importReferralsRequest($applicationId, $campaignId, $upFile = } /** - * Operation listAccountCollections + * Operation getWebhook * - * List collections in account + * Get webhook * - * @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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20010|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Webhook */ - public function listAccountCollections($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhook($webhookId) { - list($response) = $this->listAccountCollectionsWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name); + list($response) = $this->getWebhookWithHttpInfo($webhookId); return $response; } /** - * Operation listAccountCollectionsWithHttpInfo + * Operation getWebhookWithHttpInfo * - * List collections in account + * Get webhook * - * @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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20010|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Webhook, HTTP status code, HTTP response headers (array of strings) */ - public function listAccountCollectionsWithHttpInfo($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookWithHttpInfo($webhookId) { - $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); + $request = $this->getWebhookRequest($webhookId); try { $options = $this->createHttpClientOption(); @@ -28763,56 +29529,20 @@ public function listAccountCollectionsWithHttpInfo($pageSize = null, $skip = nul $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20010' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20010', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Webhook' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Webhook', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20010'; + $returnType = '\TalonOne\Client\Model\Webhook'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -28831,31 +29561,7 @@ public function listAccountCollectionsWithHttpInfo($pageSize = null, $skip = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20010', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Webhook', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -28866,22 +29572,18 @@ public function listAccountCollectionsWithHttpInfo($pageSize = null, $skip = nul } /** - * Operation listAccountCollectionsAsync + * Operation getWebhookAsync * - * List collections in account + * Get webhook * - * @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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listAccountCollectionsAsync($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookAsync($webhookId) { - return $this->listAccountCollectionsAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name) + return $this->getWebhookAsyncWithHttpInfo($webhookId) ->then( function ($response) { return $response[0]; @@ -28890,23 +29592,19 @@ function ($response) { } /** - * Operation listAccountCollectionsAsyncWithHttpInfo + * Operation getWebhookAsyncWithHttpInfo * - * List collections in account + * Get webhook * - * @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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listAccountCollectionsAsyncWithHttpInfo($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookAsyncWithHttpInfo($webhookId) { - $returnType = '\TalonOne\Client\Model\InlineResponse20010'; - $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); + $returnType = '\TalonOne\Client\Model\Webhook'; + $request = $this->getWebhookRequest($webhookId); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -28943,71 +29641,39 @@ function ($exception) { } /** - * Create request for operation 'listAccountCollections' + * Create request for operation 'getWebhook' * - * @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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param int $webhookId The ID of the webhook. You can find the ID in the Campaign Manager's URL when you display the details of the webhook in **Account** > **Webhooks**. (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function listAccountCollectionsRequest($pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + protected function getWebhookRequest($webhookId) { - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be bigger than or equal to 1.'); + // verify the required parameter 'webhookId' is set + if ($webhookId === null || (is_array($webhookId) && count($webhookId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $webhookId when calling getWebhook' + ); } - - $resourcePath = '/v1/collections'; + $resourcePath = '/v1/webhooks/{webhookId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); - } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; - } - // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); - } - if ($name !== null) { - $queryParams['name'] = $name; - } + // path params + if ($webhookId !== null) { + $resourcePath = str_replace( + '{' . 'webhookId' . '}', + ObjectSerializer::toPathValue($webhookId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -29052,6 +29718,11 @@ protected function listAccountCollectionsRequest($pageSize = null, $skip = null, } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -29079,48 +29750,52 @@ protected function listAccountCollectionsRequest($pageSize = null, $skip = null, } /** - * Operation listCollections + * Operation getWebhookActivationLogs * - * List collections + * List webhook activation log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20034 */ - public function listCollections($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookActivationLogs($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { - list($response) = $this->listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + list($response) = $this->getWebhookActivationLogsWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); return $response; } /** - * Operation listCollectionsWithHttpInfo + * Operation getWebhookActivationLogsWithHttpInfo * - * List collections + * List webhook activation log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20034, HTTP status code, HTTP response headers (array of strings) */ - public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookActivationLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { - $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); try { $options = $this->createHttpClientOption(); @@ -29153,32 +29828,20 @@ public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSi $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20012' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20012', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20034' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20034', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse20012'; + $returnType = '\TalonOne\Client\Model\InlineResponse20034'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -29197,15 +29860,7 @@ public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20012', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20034', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -29216,24 +29871,26 @@ public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSi } /** - * Operation listCollectionsAsync + * Operation getWebhookActivationLogsAsync * - * List collections + * List webhook activation log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listCollectionsAsync($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookActivationLogsAsync($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { - return $this->listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) + return $this->getWebhookActivationLogsAsyncWithHttpInfo($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter) ->then( function ($response) { return $response[0]; @@ -29242,25 +29899,27 @@ function ($response) { } /** - * Operation listCollectionsAsyncWithHttpInfo + * Operation getWebhookActivationLogsAsyncWithHttpInfo * - * List collections + * List webhook activation log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookActivationLogsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20012'; - $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $returnType = '\TalonOne\Client\Model\InlineResponse20034'; + $request = $this->getWebhookActivationLogsRequest($pageSize, $skip, $sort, $integrationRequestUuid, $webhookId, $applicationId, $campaignId, $createdBefore, $createdAfter); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29297,42 +29956,32 @@ function ($exception) { } /** - * Create request for operation 'listCollections' + * Create request for operation 'getWebhookActivationLogs' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $integrationRequestUuid Filter results by integration request UUID. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (optional) + * @param float $campaignId Filter results by campaign. (optional) + * @param \DateTime $createdBefore Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function listCollectionsRequest($applicationId, $campaignId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + protected function getWebhookActivationLogsRequest($pageSize = 1000, $skip = null, $sort = null, $integrationRequestUuid = null, $webhookId = null, $applicationId = null, $campaignId = null, $createdBefore = null, $createdAfter = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling listCollections' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling listCollections' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookActivationLogs, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'; + $resourcePath = '/v1/webhook_activation_logs'; $formParams = []; $queryParams = []; $headerParams = []; @@ -29361,38 +30010,50 @@ protected function listCollectionsRequest($applicationId, $campaignId, $pageSize $queryParams['sort'] = $sort; } // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + if (is_array($integrationRequestUuid)) { + $integrationRequestUuid = ObjectSerializer::serializeCollection($integrationRequestUuid, '', true); } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; + if ($integrationRequestUuid !== null) { + $queryParams['integrationRequestUuid'] = $integrationRequestUuid; } // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); + if (is_array($webhookId)) { + $webhookId = ObjectSerializer::serializeCollection($webhookId, '', true); } - if ($name !== null) { - $queryParams['name'] = $name; + if ($webhookId !== null) { + $queryParams['webhookId'] = $webhookId; + } + // query params + if (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); } - - - // path params if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); + $queryParams['applicationId'] = $applicationId; + } + // query params + if (is_array($campaignId)) { + $campaignId = ObjectSerializer::serializeCollection($campaignId, '', true); } - // path params if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); + $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; } + + // body params $_tempBody = null; @@ -29436,6 +30097,11 @@ protected function listCollectionsRequest($applicationId, $campaignId, $pageSize } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -29463,46 +30129,54 @@ protected function listCollectionsRequest($applicationId, $campaignId, $pageSize } /** - * Operation listCollectionsInApplication + * Operation getWebhookLogs * - * List collections in application + * List webhook log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (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. 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\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\InlineResponse20035 */ - public function listCollectionsInApplication($applicationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookLogs($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - list($response) = $this->listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + list($response) = $this->getWebhookLogsWithHttpInfo($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); return $response; } /** - * Operation listCollectionsInApplicationWithHttpInfo + * Operation getWebhookLogsWithHttpInfo * - * List collections in application + * List webhook log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (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. 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\InlineResponse20012|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\InlineResponse20035, HTTP status code, HTTP response headers (array of strings) */ - public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookLogsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $request = $this->getWebhookLogsRequest($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); try { $options = $this->createHttpClientOption(); @@ -29535,32 +30209,20 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse20012' === '\SplFileObject') { + if ('\TalonOne\Client\Model\InlineResponse20035' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20012', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20035', []), $response->getStatusCode(), $response->getHeaders() ]; - case 404: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } + } - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\TalonOne\Client\Model\InlineResponse20012'; + $returnType = '\TalonOne\Client\Model\InlineResponse20035'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -29579,15 +30241,7 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse20012', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20035', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -29598,23 +30252,27 @@ public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSi } /** - * Operation listCollectionsInApplicationAsync + * Operation getWebhookLogsAsync * - * List collections in application + * List webhook log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (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. 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 listCollectionsInApplicationAsync($applicationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookLogsAsync($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - return $this->listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) + return $this->getWebhookLogsAsyncWithHttpInfo($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter) ->then( function ($response) { return $response[0]; @@ -29623,24 +30281,28 @@ function ($response) { } /** - * Operation listCollectionsInApplicationAsyncWithHttpInfo + * Operation getWebhookLogsAsyncWithHttpInfo * - * List collections in application + * List webhook log entries * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (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. 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 listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + public function getWebhookLogsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse20012'; - $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + $returnType = '\TalonOne\Client\Model\InlineResponse20035'; + $request = $this->getWebhookLogsRequest($pageSize, $skip, $sort, $status, $webhookId, $applicationId, $campaignId, $requestUuid, $createdBefore, $createdAfter); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -29677,35 +30339,33 @@ function ($exception) { } /** - * Create request for operation 'listCollectionsInApplication' + * Create request for operation 'getWebhookLogs' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $pageSize The number of items to include in this response. When omitted, the maximum value of 1000 will be used. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) * @param int $skip Skips the given number of items when paging through large result sets. (optional) - * @param string $sort The field by which results should be sorted. 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 includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) - * @param string $name Filter by the name of the Collection. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $status Filter results by HTTP status codes. (optional) + * @param float $webhookId Filter results by Webhook. (optional) + * @param float $applicationId Filter results by Application ID. (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. 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 */ - protected function listCollectionsInApplicationRequest($applicationId, $pageSize = null, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + protected function getWebhookLogsRequest($pageSize = 1000, $skip = null, $sort = null, $status = null, $webhookId = null, $applicationId = null, $campaignId = null, $requestUuid = null, $createdBefore = null, $createdAfter = null) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling listCollectionsInApplication' - ); - } if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be smaller than or equal to 1000.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookLogs, must be smaller than or equal to 1000.'); } if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be bigger than or equal to 1.'); + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhookLogs, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/applications/{applicationId}/collections'; + $resourcePath = '/v1/webhook_logs'; $formParams = []; $queryParams = []; $headerParams = []; @@ -29734,29 +30394,56 @@ protected function listCollectionsInApplicationRequest($applicationId, $pageSize $queryParams['sort'] = $sort; } // query params - if (is_array($withTotalResultSize)) { - $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + if (is_array($status)) { + $status = ObjectSerializer::serializeCollection($status, '', true); } - if ($withTotalResultSize !== null) { - $queryParams['withTotalResultSize'] = $withTotalResultSize; + if ($status !== null) { + $queryParams['status'] = $status; } // query params - if (is_array($name)) { - $name = ObjectSerializer::serializeCollection($name, '', true); + if (is_array($webhookId)) { + $webhookId = ObjectSerializer::serializeCollection($webhookId, '', true); } - if ($name !== null) { - $queryParams['name'] = $name; + if ($webhookId !== null) { + $queryParams['webhookId'] = $webhookId; + } + // query params + if (is_array($applicationId)) { + $applicationId = ObjectSerializer::serializeCollection($applicationId, '', true); } - - - // path params if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); + $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($requestUuid)) { + $requestUuid = ObjectSerializer::serializeCollection($requestUuid, '', true); + } + if ($requestUuid !== null) { + $queryParams['requestUuid'] = $requestUuid; + } + // 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; + } + + // body params $_tempBody = null; @@ -29801,6 +30488,11 @@ protected function listCollectionsInApplicationRequest($applicationId, $pageSize } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -29828,39 +30520,42 @@ protected function listCollectionsInApplicationRequest($applicationId, $pageSize } /** - * Operation removeLoyaltyPoints + * Operation getWebhooks * - * Deduct points in loyalty program for given customer + * List webhooks * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body body (required) + * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return void + * @return \TalonOne\Client\Model\InlineResponse20033 */ - public function removeLoyaltyPoints($loyaltyProgramId, $integrationId, $body) + public function getWebhooks($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) { - $this->removeLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId, $body); + list($response) = $this->getWebhooksWithHttpInfo($applicationIds, $sort, $pageSize, $skip); + return $response; } /** - * Operation removeLoyaltyPointsWithHttpInfo + * Operation getWebhooksWithHttpInfo * - * Deduct points in loyalty program for given customer + * List webhooks * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @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\InlineResponse20033, HTTP status code, HTTP response headers (array of strings) */ - public function removeLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId, $body) + public function getWebhooksWithHttpInfo($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) { - $request = $this->removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $body); + $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); try { $options = $this->createHttpClientOption(); @@ -29890,30 +30585,42 @@ public function removeLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationI ); } - return [null, $statusCode, $response->getHeaders()]; + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse20033' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20033', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse20033'; + $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 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 404: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\InlineResponse20033', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -29924,20 +30631,21 @@ public function removeLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationI } /** - * Operation removeLoyaltyPointsAsync + * Operation getWebhooksAsync * - * Deduct points in loyalty program for given customer + * List webhooks * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeLoyaltyPointsAsync($loyaltyProgramId, $integrationId, $body) + public function getWebhooksAsync($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) { - return $this->removeLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $body) + return $this->getWebhooksAsyncWithHttpInfo($applicationIds, $sort, $pageSize, $skip) ->then( function ($response) { return $response[0]; @@ -29946,27 +30654,39 @@ function ($response) { } /** - * Operation removeLoyaltyPointsAsyncWithHttpInfo + * Operation getWebhooksAsyncWithHttpInfo * - * Deduct points in loyalty program for given customer + * List webhooks * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function removeLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $body) + public function getWebhooksAsyncWithHttpInfo($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) { - $returnType = ''; - $request = $this->removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $body); + $returnType = '\TalonOne\Client\Model\InlineResponse20033'; + $request = $this->getWebhooksRequest($applicationIds, $sort, $pageSize, $skip); 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(); @@ -29986,67 +30706,66 @@ function ($exception) { } /** - * Create request for operation 'removeLoyaltyPoints' + * Create request for operation 'getWebhooks' * - * @param string $loyaltyProgramId The identifier for the loyalty program. (required) - * @param string $integrationId The identifier of the profile. (required) - * @param \TalonOne\Client\Model\LoyaltyPoints $body (required) + * @param string $applicationIds Filter by one or more application IDs separated by a comma. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $body) + protected function getWebhooksRequest($applicationIds = null, $sort = null, $pageSize = 1000, $skip = null) { - // verify the required parameter 'loyaltyProgramId' is set - if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $loyaltyProgramId when calling removeLoyaltyPoints' - ); - } - // 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 removeLoyaltyPoints' - ); + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be smaller than or equal to 1000.'); } - // 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 removeLoyaltyPoints' - ); + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.getWebhooks, must be bigger than or equal to 1.'); } - $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points'; + + $resourcePath = '/v1/webhooks'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - // path params - if ($loyaltyProgramId !== null) { - $resourcePath = str_replace( - '{' . 'loyaltyProgramId' . '}', - ObjectSerializer::toPathValue($loyaltyProgramId), - $resourcePath - ); + // query params + if (is_array($applicationIds)) { + $applicationIds = ObjectSerializer::serializeCollection($applicationIds, '', true); } - // path params - if ($integrationId !== null) { - $resourcePath = str_replace( - '{' . 'integrationId' . '}', - ObjectSerializer::toPathValue($integrationId), - $resourcePath - ); + if ($applicationIds !== null) { + $queryParams['applicationIds'] = $applicationIds; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + + // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -30055,7 +30774,7 @@ protected function removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + [] ); } @@ -30088,6 +30807,11 @@ protected function removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -30107,7 +30831,7 @@ protected function removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -30115,36 +30839,38 @@ protected function removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, } /** - * Operation resetPassword + * Operation importAccountCollection * - * Reset password + * Import data in existing account-level collection * - * @param \TalonOne\Client\Model\NewPassword $body body (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\NewPassword + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function resetPassword($body) + public function importAccountCollection($collectionId, $upFile = null) { - list($response) = $this->resetPasswordWithHttpInfo($body); + list($response) = $this->importAccountCollectionWithHttpInfo($collectionId, $upFile); return $response; } /** - * Operation resetPasswordWithHttpInfo + * Operation importAccountCollectionWithHttpInfo * - * Reset password + * Import data in existing account-level collection * - * @param \TalonOne\Client\Model\NewPassword $body (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\NewPassword, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function resetPasswordWithHttpInfo($body) + public function importAccountCollectionWithHttpInfo($collectionId, $upFile = null) { - $request = $this->resetPasswordRequest($body); + $request = $this->importAccountCollectionRequest($collectionId, $upFile); try { $options = $this->createHttpClientOption(); @@ -30176,21 +30902,45 @@ public function resetPasswordWithHttpInfo($body) $responseBody = $response->getBody(); switch($statusCode) { - case 204: - if ('\TalonOne\Client\Model\NewPassword' === '\SplFileObject') { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NewPassword', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\NewPassword'; + $returnType = '\TalonOne\Client\Model\Import'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -30206,10 +30956,26 @@ public function resetPasswordWithHttpInfo($body) } catch (ApiException $e) { switch ($e->getCode()) { - case 204: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\NewPassword', + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -30220,18 +30986,19 @@ public function resetPasswordWithHttpInfo($body) } /** - * Operation resetPasswordAsync + * Operation importAccountCollectionAsync * - * Reset password + * Import data in existing account-level collection * - * @param \TalonOne\Client\Model\NewPassword $body (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function resetPasswordAsync($body) + public function importAccountCollectionAsync($collectionId, $upFile = null) { - return $this->resetPasswordAsyncWithHttpInfo($body) + return $this->importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile) ->then( function ($response) { return $response[0]; @@ -30240,19 +31007,20 @@ function ($response) { } /** - * Operation resetPasswordAsyncWithHttpInfo + * Operation importAccountCollectionAsyncWithHttpInfo * - * Reset password + * Import data in existing account-level collection * - * @param \TalonOne\Client\Model\NewPassword $body (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function resetPasswordAsyncWithHttpInfo($body) + public function importAccountCollectionAsyncWithHttpInfo($collectionId, $upFile = null) { - $returnType = '\TalonOne\Client\Model\NewPassword'; - $request = $this->resetPasswordRequest($body); + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importAccountCollectionRequest($collectionId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -30289,23 +31057,24 @@ function ($exception) { } /** - * Create request for operation 'resetPassword' + * Create request for operation 'importAccountCollection' * - * @param \TalonOne\Client\Model\NewPassword $body (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function resetPasswordRequest($body) + protected function importAccountCollectionRequest($collectionId, $upFile = null) { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling resetPassword' + 'Missing the required parameter $collectionId when calling importAccountCollection' ); } - $resourcePath = '/v1/reset_password'; + $resourcePath = '/v1/collections/{collectionId}/import'; $formParams = []; $queryParams = []; $headerParams = []; @@ -30314,12 +31083,21 @@ protected function resetPasswordRequest($body) + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } // body params $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( @@ -30328,7 +31106,7 @@ protected function resetPasswordRequest($body) } else { $headers = $this->headerSelector->selectHeaders( ['application/json'], - ['application/json'] + ['multipart/form-data'] ); } @@ -30361,6 +31139,11 @@ protected function resetPasswordRequest($body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -30388,64 +31171,38 @@ protected function resetPasswordRequest($body) } /** - * Operation searchCouponsAdvancedApplicationWideWithoutTotalCount + * Operation importAllowedList * - * List coupons that match the given attributes (without total count) + * Import allowed values for attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param object $body body (required) - * @param int $pageSize The number of items 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) - * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2007 + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function searchCouponsAdvancedApplicationWideWithoutTotalCount($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 importAllowedList($attributeId, $upFile = null) { - list($response) = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + list($response) = $this->importAllowedListWithHttpInfo($attributeId, $upFile); return $response; } /** - * Operation searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo + * Operation importAllowedListWithHttpInfo * - * List coupons that match the given attributes (without total count) + * Import allowed values for attribute * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponse|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo($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 importAllowedListWithHttpInfo($attributeId, $upFile = null) { - $request = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + $request = $this->importAllowedListRequest($attributeId, $upFile); try { $options = $this->createHttpClientOption(); @@ -30478,24 +31235,60 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), $response->getStatusCode(), $response->getHeaders() ]; - } + case 400: + if ('\TalonOne\Client\Model\ErrorResponse' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { $content = (string) $responseBody; } @@ -30510,7 +31303,31 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2007', + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -30521,32 +31338,337 @@ public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInf } /** - * Operation searchCouponsAdvancedApplicationWideWithoutTotalCountAsync + * Operation importAllowedListAsync * - * List coupons that match the given attributes (without total count) + * Import allowed values for attribute + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importAllowedListAsync($attributeId, $upFile = null) + { + return $this->importAllowedListAsyncWithHttpInfo($attributeId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importAllowedListAsyncWithHttpInfo + * + * Import allowed values for attribute + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importAllowedListAsyncWithHttpInfo($attributeId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importAllowedListRequest($attributeId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importAllowedList' + * + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importAllowedListRequest($attributeId, $upFile = null) + { + // verify the required parameter 'attributeId' is set + if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $attributeId when calling importAllowedList' + ); + } + + $resourcePath = '/v1/attributes/{attributeId}/allowed_list/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($attributeId !== null) { + $resourcePath = str_replace( + '{' . 'attributeId' . '}', + ObjectSerializer::toPathValue($attributeId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importCollection + * + * Import data in existing collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function importCollection($applicationId, $campaignId, $collectionId, $upFile = null) + { + list($response) = $this->importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile); + return $response; + } + + /** + * Operation importCollectionWithHttpInfo + * + * Import data in existing collection + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function importCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) + { + $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importCollectionAsync + * + * Import data in existing collection + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function searchCouponsAdvancedApplicationWideWithoutTotalCountAsync($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 importCollectionAsync($applicationId, $campaignId, $collectionId, $upFile = null) { - return $this->searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) + return $this->importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile) ->then( function ($response) { return $response[0]; @@ -30555,33 +31677,22 @@ function ($response) { } /** - * Operation searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo + * Operation importCollectionAsyncWithHttpInfo * - * List coupons that match the given attributes (without total count) + * Import data in existing collection * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo($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 importCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $upFile = null) { - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; - $request = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -30618,154 +31729,5620 @@ function ($exception) { } /** - * Create request for operation 'searchCouponsAdvancedApplicationWideWithoutTotalCount' + * Create request for operation 'importCollection' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($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 importCollectionRequest($applicationId, $campaignId, $collectionId, $upFile = null) { // verify the required parameter 'applicationId' is set if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling searchCouponsAdvancedApplicationWideWithoutTotalCount' + 'Missing the required parameter $applicationId when calling importCollection' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling importCollection' + ); + } + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling importCollection' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importCoupons + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import + */ + public function importCoupons($applicationId, $campaignId, $upFile = null) + { + list($response) = $this->importCouponsWithHttpInfo($applicationId, $campaignId, $upFile); + return $response; + } + + /** + * Operation importCouponsWithHttpInfo + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + */ + public function importCouponsWithHttpInfo($applicationId, $campaignId, $upFile = null) + { + $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importCouponsAsync + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCouponsAsync($applicationId, $campaignId, $upFile = null) + { + return $this->importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importCouponsAsyncWithHttpInfo + * + * Import coupons + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importCouponsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importCouponsRequest($applicationId, $campaignId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importCoupons' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importCouponsRequest($applicationId, $campaignId, $upFile = null) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling importCoupons' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling importCoupons' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importLoyaltyCards + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function importLoyaltyCards($loyaltyProgramId, $upFile = null) + { + list($response) = $this->importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile); + return $response; + } + + /** + * Operation importLoyaltyCardsWithHttpInfo + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function importLoyaltyCardsWithHttpInfo($loyaltyProgramId, $upFile = null) + { + $request = $this->importLoyaltyCardsRequest($loyaltyProgramId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importLoyaltyCardsAsync + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importLoyaltyCardsAsync($loyaltyProgramId, $upFile = null) + { + return $this->importLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importLoyaltyCardsAsyncWithHttpInfo + * + * Import loyalty cards + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importLoyaltyCardsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importLoyaltyCardsRequest($loyaltyProgramId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->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 'importLoyaltyCards' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importLoyaltyCardsRequest($loyaltyProgramId, $upFile = null) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyCards' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_cards'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importLoyaltyPoints + * + * Import loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import + */ + public function importLoyaltyPoints($loyaltyProgramId, $upFile = null) + { + list($response) = $this->importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile); + return $response; + } + + /** + * Operation importLoyaltyPointsWithHttpInfo + * + * Import loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + */ + public function importLoyaltyPointsWithHttpInfo($loyaltyProgramId, $upFile = null) + { + $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importLoyaltyPointsAsync + * + * Import loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importLoyaltyPointsAsync($loyaltyProgramId, $upFile = null) + { + return $this->importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importLoyaltyPointsAsyncWithHttpInfo + * + * Import loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importLoyaltyPointsRequest($loyaltyProgramId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importLoyaltyPoints' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importLoyaltyPointsRequest($loyaltyProgramId, $upFile = null) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling importLoyaltyPoints' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/import_points'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importPoolGiveaways + * + * Import giveaway codes into a giveaway pool + * + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import + */ + public function importPoolGiveaways($poolId, $upFile = null) + { + list($response) = $this->importPoolGiveawaysWithHttpInfo($poolId, $upFile); + return $response; + } + + /** + * Operation importPoolGiveawaysWithHttpInfo + * + * Import giveaway codes into a giveaway pool + * + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + */ + public function importPoolGiveawaysWithHttpInfo($poolId, $upFile = null) + { + $request = $this->importPoolGiveawaysRequest($poolId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importPoolGiveawaysAsync + * + * Import giveaway codes into a giveaway pool + * + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importPoolGiveawaysAsync($poolId, $upFile = null) + { + return $this->importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importPoolGiveawaysAsyncWithHttpInfo + * + * Import giveaway codes into a giveaway pool + * + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importPoolGiveawaysAsyncWithHttpInfo($poolId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importPoolGiveawaysRequest($poolId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importPoolGiveaways' + * + * @param int $poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importPoolGiveawaysRequest($poolId, $upFile = null) + { + // verify the required parameter 'poolId' is set + if ($poolId === null || (is_array($poolId) && count($poolId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $poolId when calling importPoolGiveaways' + ); + } + + $resourcePath = '/v1/giveaways/pools/{poolId}/import'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($poolId !== null) { + $resourcePath = str_replace( + '{' . 'poolId' . '}', + ObjectSerializer::toPathValue($poolId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation importReferrals + * + * Import referrals + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Import + */ + public function importReferrals($applicationId, $campaignId, $upFile = null) + { + list($response) = $this->importReferralsWithHttpInfo($applicationId, $campaignId, $upFile); + return $response; + } + + /** + * Operation importReferralsWithHttpInfo + * + * Import referrals + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Import, HTTP status code, HTTP response headers (array of strings) + */ + public function importReferralsWithHttpInfo($applicationId, $campaignId, $upFile = null) + { + $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Import' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Import', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Import'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Import', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation importReferralsAsync + * + * Import referrals + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importReferralsAsync($applicationId, $campaignId, $upFile = null) + { + return $this->importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation importReferralsAsyncWithHttpInfo + * + * Import referrals + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function importReferralsAsyncWithHttpInfo($applicationId, $campaignId, $upFile = null) + { + $returnType = '\TalonOne\Client\Model\Import'; + $request = $this->importReferralsRequest($applicationId, $campaignId, $upFile); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'importReferrals' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param string $upFile The file with the information about the data that should be imported. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function importReferralsRequest($applicationId, $campaignId, $upFile = null) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling importReferrals' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling importReferrals' + ); + } + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + + // form params + if ($upFile !== null) { + $formParams['upFile'] = ObjectSerializer::toFormValue($upFile); + } + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['multipart/form-data'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listAccountCollections + * + * List collections in account + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse20015|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function listAccountCollections($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + list($response) = $this->listAccountCollectionsWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name); + return $response; + } + + /** + * Operation listAccountCollectionsWithHttpInfo + * + * List collections in account + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse20015|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function listAccountCollectionsWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse20015' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20015', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse20015', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listAccountCollectionsAsync + * + * List collections in account + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAccountCollectionsAsync($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + return $this->listAccountCollectionsAsyncWithHttpInfo($pageSize, $skip, $sort, $withTotalResultSize, $name) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listAccountCollectionsAsyncWithHttpInfo + * + * List collections in account + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listAccountCollectionsAsyncWithHttpInfo($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse20015'; + $request = $this->listAccountCollectionsRequest($pageSize, $skip, $sort, $withTotalResultSize, $name); + + 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 'listAccountCollections' + * + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listAccountCollectionsRequest($pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listAccountCollections, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/collections'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + + + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listCollections + * + * List collections + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function listCollections($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + list($response) = $this->listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + return $response; + } + + /** + * Operation listCollectionsWithHttpInfo + * + * List collections + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function listCollectionsWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse20017' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20017', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse20017', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listCollectionsAsync + * + * List collections + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCollectionsAsync($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + return $this->listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCollectionsAsyncWithHttpInfo + * + * List collections + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCollectionsAsyncWithHttpInfo($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $request = $this->listCollectionsRequest($applicationId, $campaignId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + + 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 'listCollections' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listCollectionsRequest($applicationId, $campaignId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling listCollections' + ); + } + // verify the required parameter 'campaignId' is set + if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $campaignId when calling listCollections' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollections, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + + + // path params + if ($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 ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation listCollectionsInApplication + * + * List collections in application + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function listCollectionsInApplication($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + list($response) = $this->listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + return $response; + } + + /** + * Operation listCollectionsInApplicationWithHttpInfo + * + * List collections in application + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse20017|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function listCollectionsInApplicationWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse20017' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse20017', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse20017', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listCollectionsInApplicationAsync + * + * List collections in application + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCollectionsInApplicationAsync($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + return $this->listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listCollectionsInApplicationAsyncWithHttpInfo + * + * List collections in application + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listCollectionsInApplicationAsyncWithHttpInfo($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse20017'; + $request = $this->listCollectionsInApplicationRequest($applicationId, $pageSize, $skip, $sort, $withTotalResultSize, $name); + + 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 'listCollectionsInApplication' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param bool $withTotalResultSize When this flag is set, the result includes the total size of the result, across all pages. This might decrease performance on large data sets. - When `true`: `hasMore` is true when there is a next page. `totalResultSize` is always zero. - When `false`: `hasMore` is always false. `totalResultSize` contains the total number of results for this query. (optional) + * @param string $name Filter by the name of the Collection. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function listCollectionsInApplicationRequest($applicationId, $pageSize = 1000, $skip = null, $sort = null, $withTotalResultSize = null, $name = null) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling listCollectionsInApplication' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.listCollectionsInApplication, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/applications/{applicationId}/collections'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + if (is_array($pageSize)) { + $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); + } + if ($pageSize !== null) { + $queryParams['pageSize'] = $pageSize; + } + // query params + if (is_array($skip)) { + $skip = ObjectSerializer::serializeCollection($skip, '', true); + } + if ($skip !== null) { + $queryParams['skip'] = $skip; + } + // query params + if (is_array($sort)) { + $sort = ObjectSerializer::serializeCollection($sort, '', true); + } + if ($sort !== null) { + $queryParams['sort'] = $sort; + } + // query params + if (is_array($withTotalResultSize)) { + $withTotalResultSize = ObjectSerializer::serializeCollection($withTotalResultSize, '', true); + } + if ($withTotalResultSize !== null) { + $queryParams['withTotalResultSize'] = $withTotalResultSize; + } + // query params + if (is_array($name)) { + $name = ObjectSerializer::serializeCollection($name, '', true); + } + if ($name !== null) { + $queryParams['name'] = $name; + } + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + [] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postAddedDeductedPointsNotification + * + * Create notification about added or deducted loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function postAddedDeductedPointsNotification($loyaltyProgramId, $body) + { + list($response) = $this->postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramId, $body); + return $response; + } + + /** + * Operation postAddedDeductedPointsNotificationWithHttpInfo + * + * Create notification about added or deducted loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function postAddedDeductedPointsNotificationWithHttpInfo($loyaltyProgramId, $body) + { + $request = $this->postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\BaseNotification' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\BaseNotification', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\BaseNotification'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\BaseNotification', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation postAddedDeductedPointsNotificationAsync + * + * Create notification about added or deducted loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postAddedDeductedPointsNotificationAsync($loyaltyProgramId, $body) + { + return $this->postAddedDeductedPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postAddedDeductedPointsNotificationAsyncWithHttpInfo + * + * Create notification about added or deducted loyalty points + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postAddedDeductedPointsNotificationAsyncWithHttpInfo($loyaltyProgramId, $body) + { + $returnType = '\TalonOne\Client\Model\BaseNotification'; + $request = $this->postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postAddedDeductedPointsNotification' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function postAddedDeductedPointsNotificationRequest($loyaltyProgramId, $body) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling postAddedDeductedPointsNotification' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling postAddedDeductedPointsNotification' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation postCatalogsStrikethroughNotification + * + * Create strikethrough notification + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function postCatalogsStrikethroughNotification($applicationId, $body) + { + list($response) = $this->postCatalogsStrikethroughNotificationWithHttpInfo($applicationId, $body); + return $response; + } + + /** + * Operation postCatalogsStrikethroughNotificationWithHttpInfo + * + * Create strikethrough notification + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\BaseNotification|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function postCatalogsStrikethroughNotificationWithHttpInfo($applicationId, $body) + { + $request = $this->postCatalogsStrikethroughNotificationRequest($applicationId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\BaseNotification' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\BaseNotification', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\BaseNotification'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\BaseNotification', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation postCatalogsStrikethroughNotificationAsync + * + * Create strikethrough notification + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postCatalogsStrikethroughNotificationAsync($applicationId, $body) + { + return $this->postCatalogsStrikethroughNotificationAsyncWithHttpInfo($applicationId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation postCatalogsStrikethroughNotificationAsyncWithHttpInfo + * + * Create strikethrough notification + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function postCatalogsStrikethroughNotificationAsyncWithHttpInfo($applicationId, $body) + { + $returnType = '\TalonOne\Client\Model\BaseNotification'; + $request = $this->postCatalogsStrikethroughNotificationRequest($applicationId, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'postCatalogsStrikethroughNotification' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\NewBaseNotification $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function postCatalogsStrikethroughNotificationRequest($applicationId, $body) + { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $applicationId when calling postCatalogsStrikethroughNotification' + ); + } + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling postCatalogsStrikethroughNotification' + ); + } + + $resourcePath = '/v1/catalogs/{applicationId}/notifications/strikethrough'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($applicationId !== null) { + $resourcePath = str_replace( + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation removeLoyaltyPoints + * + * Deduct points from customer profile + * + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function removeLoyaltyPoints($loyaltyProgramId, $integrationId, $body) + { + $this->removeLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId, $body); + } + + /** + * Operation removeLoyaltyPointsWithHttpInfo + * + * Deduct points from customer profile + * + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body 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) + */ + public function removeLoyaltyPointsWithHttpInfo($loyaltyProgramId, $integrationId, $body) + { + $request = $this->removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation removeLoyaltyPointsAsync + * + * Deduct points from customer profile + * + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeLoyaltyPointsAsync($loyaltyProgramId, $integrationId, $body) + { + return $this->removeLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation removeLoyaltyPointsAsyncWithHttpInfo + * + * Deduct points from customer profile + * + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function removeLoyaltyPointsAsyncWithHttpInfo($loyaltyProgramId, $integrationId, $body) + { + $returnType = ''; + $request = $this->removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $body); + + 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 'removeLoyaltyPoints' + * + * @param string $loyaltyProgramId The identifier for the loyalty program. (required) + * @param string $integrationId The identifier of the profile. (required) + * @param \TalonOne\Client\Model\DeductLoyaltyPoints $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function removeLoyaltyPointsRequest($loyaltyProgramId, $integrationId, $body) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling removeLoyaltyPoints' + ); + } + // 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 removeLoyaltyPoints' + ); + } + // 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 removeLoyaltyPoints' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($integrationId !== null) { + $resourcePath = str_replace( + '{' . 'integrationId' . '}', + ObjectSerializer::toPathValue($integrationId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation resetPassword + * + * Reset password + * + * @param \TalonOne\Client\Model\NewPassword $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\NewPassword + */ + public function resetPassword($body) + { + list($response) = $this->resetPasswordWithHttpInfo($body); + return $response; + } + + /** + * Operation resetPasswordWithHttpInfo + * + * Reset password + * + * @param \TalonOne\Client\Model\NewPassword $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\NewPassword, HTTP status code, HTTP response headers (array of strings) + */ + public function resetPasswordWithHttpInfo($body) + { + $request = $this->resetPasswordRequest($body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 204: + if ('\TalonOne\Client\Model\NewPassword' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\NewPassword', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\NewPassword'; + $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 204: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\NewPassword', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation resetPasswordAsync + * + * Reset password + * + * @param \TalonOne\Client\Model\NewPassword $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function resetPasswordAsync($body) + { + return $this->resetPasswordAsyncWithHttpInfo($body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation resetPasswordAsyncWithHttpInfo + * + * Reset password + * + * @param \TalonOne\Client\Model\NewPassword $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function resetPasswordAsyncWithHttpInfo($body) + { + $returnType = '\TalonOne\Client\Model\NewPassword'; + $request = $this->resetPasswordRequest($body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'resetPassword' + * + * @param \TalonOne\Client\Model\NewPassword $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function resetPasswordRequest($body) + { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling resetPassword' + ); + } + + $resourcePath = '/v1/reset_password'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation searchCouponsAdvancedApplicationWideWithoutTotalCount + * + * List coupons that match the given attributes (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\InlineResponse2008 + */ + public function searchCouponsAdvancedApplicationWideWithoutTotalCount($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + { + list($response) = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState); + return $response; + } + + /** + * Operation searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo + * + * List coupons that match the given attributes (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + */ + public function searchCouponsAdvancedApplicationWideWithoutTotalCountWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + { + $request = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $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 ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse2008', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation searchCouponsAdvancedApplicationWideWithoutTotalCountAsync + * + * List coupons that match the given attributes (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchCouponsAdvancedApplicationWideWithoutTotalCountAsync($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + { + return $this->searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $campaignState) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo + * + * List coupons that match the given attributes (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function searchCouponsAdvancedApplicationWideWithoutTotalCountAsyncWithHttpInfo($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $request = $this->searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($applicationId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $batchId, $exactMatch, $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 'searchCouponsAdvancedApplicationWideWithoutTotalCount' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param string $batchId Filter results by batches of coupons (optional) + * @param bool $exactMatch Filter results to an exact case-insensitive matching against the coupon code (optional, default to false) + * @param string $campaignState Filter results by the state of the campaign. - `enabled`: Campaigns that are scheduled, running (activated), or expired. - `running`: Campaigns that are running (activated). - `disabled`: Campaigns that are disabled. - `expired`: Campaigns that are expired. - `archived`: Campaigns that are archived. - `draft`: Campaigns that are drafts. (optional) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest($applicationId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $batchId = null, $exactMatch = false, $campaignState = null) + { + // 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 searchCouponsAdvancedApplicationWideWithoutTotalCount' + ); + } + // 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 searchCouponsAdvancedApplicationWideWithoutTotalCount' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedApplicationWideWithoutTotalCount, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedApplicationWideWithoutTotalCount, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/applications/{applicationId}/coupons_search_advanced/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); + } + 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($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 (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation searchCouponsAdvancedWithoutTotalCount + * + * List coupons that match the given attributes in campaign (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param 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\InlineResponse2008 + */ + public function searchCouponsAdvancedWithoutTotalCount($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + { + list($response) = $this->searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + return $response; + } + + /** + * Operation searchCouponsAdvancedWithoutTotalCountWithHttpInfo + * + * List coupons that match the given attributes in campaign (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param 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\InlineResponse2008, HTTP status code, HTTP response headers (array of strings) + */ + public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + { + $request = $this->searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\InlineResponse2008' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2008', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\InlineResponse2008', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation searchCouponsAdvancedWithoutTotalCountAsync + * + * List coupons that match the given attributes in campaign (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param 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 searchCouponsAdvancedWithoutTotalCountAsync($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + { + return $this->searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo + * + * List coupons that match the given attributes in campaign (without total count) + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param 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 searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + { + $returnType = '\TalonOne\Client\Model\InlineResponse2008'; + $request = $this->searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + + 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 'searchCouponsAdvancedWithoutTotalCount' + * + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param object $body body (required) + * @param int $pageSize The number of items in this response. (optional, default to 1000) + * @param int $skip Skips the given number of items when paging through large result sets. (optional) + * @param string $sort The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. **Note:** This parameter works only with numeric fields. (optional) + * @param string $value Filter results performing case-insensitive matching against the coupon code. Both the code and the query are folded to remove all non-alpha-numeric characters. (optional) + * @param \DateTime $createdBefore Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param \DateTime $createdAfter Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. (optional) + * @param string $valid Either \"expired\", \"validNow\", or \"validFuture\". The first option matches coupons in which the expiration date is set and in the past. The second matches coupons in which start date is null or in the past and expiration date is null or in the future, the third matches coupons in which start date is set and in the future. (optional) + * @param string $usable Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. (optional) + * @param int $referralId Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. (optional) + * @param string $recipientIntegrationId Filter results by match with a profile id specified in the coupon's RecipientIntegrationId field (optional) + * @param 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 searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $campaignId, $body, $pageSize = 1000, $skip = null, $sort = null, $value = null, $createdBefore = null, $createdAfter = null, $valid = null, $usable = null, $referralId = null, $recipientIntegrationId = null, $exactMatch = false, $batchId = null) + { + // 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 searchCouponsAdvancedWithoutTotalCount' + ); + } + // 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 searchCouponsAdvancedWithoutTotalCount' + ); + } + // 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 searchCouponsAdvancedWithoutTotalCount' + ); + } + if ($pageSize !== null && $pageSize > 1000) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedWithoutTotalCount, must be smaller than or equal to 1000.'); + } + if ($pageSize !== null && $pageSize < 1) { + throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedWithoutTotalCount, must be bigger than or equal to 1.'); + } + + + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/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); + } + 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; + } + // query params + if (is_array($batchId)) { + $batchId = ObjectSerializer::serializeCollection($batchId, '', true); + } + if ($batchId !== null) { + $queryParams['batchId'] = $batchId; + } + + + // 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'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'POST', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation transferLoyaltyCard + * + * Transfer card data + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\TransferLoyaltyCard $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return void + */ + public function transferLoyaltyCard($loyaltyProgramId, $loyaltyCardId, $body) + { + $this->transferLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); + } + + /** + * Operation transferLoyaltyCardWithHttpInfo + * + * Transfer card data + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\TransferLoyaltyCard $body 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) + */ + public function transferLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + { + $request = $this->transferLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + return [null, $statusCode, $response->getHeaders()]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation transferLoyaltyCardAsync + * + * Transfer card data + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\TransferLoyaltyCard $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function transferLoyaltyCardAsync($loyaltyProgramId, $loyaltyCardId, $body) + { + return $this->transferLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation transferLoyaltyCardAsyncWithHttpInfo + * + * Transfer card data + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\TransferLoyaltyCard $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function transferLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) + { + $returnType = ''; + $request = $this->transferLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $body); + + 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 'transferLoyaltyCard' + * + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\TransferLoyaltyCard $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function transferLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $body) + { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyProgramId when calling transferLoyaltyCard' + ); + } + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $loyaltyCardId when calling transferLoyaltyCard' + ); + } + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.transferLoyaltyCard, must be smaller than or equal to 108.'); + } + + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $body when calling transferLoyaltyCard' + ); + } + + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + + + // path params + if ($loyaltyProgramId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), + $resourcePath + ); + } + // path params + if ($loyaltyCardId !== null) { + $resourcePath = str_replace( + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), + $resourcePath + ); + } + + // body params + $_tempBody = null; + if (isset($body)) { + $_tempBody = $body; + } + + if ($multipart) { + $headers = $this->headerSelector->selectHeadersForMultipart( + ['application/json'] + ); + } else { + $headers = $this->headerSelector->selectHeaders( + ['application/json'], + ['application/json'] + ); + } + + // for model (json/xml) + if (isset($_tempBody)) { + // $_tempBody is the method argument, if present + if ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); + } else { + $httpBody = $_tempBody; + } + } elseif (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValue + ]; + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif ($headers['Content-Type'] === 'application/json') { + $httpBody = \GuzzleHttp\json_encode($formParams); + + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'PUT', + $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + + /** + * Operation updateAccountCollection + * + * Update account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCollection $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + */ + public function updateAccountCollection($collectionId, $body) + { + list($response) = $this->updateAccountCollectionWithHttpInfo($collectionId, $body); + return $response; + } + + /** + * Operation updateAccountCollectionWithHttpInfo + * + * Update account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCollection $body body (required) + * + * @throws \TalonOne\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + */ + public function updateAccountCollectionWithHttpInfo($collectionId, $body) + { + $request = $this->updateAccountCollectionRequest($collectionId, $body); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $request->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + + $responseBody = $response->getBody(); + switch($statusCode) { + case 200: + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 409: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\TalonOne\Client\Model\Collection'; + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\Collection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 409: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation updateAccountCollectionAsync + * + * Update account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCollection $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAccountCollectionAsync($collectionId, $body) + { + return $this->updateAccountCollectionAsyncWithHttpInfo($collectionId, $body) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation updateAccountCollectionAsyncWithHttpInfo + * + * Update account-level collection + * + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCollection $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function updateAccountCollectionAsyncWithHttpInfo($collectionId, $body) + { + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->updateAccountCollectionRequest($collectionId, $body); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + $responseBody = $response->getBody(); + if ($returnType === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'updateAccountCollection' + * + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCollection $body body (required) + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + protected function updateAccountCollectionRequest($collectionId, $body) + { + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling updateAccountCollection' ); } // 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 searchCouponsAdvancedApplicationWideWithoutTotalCount' + 'Missing the required parameter $body when calling updateAccountCollection' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedApplicationWideWithoutTotalCount, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedApplicationWideWithoutTotalCount, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/coupons_search_advanced/no_total'; + $resourcePath = '/v1/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // 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($campaignState)) { - $campaignState = ObjectSerializer::serializeCollection($campaignState, '', true); - } - if ($campaignState !== null) { - $queryParams['campaignState'] = $campaignState; - } // path params - if ($applicationId !== null) { + if ($collectionId !== null) { $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), $resourcePath ); } @@ -30816,6 +37393,11 @@ protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest( } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -30835,7 +37417,7 @@ protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest( $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -30843,64 +37425,38 @@ protected function searchCouponsAdvancedApplicationWideWithoutTotalCountRequest( } /** - * Operation searchCouponsAdvancedWithoutTotalCount + * Operation updateAdditionalCost * - * List coupons that match the given attributes in campaign (without total count) + * Update additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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 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) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\InlineResponse2007 + * @return \TalonOne\Client\Model\AccountAdditionalCost */ - public function searchCouponsAdvancedWithoutTotalCount($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 updateAdditionalCost($additionalCostId, $body) { - list($response) = $this->searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + list($response) = $this->updateAdditionalCostWithHttpInfo($additionalCostId, $body); return $response; } /** - * Operation searchCouponsAdvancedWithoutTotalCountWithHttpInfo + * Operation updateAdditionalCostWithHttpInfo * - * List coupons that match the given attributes in campaign (without total count) + * Update additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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 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) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\InlineResponse2007, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\AccountAdditionalCost, HTTP status code, HTTP response headers (array of strings) */ - public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($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 updateAdditionalCostWithHttpInfo($additionalCostId, $body) { - $request = $this->searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + $request = $this->updateAdditionalCostRequest($additionalCostId, $body); try { $options = $this->createHttpClientOption(); @@ -30933,20 +37489,20 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\InlineResponse2007' === '\SplFileObject') { + if ('\TalonOne\Client\Model\AccountAdditionalCost' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\InlineResponse2007', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAdditionalCost', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; + $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -30965,7 +37521,7 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\InlineResponse2007', + '\TalonOne\Client\Model\AccountAdditionalCost', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -30976,32 +37532,19 @@ public function searchCouponsAdvancedWithoutTotalCountWithHttpInfo($applicationI } /** - * Operation searchCouponsAdvancedWithoutTotalCountAsync + * Operation updateAdditionalCostAsync * - * List coupons that match the given attributes in campaign (without total count) + * Update additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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 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) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function searchCouponsAdvancedWithoutTotalCountAsync($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 updateAdditionalCostAsync($additionalCostId, $body) { - return $this->searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId) + return $this->updateAdditionalCostAsyncWithHttpInfo($additionalCostId, $body) ->then( function ($response) { return $response[0]; @@ -31010,33 +37553,20 @@ function ($response) { } /** - * Operation searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo + * Operation updateAdditionalCostAsyncWithHttpInfo * - * List coupons that match the given attributes in campaign (without total count) + * Update additional cost * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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 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) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function searchCouponsAdvancedWithoutTotalCountAsyncWithHttpInfo($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 updateAdditionalCostAsyncWithHttpInfo($additionalCostId, $body) { - $returnType = '\TalonOne\Client\Model\InlineResponse2007'; - $request = $this->searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $campaignId, $body, $pageSize, $skip, $sort, $value, $createdBefore, $createdAfter, $valid, $usable, $referralId, $recipientIntegrationId, $exactMatch, $batchId); + $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; + $request = $this->updateAdditionalCostRequest($additionalCostId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31073,161 +37603,43 @@ function ($exception) { } /** - * Create request for operation 'searchCouponsAdvancedWithoutTotalCount' + * Create request for operation 'updateAdditionalCost' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param object $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. 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 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) + * @param int $additionalCostId The ID of the additional cost. You can find the ID the the Campaign Manager's URL when you display the details of the cost in **Account** > **Tools** > **Additional costs**. (required) + * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function searchCouponsAdvancedWithoutTotalCountRequest($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 updateAdditionalCostRequest($additionalCostId, $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 searchCouponsAdvancedWithoutTotalCount' - ); - } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'additionalCostId' is set + if ($additionalCostId === null || (is_array($additionalCostId) && count($additionalCostId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling searchCouponsAdvancedWithoutTotalCount' + 'Missing the required parameter $additionalCostId when calling updateAdditionalCost' ); } // 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 searchCouponsAdvancedWithoutTotalCount' + 'Missing the required parameter $body when calling updateAdditionalCost' ); } - if ($pageSize !== null && $pageSize > 1000) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedWithoutTotalCount, must be smaller than or equal to 1000.'); - } - if ($pageSize !== null && $pageSize < 1) { - throw new \InvalidArgumentException('invalid value for "$pageSize" when calling ManagementApi.searchCouponsAdvancedWithoutTotalCount, must be bigger than or equal to 1.'); - } - - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total'; + $resourcePath = '/v1/additional_costs/{additionalCostId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - if (is_array($pageSize)) { - $pageSize = ObjectSerializer::serializeCollection($pageSize, '', true); - } - if ($pageSize !== null) { - $queryParams['pageSize'] = $pageSize; - } - // query params - if (is_array($skip)) { - $skip = ObjectSerializer::serializeCollection($skip, '', true); - } - if ($skip !== null) { - $queryParams['skip'] = $skip; - } - // query params - if (is_array($sort)) { - $sort = ObjectSerializer::serializeCollection($sort, '', true); - } - if ($sort !== null) { - $queryParams['sort'] = $sort; - } - // query params - if (is_array($value)) { - $value = ObjectSerializer::serializeCollection($value, '', true); - } - if ($value !== null) { - $queryParams['value'] = $value; - } - // query params - if (is_array($createdBefore)) { - $createdBefore = ObjectSerializer::serializeCollection($createdBefore, '', true); - } - if ($createdBefore !== null) { - $queryParams['createdBefore'] = $createdBefore; - } - // query params - if (is_array($createdAfter)) { - $createdAfter = ObjectSerializer::serializeCollection($createdAfter, '', true); - } - if ($createdAfter !== null) { - $queryParams['createdAfter'] = $createdAfter; - } - // query params - if (is_array($valid)) { - $valid = ObjectSerializer::serializeCollection($valid, '', true); - } - if ($valid !== null) { - $queryParams['valid'] = $valid; - } - // query params - if (is_array($usable)) { - $usable = ObjectSerializer::serializeCollection($usable, '', true); - } - if ($usable !== null) { - $queryParams['usable'] = $usable; - } - // query params - if (is_array($referralId)) { - $referralId = ObjectSerializer::serializeCollection($referralId, '', true); - } - if ($referralId !== null) { - $queryParams['referralId'] = $referralId; - } - // query params - if (is_array($recipientIntegrationId)) { - $recipientIntegrationId = ObjectSerializer::serializeCollection($recipientIntegrationId, '', true); - } - if ($recipientIntegrationId !== null) { - $queryParams['recipientIntegrationId'] = $recipientIntegrationId; - } - // query params - if (is_array($exactMatch)) { - $exactMatch = ObjectSerializer::serializeCollection($exactMatch, '', true); - } - 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 - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { + if ($additionalCostId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'additionalCostId' . '}', + ObjectSerializer::toPathValue($additionalCostId), $resourcePath ); } @@ -31278,6 +37690,11 @@ protected function searchCouponsAdvancedWithoutTotalCountRequest($applicationId, } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -31297,7 +37714,7 @@ protected function searchCouponsAdvancedWithoutTotalCountRequest($applicationId, $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -31305,38 +37722,38 @@ protected function searchCouponsAdvancedWithoutTotalCountRequest($applicationId, } /** - * Operation updateAccountCollection + * Operation updateAttribute * - * Update account-level collection + * Update custom attribute * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCollection $body body (required) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return \TalonOne\Client\Model\Attribute */ - public function updateAccountCollection($collectionId, $body) + public function updateAttribute($attributeId, $body) { - list($response) = $this->updateAccountCollectionWithHttpInfo($collectionId, $body); + list($response) = $this->updateAttributeWithHttpInfo($attributeId, $body); return $response; } /** - * Operation updateAccountCollectionWithHttpInfo + * Operation updateAttributeWithHttpInfo * - * Update account-level collection + * Update custom attribute * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCollection $body (required) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) */ - public function updateAccountCollectionWithHttpInfo($collectionId, $body) + public function updateAttributeWithHttpInfo($attributeId, $body) { - $request = $this->updateAccountCollectionRequest($collectionId, $body); + $request = $this->updateAttributeRequest($attributeId, $body); try { $options = $this->createHttpClientOption(); @@ -31369,56 +37786,20 @@ public function updateAccountCollectionWithHttpInfo($collectionId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 400: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 409: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Collection'; + $returnType = '\TalonOne\Client\Model\Attribute'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -31437,31 +37818,7 @@ public function updateAccountCollectionWithHttpInfo($collectionId, $body) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 400: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 409: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', + '\TalonOne\Client\Model\Attribute', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -31472,19 +37829,19 @@ public function updateAccountCollectionWithHttpInfo($collectionId, $body) } /** - * Operation updateAccountCollectionAsync + * Operation updateAttributeAsync * - * Update account-level collection + * Update custom attribute * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCollection $body (required) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAccountCollectionAsync($collectionId, $body) + public function updateAttributeAsync($attributeId, $body) { - return $this->updateAccountCollectionAsyncWithHttpInfo($collectionId, $body) + return $this->updateAttributeAsyncWithHttpInfo($attributeId, $body) ->then( function ($response) { return $response[0]; @@ -31493,20 +37850,20 @@ function ($response) { } /** - * Operation updateAccountCollectionAsyncWithHttpInfo + * Operation updateAttributeAsyncWithHttpInfo * - * Update account-level collection + * Update custom attribute * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCollection $body (required) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAccountCollectionAsyncWithHttpInfo($collectionId, $body) + public function updateAttributeAsyncWithHttpInfo($attributeId, $body) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->updateAccountCollectionRequest($collectionId, $body); + $returnType = '\TalonOne\Client\Model\Attribute'; + $request = $this->updateAttributeRequest($attributeId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31543,30 +37900,30 @@ function ($exception) { } /** - * Create request for operation 'updateAccountCollection' + * Create request for operation 'updateAttribute' * - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCollection $body (required) + * @param int $attributeId The ID of the attribute. You can find the ID in the Campaign Manager's URL when you display the details of an attribute in **Account** > **Tools** > **Attributes**. (required) + * @param \TalonOne\Client\Model\NewAttribute $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateAccountCollectionRequest($collectionId, $body) + protected function updateAttributeRequest($attributeId, $body) { - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + // verify the required parameter 'attributeId' is set + if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling updateAccountCollection' + 'Missing the required parameter $attributeId when calling updateAttribute' ); } // 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 updateAccountCollection' + 'Missing the required parameter $body when calling updateAttribute' ); } - $resourcePath = '/v1/collections/{collectionId}'; + $resourcePath = '/v1/attributes/{attributeId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -31576,10 +37933,10 @@ protected function updateAccountCollectionRequest($collectionId, $body) // path params - if ($collectionId !== null) { + if ($attributeId !== null) { $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), + '{' . 'attributeId' . '}', + ObjectSerializer::toPathValue($attributeId), $resourcePath ); } @@ -31630,6 +37987,11 @@ protected function updateAccountCollectionRequest($collectionId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -31657,38 +38019,40 @@ protected function updateAccountCollectionRequest($collectionId, $body) } /** - * Operation updateAdditionalCost + * Operation updateCampaign * - * Update additional cost + * Update campaign * - * @param int $additionalCostId additionalCostId (required) - * @param \TalonOne\Client\Model\NewAdditionalCost $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\UpdateCampaign $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\AccountAdditionalCost + * @return \TalonOne\Client\Model\Campaign */ - public function updateAdditionalCost($additionalCostId, $body) + public function updateCampaign($applicationId, $campaignId, $body) { - list($response) = $this->updateAdditionalCostWithHttpInfo($additionalCostId, $body); + list($response) = $this->updateCampaignWithHttpInfo($applicationId, $campaignId, $body); return $response; } /** - * Operation updateAdditionalCostWithHttpInfo + * Operation updateCampaignWithHttpInfo * - * Update additional cost + * Update campaign * - * @param int $additionalCostId (required) - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\UpdateCampaign $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\AccountAdditionalCost, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Campaign, HTTP status code, HTTP response headers (array of strings) */ - public function updateAdditionalCostWithHttpInfo($additionalCostId, $body) + public function updateCampaignWithHttpInfo($applicationId, $campaignId, $body) { - $request = $this->updateAdditionalCostRequest($additionalCostId, $body); + $request = $this->updateCampaignRequest($applicationId, $campaignId, $body); try { $options = $this->createHttpClientOption(); @@ -31721,20 +38085,20 @@ public function updateAdditionalCostWithHttpInfo($additionalCostId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\AccountAdditionalCost' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\AccountAdditionalCost', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Campaign', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; + $returnType = '\TalonOne\Client\Model\Campaign'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -31753,7 +38117,7 @@ public function updateAdditionalCostWithHttpInfo($additionalCostId, $body) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\AccountAdditionalCost', + '\TalonOne\Client\Model\Campaign', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -31764,19 +38128,20 @@ public function updateAdditionalCostWithHttpInfo($additionalCostId, $body) } /** - * Operation updateAdditionalCostAsync + * Operation updateCampaignAsync * - * Update additional cost + * Update campaign * - * @param int $additionalCostId (required) - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\UpdateCampaign $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAdditionalCostAsync($additionalCostId, $body) + public function updateCampaignAsync($applicationId, $campaignId, $body) { - return $this->updateAdditionalCostAsyncWithHttpInfo($additionalCostId, $body) + return $this->updateCampaignAsyncWithHttpInfo($applicationId, $campaignId, $body) ->then( function ($response) { return $response[0]; @@ -31785,20 +38150,21 @@ function ($response) { } /** - * Operation updateAdditionalCostAsyncWithHttpInfo + * Operation updateCampaignAsyncWithHttpInfo * - * Update additional cost + * Update campaign * - * @param int $additionalCostId (required) - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\UpdateCampaign $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAdditionalCostAsyncWithHttpInfo($additionalCostId, $body) + public function updateCampaignAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\AccountAdditionalCost'; - $request = $this->updateAdditionalCostRequest($additionalCostId, $body); + $returnType = '\TalonOne\Client\Model\Campaign'; + $request = $this->updateCampaignRequest($applicationId, $campaignId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -31835,30 +38201,37 @@ function ($exception) { } /** - * Create request for operation 'updateAdditionalCost' + * Create request for operation 'updateCampaign' * - * @param int $additionalCostId (required) - * @param \TalonOne\Client\Model\NewAdditionalCost $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param \TalonOne\Client\Model\UpdateCampaign $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateAdditionalCostRequest($additionalCostId, $body) + protected function updateCampaignRequest($applicationId, $campaignId, $body) { - // verify the required parameter 'additionalCostId' is set - if ($additionalCostId === null || (is_array($additionalCostId) && count($additionalCostId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $additionalCostId when calling updateAdditionalCost' + 'Missing the required parameter $applicationId when calling updateCampaign' + ); + } + // 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 updateCampaign' ); } // 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 updateAdditionalCost' + 'Missing the required parameter $body when calling updateCampaign' ); } - $resourcePath = '/v1/additional_costs/{additionalCostId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -31868,10 +38241,18 @@ protected function updateAdditionalCostRequest($additionalCostId, $body) // path params - if ($additionalCostId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'additionalCostId' . '}', - ObjectSerializer::toPathValue($additionalCostId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), $resourcePath ); } @@ -31922,6 +38303,11 @@ protected function updateAdditionalCostRequest($additionalCostId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -31949,38 +38335,42 @@ protected function updateAdditionalCostRequest($additionalCostId, $body) } /** - * Operation updateAttribute + * Operation updateCollection * - * Update custom attribute + * Update collection description * - * @param int $attributeId attributeId (required) - * @param \TalonOne\Client\Model\NewAttribute $body body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Attribute + * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function updateAttribute($attributeId, $body) + public function updateCollection($applicationId, $campaignId, $collectionId, $body) { - list($response) = $this->updateAttributeWithHttpInfo($attributeId, $body); + list($response) = $this->updateCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $body); return $response; } /** - * Operation updateAttributeWithHttpInfo + * Operation updateCollectionWithHttpInfo * - * Update custom attribute + * Update collection description * - * @param int $attributeId (required) - * @param \TalonOne\Client\Model\NewAttribute $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Attribute, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function updateAttributeWithHttpInfo($attributeId, $body) + public function updateCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $body) { - $request = $this->updateAttributeRequest($attributeId, $body); + $request = $this->updateCollectionRequest($applicationId, $campaignId, $collectionId, $body); try { $options = $this->createHttpClientOption(); @@ -32013,20 +38403,32 @@ public function updateAttributeWithHttpInfo($attributeId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Attribute' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Attribute', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Attribute'; + $returnType = '\TalonOne\Client\Model\Collection'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -32045,7 +38447,15 @@ public function updateAttributeWithHttpInfo($attributeId, $body) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Attribute', + '\TalonOne\Client\Model\Collection', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -32056,19 +38466,21 @@ public function updateAttributeWithHttpInfo($attributeId, $body) } /** - * Operation updateAttributeAsync + * Operation updateCollectionAsync * - * Update custom attribute + * Update collection description * - * @param int $attributeId (required) - * @param \TalonOne\Client\Model\NewAttribute $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAttributeAsync($attributeId, $body) + public function updateCollectionAsync($applicationId, $campaignId, $collectionId, $body) { - return $this->updateAttributeAsyncWithHttpInfo($attributeId, $body) + return $this->updateCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $body) ->then( function ($response) { return $response[0]; @@ -32077,20 +38489,22 @@ function ($response) { } /** - * Operation updateAttributeAsyncWithHttpInfo + * Operation updateCollectionAsyncWithHttpInfo * - * Update custom attribute + * Update collection description * - * @param int $attributeId (required) - * @param \TalonOne\Client\Model\NewAttribute $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAttributeAsyncWithHttpInfo($attributeId, $body) + public function updateCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $body) { - $returnType = '\TalonOne\Client\Model\Attribute'; - $request = $this->updateAttributeRequest($attributeId, $body); + $returnType = '\TalonOne\Client\Model\Collection'; + $request = $this->updateCollectionRequest($applicationId, $campaignId, $collectionId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32127,30 +38541,44 @@ function ($exception) { } /** - * Create request for operation 'updateAttribute' + * Create request for operation 'updateCollection' * - * @param int $attributeId (required) - * @param \TalonOne\Client\Model\NewAttribute $body (required) + * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) + * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) + * @param int $collectionId The ID of the collection. You can get it with the [List collection in account](#operation/listCollectionsInApplication) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateAttributeRequest($attributeId, $body) + protected function updateCollectionRequest($applicationId, $campaignId, $collectionId, $body) { - // verify the required parameter 'attributeId' is set - if ($attributeId === null || (is_array($attributeId) && count($attributeId) === 0)) { + // verify the required parameter 'applicationId' is set + if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $attributeId when calling updateAttribute' + 'Missing the required parameter $applicationId when calling updateCollection' + ); + } + // 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 updateCollection' + ); + } + // verify the required parameter 'collectionId' is set + if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $collectionId when calling updateCollection' ); } // 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 updateAttribute' + 'Missing the required parameter $body when calling updateCollection' ); } - $resourcePath = '/v1/attributes/{attributeId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -32160,10 +38588,26 @@ protected function updateAttributeRequest($attributeId, $body) // path params - if ($attributeId !== null) { + if ($applicationId !== null) { $resourcePath = str_replace( - '{' . 'attributeId' . '}', - ObjectSerializer::toPathValue($attributeId), + '{' . 'applicationId' . '}', + ObjectSerializer::toPathValue($applicationId), + $resourcePath + ); + } + // path params + if ($campaignId !== null) { + $resourcePath = str_replace( + '{' . 'campaignId' . '}', + ObjectSerializer::toPathValue($campaignId), + $resourcePath + ); + } + // path params + if ($collectionId !== null) { + $resourcePath = str_replace( + '{' . 'collectionId' . '}', + ObjectSerializer::toPathValue($collectionId), $resourcePath ); } @@ -32214,6 +38658,11 @@ protected function updateAttributeRequest($attributeId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -32241,40 +38690,42 @@ protected function updateAttributeRequest($attributeId, $body) } /** - * Operation updateCampaign + * Operation updateCoupon * - * Update campaign + * Update coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCampaign $body body (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) + * @param \TalonOne\Client\Model\UpdateCoupon $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Campaign + * @return \TalonOne\Client\Model\Coupon */ - public function updateCampaign($applicationId, $campaignId, $body) + public function updateCoupon($applicationId, $campaignId, $couponId, $body) { - list($response) = $this->updateCampaignWithHttpInfo($applicationId, $campaignId, $body); + list($response) = $this->updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, $body); return $response; } /** - * Operation updateCampaignWithHttpInfo + * Operation updateCouponWithHttpInfo * - * Update campaign + * Update coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCampaign $body (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) + * @param \TalonOne\Client\Model\UpdateCoupon $body body (required) * * @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\Coupon, HTTP status code, HTTP response headers (array of strings) */ - public function updateCampaignWithHttpInfo($applicationId, $campaignId, $body) + public function updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, $body) { - $request = $this->updateCampaignRequest($applicationId, $campaignId, $body); + $request = $this->updateCouponRequest($applicationId, $campaignId, $couponId, $body); try { $options = $this->createHttpClientOption(); @@ -32307,20 +38758,20 @@ public function updateCampaignWithHttpInfo($applicationId, $campaignId, $body) $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Campaign' === '\SplFileObject') { + if ('\TalonOne\Client\Model\Coupon' === '\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\Coupon', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Campaign'; + $returnType = '\TalonOne\Client\Model\Coupon'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -32339,7 +38790,7 @@ public function updateCampaignWithHttpInfo($applicationId, $campaignId, $body) case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Campaign', + '\TalonOne\Client\Model\Coupon', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -32350,20 +38801,21 @@ public function updateCampaignWithHttpInfo($applicationId, $campaignId, $body) } /** - * Operation updateCampaignAsync + * Operation updateCouponAsync * - * Update campaign + * Update coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCampaign $body (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) + * @param \TalonOne\Client\Model\UpdateCoupon $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCampaignAsync($applicationId, $campaignId, $body) + public function updateCouponAsync($applicationId, $campaignId, $couponId, $body) { - return $this->updateCampaignAsyncWithHttpInfo($applicationId, $campaignId, $body) + return $this->updateCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId, $body) ->then( function ($response) { return $response[0]; @@ -32372,21 +38824,22 @@ function ($response) { } /** - * Operation updateCampaignAsyncWithHttpInfo + * Operation updateCouponAsyncWithHttpInfo * - * Update campaign + * Update coupon * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCampaign $body (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) + * @param \TalonOne\Client\Model\UpdateCoupon $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCampaignAsyncWithHttpInfo($applicationId, $campaignId, $body) + public function updateCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId, $body) { - $returnType = '\TalonOne\Client\Model\Campaign'; - $request = $this->updateCampaignRequest($applicationId, $campaignId, $body); + $returnType = '\TalonOne\Client\Model\Coupon'; + $request = $this->updateCouponRequest($applicationId, $campaignId, $couponId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -32423,37 +38876,44 @@ function ($exception) { } /** - * Create request for operation 'updateCampaign' + * Create request for operation 'updateCoupon' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCampaign $body (required) + * @param string $couponId The internal ID of the coupon code. You can find this value in the `id` property from the [List coupons](https://docs.talon.one/management-api#tag/Coupons/operation/getCouponsWithoutTotalCount) endpoint response. (required) + * @param \TalonOne\Client\Model\UpdateCoupon $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateCampaignRequest($applicationId, $campaignId, $body) + protected function updateCouponRequest($applicationId, $campaignId, $couponId, $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 updateCampaign' + 'Missing the required parameter $applicationId when calling updateCoupon' ); } // 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 updateCampaign' + 'Missing the required parameter $campaignId when calling updateCoupon' + ); + } + // 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 updateCoupon' ); } // 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 updateCampaign' + 'Missing the required parameter $body when calling updateCoupon' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -32478,6 +38938,14 @@ protected function updateCampaignRequest($applicationId, $campaignId, $body) $resourcePath ); } + // path params + if ($couponId !== null) { + $resourcePath = str_replace( + '{' . 'couponId' . '}', + ObjectSerializer::toPathValue($couponId), + $resourcePath + ); + } // body params $_tempBody = null; @@ -32525,6 +38993,11 @@ protected function updateCampaignRequest($applicationId, $campaignId, $body) } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -32552,42 +39025,39 @@ protected function updateCampaignRequest($applicationId, $campaignId, $body) } /** - * Operation updateCollection + * Operation updateCouponBatch * - * Update collection description + * Update coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCampaignCollection $body body (required) + * @param \TalonOne\Client\Model\UpdateCouponBatch $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus + * @return void */ - public function updateCollection($applicationId, $campaignId, $collectionId, $body) + public function updateCouponBatch($applicationId, $campaignId, $body) { - list($response) = $this->updateCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $body); - return $response; + $this->updateCouponBatchWithHttpInfo($applicationId, $campaignId, $body); } /** - * Operation updateCollectionWithHttpInfo + * Operation updateCouponBatchWithHttpInfo * - * Update collection description + * Update coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCampaignCollection $body (required) + * @param \TalonOne\Client\Model\UpdateCouponBatch $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Collection|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function updateCollectionWithHttpInfo($applicationId, $campaignId, $collectionId, $body) + public function updateCouponBatchWithHttpInfo($applicationId, $campaignId, $body) { - $request = $this->updateCollectionRequest($applicationId, $campaignId, $collectionId, $body); + $request = $this->updateCouponBatchRequest($applicationId, $campaignId, $body); try { $options = $this->createHttpClientOption(); @@ -32617,87 +39087,30 @@ public function updateCollectionWithHttpInfo($applicationId, $campaignId, $colle ); } - $responseBody = $response->getBody(); - switch($statusCode) { - case 200: - if ('\TalonOne\Client\Model\Collection' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Collection', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - case 401: - if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), - $response->getStatusCode(), - $response->getHeaders() - ]; - } - - $returnType = '\TalonOne\Client\Model\Collection'; - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\Collection', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; - case 401: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\TalonOne\Client\Model\ErrorResponseWithStatus', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - break; } throw $e; } } /** - * Operation updateCollectionAsync + * Operation updateCouponBatchAsync * - * Update collection description + * Update coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCampaignCollection $body (required) + * @param \TalonOne\Client\Model\UpdateCouponBatch $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCollectionAsync($applicationId, $campaignId, $collectionId, $body) + public function updateCouponBatchAsync($applicationId, $campaignId, $body) { - return $this->updateCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $body) + return $this->updateCouponBatchAsyncWithHttpInfo($applicationId, $campaignId, $body) ->then( function ($response) { return $response[0]; @@ -32706,39 +39119,27 @@ function ($response) { } /** - * Operation updateCollectionAsyncWithHttpInfo + * Operation updateCouponBatchAsyncWithHttpInfo * - * Update collection description + * Update coupons * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCampaignCollection $body (required) + * @param \TalonOne\Client\Model\UpdateCouponBatch $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCollectionAsyncWithHttpInfo($applicationId, $campaignId, $collectionId, $body) + public function updateCouponBatchAsyncWithHttpInfo($applicationId, $campaignId, $body) { - $returnType = '\TalonOne\Client\Model\Collection'; - $request = $this->updateCollectionRequest($applicationId, $campaignId, $collectionId, $body); + $returnType = ''; + $request = $this->updateCouponBatchRequest($applicationId, $campaignId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - $responseBody = $response->getBody(); - if ($returnType === '\SplFileObject') { - $content = $responseBody; //stream goes to serializer - } else { - $content = (string) $responseBody; - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = $exception->getResponse(); @@ -32758,44 +39159,37 @@ function ($exception) { } /** - * Create request for operation 'updateCollection' + * Create request for operation 'updateCouponBatch' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param int $collectionId The ID of the collection. You can get it with the [List collection in account endpoint](#operation/listCollectionsInApplication). (required) - * @param \TalonOne\Client\Model\UpdateCampaignCollection $body (required) + * @param \TalonOne\Client\Model\UpdateCouponBatch $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateCollectionRequest($applicationId, $campaignId, $collectionId, $body) + protected function updateCouponBatchRequest($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 updateCollection' + 'Missing the required parameter $applicationId when calling updateCouponBatch' ); } // 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 updateCollection' - ); - } - // verify the required parameter 'collectionId' is set - if ($collectionId === null || (is_array($collectionId) && count($collectionId) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $collectionId when calling updateCollection' + 'Missing the required parameter $campaignId when calling updateCouponBatch' ); } // 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 updateCollection' + 'Missing the required parameter $body when calling updateCouponBatch' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}'; + $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; $formParams = []; $queryParams = []; $headerParams = []; @@ -32820,14 +39214,6 @@ protected function updateCollectionRequest($applicationId, $campaignId, $collect $resourcePath ); } - // path params - if ($collectionId !== null) { - $resourcePath = str_replace( - '{' . 'collectionId' . '}', - ObjectSerializer::toPathValue($collectionId), - $resourcePath - ); - } // body params $_tempBody = null; @@ -32837,11 +39223,11 @@ protected function updateCollectionRequest($applicationId, $campaignId, $collect if ($multipart) { $headers = $this->headerSelector->selectHeadersForMultipart( - ['application/json'] + [] ); } else { $headers = $this->headerSelector->selectHeaders( - ['application/json'], + [], ['application/json'] ); } @@ -32875,6 +39261,11 @@ protected function updateCollectionRequest($applicationId, $campaignId, $collect } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -32902,42 +39293,40 @@ protected function updateCollectionRequest($applicationId, $campaignId, $collect } /** - * Operation updateCoupon + * Operation updateLoyaltyCard * - * Update coupon + * Update loyalty card status * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (required) - * @param \TalonOne\Client\Model\UpdateCoupon $body body (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateLoyaltyCard $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \TalonOne\Client\Model\Coupon + * @return \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus */ - public function updateCoupon($applicationId, $campaignId, $couponId, $body) + public function updateLoyaltyCard($loyaltyProgramId, $loyaltyCardId, $body) { - list($response) = $this->updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, $body); + list($response) = $this->updateLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body); return $response; } /** - * Operation updateCouponWithHttpInfo + * Operation updateLoyaltyCardWithHttpInfo * - * Update coupon + * Update loyalty card status * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (required) - * @param \TalonOne\Client\Model\UpdateCoupon $body (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateLoyaltyCard $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \TalonOne\Client\Model\Coupon, HTTP status code, HTTP response headers (array of strings) + * @return array of \TalonOne\Client\Model\LoyaltyCard|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus|\TalonOne\Client\Model\ErrorResponseWithStatus, HTTP status code, HTTP response headers (array of strings) */ - public function updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, $body) + public function updateLoyaltyCardWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) { - $request = $this->updateCouponRequest($applicationId, $campaignId, $couponId, $body); + $request = $this->updateLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $body); try { $options = $this->createHttpClientOption(); @@ -32970,20 +39359,56 @@ public function updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, $responseBody = $response->getBody(); switch($statusCode) { case 200: - if ('\TalonOne\Client\Model\Coupon' === '\SplFileObject') { + if ('\TalonOne\Client\Model\LoyaltyCard' === '\SplFileObject') { $content = $responseBody; //stream goes to serializer } else { $content = (string) $responseBody; } return [ - ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\Coupon', []), + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\LoyaltyCard', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\TalonOne\Client\Model\ErrorResponseWithStatus' === '\SplFileObject') { + $content = $responseBody; //stream goes to serializer + } else { + $content = (string) $responseBody; + } + + return [ + ObjectSerializer::deserialize($content, '\TalonOne\Client\Model\ErrorResponseWithStatus', []), $response->getStatusCode(), $response->getHeaders() ]; } - $returnType = '\TalonOne\Client\Model\Coupon'; + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; $responseBody = $response->getBody(); if ($returnType === '\SplFileObject') { $content = $responseBody; //stream goes to serializer @@ -33002,7 +39427,31 @@ public function updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\TalonOne\Client\Model\Coupon', + '\TalonOne\Client\Model\LoyaltyCard', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\TalonOne\Client\Model\ErrorResponseWithStatus', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -33013,21 +39462,20 @@ public function updateCouponWithHttpInfo($applicationId, $campaignId, $couponId, } /** - * Operation updateCouponAsync + * Operation updateLoyaltyCardAsync * - * Update coupon + * Update loyalty card status * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (required) - * @param \TalonOne\Client\Model\UpdateCoupon $body (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateLoyaltyCard $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCouponAsync($applicationId, $campaignId, $couponId, $body) + public function updateLoyaltyCardAsync($loyaltyProgramId, $loyaltyCardId, $body) { - return $this->updateCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId, $body) + return $this->updateLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) ->then( function ($response) { return $response[0]; @@ -33036,22 +39484,21 @@ function ($response) { } /** - * Operation updateCouponAsyncWithHttpInfo + * Operation updateLoyaltyCardAsyncWithHttpInfo * - * Update coupon + * Update loyalty card status * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (required) - * @param \TalonOne\Client\Model\UpdateCoupon $body (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateLoyaltyCard $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateCouponAsyncWithHttpInfo($applicationId, $campaignId, $couponId, $body) + public function updateLoyaltyCardAsyncWithHttpInfo($loyaltyProgramId, $loyaltyCardId, $body) { - $returnType = '\TalonOne\Client\Model\Coupon'; - $request = $this->updateCouponRequest($applicationId, $campaignId, $couponId, $body); + $returnType = '\TalonOne\Client\Model\LoyaltyCard'; + $request = $this->updateLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -33088,44 +39535,41 @@ function ($exception) { } /** - * Create request for operation 'updateCoupon' + * Create request for operation 'updateLoyaltyCard' * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $couponId The ID of the coupon code to update (required) - * @param \TalonOne\Client\Model\UpdateCoupon $body (required) + * @param int $loyaltyProgramId Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. (required) + * @param string $loyaltyCardId Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. (required) + * @param \TalonOne\Client\Model\UpdateLoyaltyCard $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateCouponRequest($applicationId, $campaignId, $couponId, $body) + protected function updateLoyaltyCardRequest($loyaltyProgramId, $loyaltyCardId, $body) { - // verify the required parameter 'applicationId' is set - if ($applicationId === null || (is_array($applicationId) && count($applicationId) === 0)) { + // verify the required parameter 'loyaltyProgramId' is set + if ($loyaltyProgramId === null || (is_array($loyaltyProgramId) && count($loyaltyProgramId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $applicationId when calling updateCoupon' + 'Missing the required parameter $loyaltyProgramId when calling updateLoyaltyCard' ); } - // verify the required parameter 'campaignId' is set - if ($campaignId === null || (is_array($campaignId) && count($campaignId) === 0)) { + // verify the required parameter 'loyaltyCardId' is set + if ($loyaltyCardId === null || (is_array($loyaltyCardId) && count($loyaltyCardId) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $campaignId when calling updateCoupon' + 'Missing the required parameter $loyaltyCardId when calling updateLoyaltyCard' ); } - // 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 updateCoupon' - ); + if (strlen($loyaltyCardId) > 108) { + throw new \InvalidArgumentException('invalid length for "$loyaltyCardId" when calling ManagementApi.updateLoyaltyCard, must be smaller than or equal to 108.'); } + // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling updateCoupon' + 'Missing the required parameter $body when calling updateLoyaltyCard' ); } - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}'; + $resourcePath = '/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -33135,26 +39579,18 @@ protected function updateCouponRequest($applicationId, $campaignId, $couponId, $ // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { + if ($loyaltyProgramId !== null) { $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), + '{' . 'loyaltyProgramId' . '}', + ObjectSerializer::toPathValue($loyaltyProgramId), $resourcePath ); } // path params - if ($couponId !== null) { + if ($loyaltyCardId !== null) { $resourcePath = str_replace( - '{' . 'couponId' . '}', - ObjectSerializer::toPathValue($couponId), + '{' . 'loyaltyCardId' . '}', + ObjectSerializer::toPathValue($loyaltyCardId), $resourcePath ); } @@ -33210,264 +39646,6 @@ protected function updateCouponRequest($applicationId, $campaignId, $couponId, $ if ($apiKey !== null) { $headers['Authorization'] = $apiKey; } - - $defaultHeaders = []; - if ($this->config->getUserAgent()) { - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); - } - - $headers = array_merge( - $defaultHeaders, - $headerParams, - $headers - ); - - $query = ObjectSerializer::buildQuery($queryParams); - return new Request( - 'PUT', - $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), - $headers, - $httpBody - ); - } - - /** - * Operation updateCouponBatch - * - * Update coupons - * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCouponBatch $body body (required) - * - * @throws \TalonOne\Client\ApiException on non-2xx response - * @throws \InvalidArgumentException - * @return void - */ - public function updateCouponBatch($applicationId, $campaignId, $body) - { - $this->updateCouponBatchWithHttpInfo($applicationId, $campaignId, $body); - } - - /** - * Operation updateCouponBatchWithHttpInfo - * - * Update coupons - * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCouponBatch $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) - */ - public function updateCouponBatchWithHttpInfo($applicationId, $campaignId, $body) - { - $request = $this->updateCouponBatchRequest($applicationId, $campaignId, $body); - - try { - $options = $this->createHttpClientOption(); - try { - $response = $this->client->send($request, $options); - } catch (RequestException $e) { - throw new ApiException( - "[{$e->getCode()}] {$e->getMessage()}", - $e->getCode(), - $e->getResponse() ? $e->getResponse()->getHeaders() : null, - $e->getResponse() ? (string) $e->getResponse()->getBody() : null - ); - } - - $statusCode = $response->getStatusCode(); - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - $request->getUri() - ), - $statusCode, - $response->getHeaders(), - $response->getBody() - ); - } - - return [null, $statusCode, $response->getHeaders()]; - - } catch (ApiException $e) { - switch ($e->getCode()) { - } - throw $e; - } - } - - /** - * Operation updateCouponBatchAsync - * - * Update coupons - * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCouponBatch $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateCouponBatchAsync($applicationId, $campaignId, $body) - { - return $this->updateCouponBatchAsyncWithHttpInfo($applicationId, $campaignId, $body) - ->then( - function ($response) { - return $response[0]; - } - ); - } - - /** - * Operation updateCouponBatchAsyncWithHttpInfo - * - * Update coupons - * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCouponBatch $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface - */ - public function updateCouponBatchAsyncWithHttpInfo($applicationId, $campaignId, $body) - { - $returnType = ''; - $request = $this->updateCouponBatchRequest($applicationId, $campaignId, $body); - - 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 'updateCouponBatch' - * - * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param \TalonOne\Client\Model\UpdateCouponBatch $body (required) - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - protected function updateCouponBatchRequest($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 updateCouponBatch' - ); - } - // 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 updateCouponBatch' - ); - } - // 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 updateCouponBatch' - ); - } - - $resourcePath = '/v1/applications/{applicationId}/campaigns/{campaignId}/coupons'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - - - // path params - if ($applicationId !== null) { - $resourcePath = str_replace( - '{' . 'applicationId' . '}', - ObjectSerializer::toPathValue($applicationId), - $resourcePath - ); - } - // path params - if ($campaignId !== null) { - $resourcePath = str_replace( - '{' . 'campaignId' . '}', - ObjectSerializer::toPathValue($campaignId), - $resourcePath - ); - } - - // body params - $_tempBody = null; - if (isset($body)) { - $_tempBody = $body; - } - - if ($multipart) { - $headers = $this->headerSelector->selectHeadersForMultipart( - [] - ); - } else { - $headers = $this->headerSelector->selectHeaders( - [], - ['application/json'] - ); - } - - // for model (json/xml) - if (isset($_tempBody)) { - // $_tempBody is the method argument, if present - if ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody)); - } else { - $httpBody = $_tempBody; - } - } elseif (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValue - ]; - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif ($headers['Content-Type'] === 'application/json') { - $httpBody = \GuzzleHttp\json_encode($formParams); - - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } - // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -33497,10 +39675,10 @@ protected function updateCouponBatchRequest($applicationId, $campaignId, $body) /** * Operation updateNotificationWebhook * - * Update notification webhook + * Update notification about campaign-related changes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId notificationWebhookId (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -33516,11 +39694,11 @@ public function updateNotificationWebhook($applicationId, $notificationWebhookId /** * Operation updateNotificationWebhookWithHttpInfo * - * Update notification webhook + * Update notification about campaign-related changes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -33606,11 +39784,11 @@ public function updateNotificationWebhookWithHttpInfo($applicationId, $notificat /** * Operation updateNotificationWebhookAsync * - * Update notification webhook + * Update notification about campaign-related changes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -33628,11 +39806,11 @@ function ($response) { /** * Operation updateNotificationWebhookAsyncWithHttpInfo * - * Update notification webhook + * Update notification about campaign-related changes * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -33680,8 +39858,8 @@ function ($exception) { * Create request for operation 'updateNotificationWebhook' * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) - * @param int $notificationWebhookId (required) - * @param \TalonOne\Client\Model\NewNotificationWebhook $body (required) + * @param int $notificationWebhookId The ID of the webhook. Get it with the appropriate _List notifications_ endpoint. (required) + * @param \TalonOne\Client\Model\NewNotificationWebhook $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -33779,6 +39957,11 @@ protected function updateNotificationWebhookRequest($applicationId, $notificatio } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { @@ -33812,7 +39995,7 @@ protected function updateNotificationWebhookRequest($applicationId, $notificatio * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code to delete (required) + * @param string $referralId The ID of the referral code. (required) * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response @@ -33832,8 +40015,8 @@ public function updateReferral($applicationId, $campaignId, $referralId, $body) * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code to delete (required) - * @param \TalonOne\Client\Model\UpdateReferral $body (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \TalonOne\Client\ApiException on non-2xx response * @throws \InvalidArgumentException @@ -33923,8 +40106,8 @@ public function updateReferralWithHttpInfo($applicationId, $campaignId, $referra * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code to delete (required) - * @param \TalonOne\Client\Model\UpdateReferral $body (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -33946,8 +40129,8 @@ function ($response) { * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code to delete (required) - * @param \TalonOne\Client\Model\UpdateReferral $body (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface @@ -33996,8 +40179,8 @@ function ($exception) { * * @param int $applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. (required) * @param int $campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. (required) - * @param string $referralId The ID of the referral code to delete (required) - * @param \TalonOne\Client\Model\UpdateReferral $body (required) + * @param string $referralId The ID of the referral code. (required) + * @param \TalonOne\Client\Model\UpdateReferral $body body (required) * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request @@ -34109,6 +40292,11 @@ protected function updateReferralRequest($applicationId, $campaignId, $referralI } } + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); + if ($apiKey !== null) { + $headers['Authorization'] = $apiKey; + } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('Authorization'); if ($apiKey !== null) { diff --git a/lib/ApiException.php b/lib/ApiException.php index ab56f1ce..d80de740 100644 --- a/lib/ApiException.php +++ b/lib/ApiException.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Configuration.php b/lib/Configuration.php index 68637d6b..4e3fdd82 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -88,7 +88,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/4.0.1/PHP'; + protected $userAgent = 'OpenAPI-Generator/5.0.0/PHP'; /** * Debug switch (default set to false) @@ -396,8 +396,8 @@ public static function toDebugReport() $report = 'PHP SDK (TalonOne\Client) Debug Report:' . PHP_EOL; $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: 4.0.1' . PHP_EOL; + $report .= ' The version of the OpenAPI document: ' . PHP_EOL; + $report .= ' SDK Package Version: 5.0.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/HeaderSelector.php b/lib/HeaderSelector.php index a1795bfd..760fb116 100644 --- a/lib/HeaderSelector.php +++ b/lib/HeaderSelector.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/APIError.php b/lib/Model/APIError.php index cdd7c45a..d4b22bc9 100644 --- a/lib/Model/APIError.php +++ b/lib/Model/APIError.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AcceptCouponEffectProps.php b/lib/Model/AcceptCouponEffectProps.php index 6bd3041e..f3ec05c2 100644 --- a/lib/Model/AcceptCouponEffectProps.php +++ b/lib/Model/AcceptCouponEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AcceptReferralEffectProps.php b/lib/Model/AcceptReferralEffectProps.php index f54aeefc..65e8004d 100644 --- a/lib/Model/AcceptReferralEffectProps.php +++ b/lib/Model/AcceptReferralEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AccessLogEntry.php b/lib/Model/AccessLogEntry.php index d8e6682b..00659014 100644 --- a/lib/Model/AccessLogEntry.php +++ b/lib/Model/AccessLogEntry.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Account.php b/lib/Model/Account.php index 97e79c52..d7927262 100644 --- a/lib/Model/Account.php +++ b/lib/Model/Account.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -380,7 +380,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -404,7 +404,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -428,7 +428,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/AccountAdditionalCost.php b/lib/Model/AccountAdditionalCost.php index 16f80836..8f5ff543 100644 --- a/lib/Model/AccountAdditionalCost.php +++ b/lib/Model/AccountAdditionalCost.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -311,7 +311,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -335,7 +335,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -383,7 +383,7 @@ public function getName() /** * Sets name * - * @param string $name The additional cost name that will be used in API requests and Talang. E.g. if `name == \"shipping\"` then you would set the shipping additional cost by including an `additionalCosts.shipping` property in your request payload. + * @param string $name The internal name used in API requests. * * @return $this */ @@ -489,7 +489,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of additional cost. The following options can be chosen: - `session`: Additional cost will be added per session, - `item`: Additional cost will be added per item, - `both`: Additional cost will be added per item and session. + * @param string|null $type The type of additional cost. Possible value: - `session`: Additional cost will be added per session. - `item`: Additional cost will be added per item. - `both`: Additional cost will be added per item and session. * * @return $this */ diff --git a/lib/Model/AccountAnalytics.php b/lib/Model/AccountAnalytics.php index 39b9f7e2..8a06303c 100644 --- a/lib/Model/AccountAnalytics.php +++ b/lib/Model/AccountAnalytics.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AccountDashboardStatistic.php b/lib/Model/AccountDashboardStatistic.php new file mode 100644 index 00000000..84a6d71e --- /dev/null +++ b/lib/Model/AccountDashboardStatistic.php @@ -0,0 +1,460 @@ + '\TalonOne\Client\Model\AccountDashboardStatisticRevenue[]', + 'discounts' => '\TalonOne\Client\Model\AccountDashboardStatisticDiscount[]', + 'loyaltyPoints' => '\TalonOne\Client\Model\AccountDashboardStatisticLoyaltyPoints[]', + 'referrals' => '\TalonOne\Client\Model\AccountDashboardStatisticReferrals[]', + 'apiCalls' => '\TalonOne\Client\Model\AccountDashboardStatisticApiCalls[]', + 'campaigns' => '\TalonOne\Client\Model\AccountDashboardStatisticCampaigns' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'revenue' => null, + 'discounts' => null, + 'loyaltyPoints' => null, + 'referrals' => null, + 'apiCalls' => null, + 'campaigns' => 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 = [ + 'revenue' => 'revenue', + 'discounts' => 'discounts', + 'loyaltyPoints' => 'loyaltyPoints', + 'referrals' => 'referrals', + 'apiCalls' => 'apiCalls', + 'campaigns' => 'campaigns' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'revenue' => 'setRevenue', + 'discounts' => 'setDiscounts', + 'loyaltyPoints' => 'setLoyaltyPoints', + 'referrals' => 'setReferrals', + 'apiCalls' => 'setApiCalls', + 'campaigns' => 'setCampaigns' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'revenue' => 'getRevenue', + 'discounts' => 'getDiscounts', + 'loyaltyPoints' => 'getLoyaltyPoints', + 'referrals' => 'getReferrals', + 'apiCalls' => 'getApiCalls', + 'campaigns' => 'getCampaigns' + ]; + + /** + * 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['revenue'] = isset($data['revenue']) ? $data['revenue'] : null; + $this->container['discounts'] = isset($data['discounts']) ? $data['discounts'] : null; + $this->container['loyaltyPoints'] = isset($data['loyaltyPoints']) ? $data['loyaltyPoints'] : null; + $this->container['referrals'] = isset($data['referrals']) ? $data['referrals'] : null; + $this->container['apiCalls'] = isset($data['apiCalls']) ? $data['apiCalls'] : null; + $this->container['campaigns'] = isset($data['campaigns']) ? $data['campaigns'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['campaigns'] === null) { + $invalidProperties[] = "'campaigns' 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 revenue + * + * @return \TalonOne\Client\Model\AccountDashboardStatisticRevenue[]|null + */ + public function getRevenue() + { + return $this->container['revenue']; + } + + /** + * Sets revenue + * + * @param \TalonOne\Client\Model\AccountDashboardStatisticRevenue[]|null $revenue Aggregated statistic for account revenue. + * + * @return $this + */ + public function setRevenue($revenue) + { + $this->container['revenue'] = $revenue; + + return $this; + } + + /** + * Gets discounts + * + * @return \TalonOne\Client\Model\AccountDashboardStatisticDiscount[]|null + */ + public function getDiscounts() + { + return $this->container['discounts']; + } + + /** + * Sets discounts + * + * @param \TalonOne\Client\Model\AccountDashboardStatisticDiscount[]|null $discounts Aggregated statistic for account discount. + * + * @return $this + */ + public function setDiscounts($discounts) + { + $this->container['discounts'] = $discounts; + + return $this; + } + + /** + * Gets loyaltyPoints + * + * @return \TalonOne\Client\Model\AccountDashboardStatisticLoyaltyPoints[]|null + */ + public function getLoyaltyPoints() + { + return $this->container['loyaltyPoints']; + } + + /** + * Sets loyaltyPoints + * + * @param \TalonOne\Client\Model\AccountDashboardStatisticLoyaltyPoints[]|null $loyaltyPoints Aggregated statistic for account loyalty points. + * + * @return $this + */ + public function setLoyaltyPoints($loyaltyPoints) + { + $this->container['loyaltyPoints'] = $loyaltyPoints; + + return $this; + } + + /** + * Gets referrals + * + * @return \TalonOne\Client\Model\AccountDashboardStatisticReferrals[]|null + */ + public function getReferrals() + { + return $this->container['referrals']; + } + + /** + * Sets referrals + * + * @param \TalonOne\Client\Model\AccountDashboardStatisticReferrals[]|null $referrals Aggregated statistic for account referrals. + * + * @return $this + */ + public function setReferrals($referrals) + { + $this->container['referrals'] = $referrals; + + return $this; + } + + /** + * Gets apiCalls + * + * @return \TalonOne\Client\Model\AccountDashboardStatisticApiCalls[]|null + */ + public function getApiCalls() + { + return $this->container['apiCalls']; + } + + /** + * Sets apiCalls + * + * @param \TalonOne\Client\Model\AccountDashboardStatisticApiCalls[]|null $apiCalls Aggregated statistic for the number of account API calls. + * + * @return $this + */ + public function setApiCalls($apiCalls) + { + $this->container['apiCalls'] = $apiCalls; + + return $this; + } + + /** + * Gets campaigns + * + * @return \TalonOne\Client\Model\AccountDashboardStatisticCampaigns + */ + public function getCampaigns() + { + return $this->container['campaigns']; + } + + /** + * Sets campaigns + * + * @param \TalonOne\Client\Model\AccountDashboardStatisticCampaigns $campaigns campaigns + * + * @return $this + */ + public function setCampaigns($campaigns) + { + $this->container['campaigns'] = $campaigns; + + 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/AccountDashboardStatisticApiCalls.php b/lib/Model/AccountDashboardStatisticApiCalls.php new file mode 100644 index 00000000..62bdcc5e --- /dev/null +++ b/lib/Model/AccountDashboardStatisticApiCalls.php @@ -0,0 +1,343 @@ + 'float', + 'datetime' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'total' => null, + 'datetime' => 'date-time' + ]; + + /** + * 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 = [ + 'total' => 'total', + 'datetime' => 'datetime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'datetime' => 'setDatetime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'datetime' => 'getDatetime' + ]; + + /** + * 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['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['datetime'] = isset($data['datetime']) ? $data['datetime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['datetime'] === null) { + $invalidProperties[] = "'datetime' 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 total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total number of API calls received. + * + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets datetime + * + * @return \DateTime + */ + public function getDatetime() + { + return $this->container['datetime']; + } + + /** + * Sets datetime + * + * @param \DateTime $datetime Values aggregated for the specified date. + * + * @return $this + */ + public function setDatetime($datetime) + { + $this->container['datetime'] = $datetime; + + 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/AccountDashboardStatisticCampaigns.php b/lib/Model/AccountDashboardStatisticCampaigns.php new file mode 100644 index 00000000..2ea35dec --- /dev/null +++ b/lib/Model/AccountDashboardStatisticCampaigns.php @@ -0,0 +1,343 @@ + 'int', + 'endingSoon' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'live' => null, + 'endingSoon' => 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 = [ + 'live' => 'live', + 'endingSoon' => 'endingSoon' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'live' => 'setLive', + 'endingSoon' => 'setEndingSoon' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'live' => 'getLive', + 'endingSoon' => 'getEndingSoon' + ]; + + /** + * 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['live'] = isset($data['live']) ? $data['live'] : null; + $this->container['endingSoon'] = isset($data['endingSoon']) ? $data['endingSoon'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['live'] === null) { + $invalidProperties[] = "'live' can't be null"; + } + if ($this->container['endingSoon'] === null) { + $invalidProperties[] = "'endingSoon' 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 live + * + * @return int + */ + public function getLive() + { + return $this->container['live']; + } + + /** + * Sets live + * + * @param int $live Number of campaigns that are active and live (across all Applications). + * + * @return $this + */ + public function setLive($live) + { + $this->container['live'] = $live; + + return $this; + } + + /** + * Gets endingSoon + * + * @return int + */ + public function getEndingSoon() + { + return $this->container['endingSoon']; + } + + /** + * Sets endingSoon + * + * @param int $endingSoon Campaigns with a schedule ending in 7 days or with only 10% of budget left. + * + * @return $this + */ + public function setEndingSoon($endingSoon) + { + $this->container['endingSoon'] = $endingSoon; + + 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/AccountDashboardStatisticDiscount.php b/lib/Model/AccountDashboardStatisticDiscount.php new file mode 100644 index 00000000..7d737b93 --- /dev/null +++ b/lib/Model/AccountDashboardStatisticDiscount.php @@ -0,0 +1,376 @@ + 'float', + 'average' => 'float', + 'datetime' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'total' => null, + 'average' => null, + 'datetime' => 'date-time' + ]; + + /** + * 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 = [ + 'total' => 'total', + 'average' => 'average', + 'datetime' => 'datetime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'average' => 'setAverage', + 'datetime' => 'setDatetime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'average' => 'getAverage', + 'datetime' => 'getDatetime' + ]; + + /** + * 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['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['average'] = isset($data['average']) ? $data['average'] : null; + $this->container['datetime'] = isset($data['datetime']) ? $data['datetime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['average'] === null) { + $invalidProperties[] = "'average' can't be null"; + } + if ($this->container['datetime'] === null) { + $invalidProperties[] = "'datetime' 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 total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total discount value redeemed by users. + * + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets average + * + * @return float + */ + public function getAverage() + { + return $this->container['average']; + } + + /** + * Sets average + * + * @param float $average Average discount percentage. + * + * @return $this + */ + public function setAverage($average) + { + $this->container['average'] = $average; + + return $this; + } + + /** + * Gets datetime + * + * @return \DateTime + */ + public function getDatetime() + { + return $this->container['datetime']; + } + + /** + * Sets datetime + * + * @param \DateTime $datetime Values aggregated for the specified date. + * + * @return $this + */ + public function setDatetime($datetime) + { + $this->container['datetime'] = $datetime; + + 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/AccountDashboardStatisticLoyaltyPoints.php b/lib/Model/AccountDashboardStatisticLoyaltyPoints.php new file mode 100644 index 00000000..47357245 --- /dev/null +++ b/lib/Model/AccountDashboardStatisticLoyaltyPoints.php @@ -0,0 +1,343 @@ + 'float', + 'datetime' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'total' => null, + 'datetime' => 'date-time' + ]; + + /** + * 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 = [ + 'total' => 'total', + 'datetime' => 'datetime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'datetime' => 'setDatetime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'datetime' => 'getDatetime' + ]; + + /** + * 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['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['datetime'] = isset($data['datetime']) ? $data['datetime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['datetime'] === null) { + $invalidProperties[] = "'datetime' 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 total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total loyalty points earned by users. + * + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets datetime + * + * @return \DateTime + */ + public function getDatetime() + { + return $this->container['datetime']; + } + + /** + * Sets datetime + * + * @param \DateTime $datetime Values aggregated for the specified date. + * + * @return $this + */ + public function setDatetime($datetime) + { + $this->container['datetime'] = $datetime; + + 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/AccountDashboardStatisticReferrals.php b/lib/Model/AccountDashboardStatisticReferrals.php new file mode 100644 index 00000000..0a094c0a --- /dev/null +++ b/lib/Model/AccountDashboardStatisticReferrals.php @@ -0,0 +1,343 @@ + 'float', + 'datetime' => '\DateTime' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'total' => null, + 'datetime' => 'date-time' + ]; + + /** + * 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 = [ + 'total' => 'total', + 'datetime' => 'datetime' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'total' => 'setTotal', + 'datetime' => 'setDatetime' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'total' => 'getTotal', + 'datetime' => 'getDatetime' + ]; + + /** + * 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['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['datetime'] = isset($data['datetime']) ? $data['datetime'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; + } + if ($this->container['datetime'] === null) { + $invalidProperties[] = "'datetime' 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 total + * + * @return float + */ + public function getTotal() + { + return $this->container['total']; + } + + /** + * Sets total + * + * @param float $total Total number of referrals initiated by users. + * + * @return $this + */ + public function setTotal($total) + { + $this->container['total'] = $total; + + return $this; + } + + /** + * Gets datetime + * + * @return \DateTime + */ + public function getDatetime() + { + return $this->container['datetime']; + } + + /** + * Sets datetime + * + * @param \DateTime $datetime Values aggregated for the specified date. + * + * @return $this + */ + public function setDatetime($datetime) + { + $this->container['datetime'] = $datetime; + + 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/LoyaltyProjection.php b/lib/Model/AccountDashboardStatisticRevenue.php similarity index 65% rename from lib/Model/LoyaltyProjection.php rename to lib/Model/AccountDashboardStatisticRevenue.php index 8aa3a1f5..dc68db91 100644 --- a/lib/Model/LoyaltyProjection.php +++ b/lib/Model/AccountDashboardStatisticRevenue.php @@ -1,6 +1,6 @@ '\TalonOne\Client\Model\LoyaltyProjectionData[]', - 'totalExpiringPoints' => 'float', - 'totalActivatingPoints' => 'float' + 'total' => 'float', + 'influenced' => 'float', + 'datetime' => '\DateTime' ]; /** @@ -69,9 +68,9 @@ class LoyaltyProjection implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'projections' => null, - 'totalExpiringPoints' => null, - 'totalActivatingPoints' => null + 'total' => null, + 'influenced' => null, + 'datetime' => 'date-time' ]; /** @@ -101,9 +100,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'projections' => 'projections', - 'totalExpiringPoints' => 'totalExpiringPoints', - 'totalActivatingPoints' => 'totalActivatingPoints' + 'total' => 'total', + 'influenced' => 'influenced', + 'datetime' => 'datetime' ]; /** @@ -112,9 +111,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'projections' => 'setProjections', - 'totalExpiringPoints' => 'setTotalExpiringPoints', - 'totalActivatingPoints' => 'setTotalActivatingPoints' + 'total' => 'setTotal', + 'influenced' => 'setInfluenced', + 'datetime' => 'setDatetime' ]; /** @@ -123,9 +122,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'projections' => 'getProjections', - 'totalExpiringPoints' => 'getTotalExpiringPoints', - 'totalActivatingPoints' => 'getTotalActivatingPoints' + 'total' => 'getTotal', + 'influenced' => 'getInfluenced', + 'datetime' => 'getDatetime' ]; /** @@ -188,9 +187,9 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['projections'] = isset($data['projections']) ? $data['projections'] : null; - $this->container['totalExpiringPoints'] = isset($data['totalExpiringPoints']) ? $data['totalExpiringPoints'] : null; - $this->container['totalActivatingPoints'] = isset($data['totalActivatingPoints']) ? $data['totalActivatingPoints'] : null; + $this->container['total'] = isset($data['total']) ? $data['total'] : null; + $this->container['influenced'] = isset($data['influenced']) ? $data['influenced'] : null; + $this->container['datetime'] = isset($data['datetime']) ? $data['datetime'] : null; } /** @@ -202,11 +201,14 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalExpiringPoints'] === null) { - $invalidProperties[] = "'totalExpiringPoints' can't be null"; + if ($this->container['total'] === null) { + $invalidProperties[] = "'total' can't be null"; } - if ($this->container['totalActivatingPoints'] === null) { - $invalidProperties[] = "'totalActivatingPoints' can't be null"; + if ($this->container['influenced'] === null) { + $invalidProperties[] = "'influenced' can't be null"; + } + if ($this->container['datetime'] === null) { + $invalidProperties[] = "'datetime' can't be null"; } return $invalidProperties; } @@ -224,73 +226,73 @@ public function valid() /** - * Gets projections + * Gets total * - * @return \TalonOne\Client\Model\LoyaltyProjectionData[]|null + * @return float */ - public function getProjections() + public function getTotal() { - return $this->container['projections']; + return $this->container['total']; } /** - * Sets projections + * Sets total * - * @param \TalonOne\Client\Model\LoyaltyProjectionData[]|null $projections projections + * @param float $total All revenue that went through the client's shop (including purchases that didn’t trigger an effect). * * @return $this */ - public function setProjections($projections) + public function setTotal($total) { - $this->container['projections'] = $projections; + $this->container['total'] = $total; return $this; } /** - * Gets totalExpiringPoints + * Gets influenced * * @return float */ - public function getTotalExpiringPoints() + public function getInfluenced() { - return $this->container['totalExpiringPoints']; + return $this->container['influenced']; } /** - * Sets totalExpiringPoints + * Sets influenced * - * @param float $totalExpiringPoints Sum of points to be expired by the projection date set in the query parameter. + * @param float $influenced The revenue that was created by a purchase that triggered an effect (excluding web hooks, notifications). * * @return $this */ - public function setTotalExpiringPoints($totalExpiringPoints) + public function setInfluenced($influenced) { - $this->container['totalExpiringPoints'] = $totalExpiringPoints; + $this->container['influenced'] = $influenced; return $this; } /** - * Gets totalActivatingPoints + * Gets datetime * - * @return float + * @return \DateTime */ - public function getTotalActivatingPoints() + public function getDatetime() { - return $this->container['totalActivatingPoints']; + return $this->container['datetime']; } /** - * Sets totalActivatingPoints + * Sets datetime * - * @param float $totalActivatingPoints Sum of points to be active by the projection date set in the query parameter. + * @param \DateTime $datetime Values aggregated for the specified date. * * @return $this */ - public function setTotalActivatingPoints($totalActivatingPoints) + public function setDatetime($datetime) { - $this->container['totalActivatingPoints'] = $totalActivatingPoints; + $this->container['datetime'] = $datetime; return $this; } diff --git a/lib/Model/AccountEntity.php b/lib/Model/AccountEntity.php index 8b3e6741..8f7ffb6f 100644 --- a/lib/Model/AccountEntity.php +++ b/lib/Model/AccountEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AccountLimits.php b/lib/Model/AccountLimits.php index 0c7a92a9..b8d78201 100644 --- a/lib/Model/AccountLimits.php +++ b/lib/Model/AccountLimits.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AddFreeItemEffectProps.php b/lib/Model/AddFreeItemEffectProps.php index 001d02dd..60cb8ce6 100644 --- a/lib/Model/AddFreeItemEffectProps.php +++ b/lib/Model/AddFreeItemEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -254,7 +254,7 @@ public function getName() /** * Sets name * - * @param string $name The name/description of the effect. + * @param string $name The name / description of the effect * * @return $this */ diff --git a/lib/Model/AddItemCatalogAction.php b/lib/Model/AddItemCatalogAction.php index 19dcd49d..d7772f96 100644 --- a/lib/Model/AddItemCatalogAction.php +++ b/lib/Model/AddItemCatalogAction.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AddLoyaltyPoints.php b/lib/Model/AddLoyaltyPoints.php new file mode 100644 index 00000000..69f9b2e3 --- /dev/null +++ b/lib/Model/AddLoyaltyPoints.php @@ -0,0 +1,537 @@ + 'float', + 'name' => 'string', + 'validityDuration' => 'string', + 'validUntil' => '\DateTime', + 'pendingDuration' => 'string', + 'pendingUntil' => '\DateTime', + 'subledgerId' => 'string', + 'applicationId' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'points' => null, + 'name' => null, + 'validityDuration' => null, + 'validUntil' => 'date-time', + 'pendingDuration' => null, + 'pendingUntil' => 'date-time', + 'subledgerId' => null, + 'applicationId' => 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 = [ + 'points' => 'points', + 'name' => 'name', + 'validityDuration' => 'validityDuration', + 'validUntil' => 'validUntil', + 'pendingDuration' => 'pendingDuration', + 'pendingUntil' => 'pendingUntil', + 'subledgerId' => 'subledgerId', + 'applicationId' => 'applicationId' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'points' => 'setPoints', + 'name' => 'setName', + 'validityDuration' => 'setValidityDuration', + 'validUntil' => 'setValidUntil', + 'pendingDuration' => 'setPendingDuration', + 'pendingUntil' => 'setPendingUntil', + 'subledgerId' => 'setSubledgerId', + 'applicationId' => 'setApplicationId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'points' => 'getPoints', + 'name' => 'getName', + 'validityDuration' => 'getValidityDuration', + 'validUntil' => 'getValidUntil', + 'pendingDuration' => 'getPendingDuration', + 'pendingUntil' => 'getPendingUntil', + 'subledgerId' => 'getSubledgerId', + 'applicationId' => 'getApplicationId' + ]; + + /** + * 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['points'] = isset($data['points']) ? $data['points'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['validityDuration'] = isset($data['validityDuration']) ? $data['validityDuration'] : null; + $this->container['validUntil'] = isset($data['validUntil']) ? $data['validUntil'] : null; + $this->container['pendingDuration'] = isset($data['pendingDuration']) ? $data['pendingDuration'] : null; + $this->container['pendingUntil'] = isset($data['pendingUntil']) ? $data['pendingUntil'] : null; + $this->container['subledgerId'] = isset($data['subledgerId']) ? $data['subledgerId'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['points'] === null) { + $invalidProperties[] = "'points' can't be null"; + } + if (($this->container['points'] > 999999999999.99)) { + $invalidProperties[] = "invalid value for 'points', must be smaller than or equal to 999999999999.99."; + } + + if (($this->container['points'] <= 0)) { + $invalidProperties[] = "invalid value for 'points', must be bigger than 0."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets points + * + * @return float + */ + public function getPoints() + { + return $this->container['points']; + } + + /** + * Sets points + * + * @param float $points Amount of loyalty points. + * + * @return $this + */ + public function setPoints($points) + { + + if (($points > 999999999999.99)) { + throw new \InvalidArgumentException('invalid value for $points when calling AddLoyaltyPoints., must be smaller than or equal to 999999999999.99.'); + } + if (($points <= 0)) { + throw new \InvalidArgumentException('invalid value for $points when calling AddLoyaltyPoints., must be bigger than 0.'); + } + + $this->container['points'] = $points; + + return $this; + } + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name / reason for the point addition. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets validityDuration + * + * @return string|null + */ + public function getValidityDuration() + { + return $this->container['validityDuration']; + } + + /** + * Sets validityDuration + * + * @param string|null $validityDuration The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. If passed, `validUntil` should be omitted. + * + * @return $this + */ + public function setValidityDuration($validityDuration) + { + $this->container['validityDuration'] = $validityDuration; + + return $this; + } + + /** + * Gets validUntil + * + * @return \DateTime|null + */ + public function getValidUntil() + { + return $this->container['validUntil']; + } + + /** + * Sets validUntil + * + * @param \DateTime|null $validUntil Date and time when points should expire. The value should be provided in RFC 3339 format. If passed, `validityDuration` should be omitted. + * + * @return $this + */ + public function setValidUntil($validUntil) + { + $this->container['validUntil'] = $validUntil; + + return $this; + } + + /** + * Gets pendingDuration + * + * @return string|null + */ + public function getPendingDuration() + { + return $this->container['pendingDuration']; + } + + /** + * Sets pendingDuration + * + * @param string|null $pendingDuration The amount of time before the points are considered valid. The time format is either: - `immediate` or, - an **integer** followed by one letter indicating the time unit. Examples: `immediate`, `30s`, `40m`, `1h`, `5D`, `7W`, `10M`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks and months. Signifies the end of the day, week, or month. + * + * @return $this + */ + public function setPendingDuration($pendingDuration) + { + $this->container['pendingDuration'] = $pendingDuration; + + return $this; + } + + /** + * Gets pendingUntil + * + * @return \DateTime|null + */ + public function getPendingUntil() + { + return $this->container['pendingUntil']; + } + + /** + * Sets pendingUntil + * + * @param \DateTime|null $pendingUntil Date and time after the points are considered valid. The value should be provided in RFC 3339 format. If passed, `pendingDuration` should be omitted. + * + * @return $this + */ + public function setPendingUntil($pendingUntil) + { + $this->container['pendingUntil'] = $pendingUntil; + + return $this; + } + + /** + * Gets subledgerId + * + * @return string|null + */ + public function getSubledgerId() + { + return $this->container['subledgerId']; + } + + /** + * Sets subledgerId + * + * @param string|null $subledgerId ID of the subledger the points are added to. If there is no existing subledger with this ID, the subledger is created automatically. + * + * @return $this + */ + public function setSubledgerId($subledgerId) + { + $this->container['subledgerId'] = $subledgerId; + + return $this; + } + + /** + * Gets applicationId + * + * @return int|null + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int|null $applicationId ID of the Application that is connected to the loyalty program. It is displayed in your Talon.One deployment URL. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + 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/AddLoyaltyPointsEffectProps.php b/lib/Model/AddLoyaltyPointsEffectProps.php index 1385f2f5..c67a2187 100644 --- a/lib/Model/AddLoyaltyPointsEffectProps.php +++ b/lib/Model/AddLoyaltyPointsEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -69,7 +69,9 @@ class AddLoyaltyPointsEffectProps implements ModelInterface, ArrayAccess 'transactionUUID' => 'string', 'cartItemPosition' => 'float', 'cartItemSubPosition' => 'float', - 'cardIdentifier' => 'string' + 'cardIdentifier' => 'string', + 'bundleIndex' => 'int', + 'bundleName' => 'string' ]; /** @@ -89,7 +91,9 @@ class AddLoyaltyPointsEffectProps implements ModelInterface, ArrayAccess 'transactionUUID' => null, 'cartItemPosition' => null, 'cartItemSubPosition' => null, - 'cardIdentifier' => null + 'cardIdentifier' => null, + 'bundleIndex' => null, + 'bundleName' => null ]; /** @@ -130,7 +134,9 @@ public static function openAPIFormats() 'transactionUUID' => 'transactionUUID', 'cartItemPosition' => 'cartItemPosition', 'cartItemSubPosition' => 'cartItemSubPosition', - 'cardIdentifier' => 'cardIdentifier' + 'cardIdentifier' => 'cardIdentifier', + 'bundleIndex' => 'bundleIndex', + 'bundleName' => 'bundleName' ]; /** @@ -150,7 +156,9 @@ public static function openAPIFormats() 'transactionUUID' => 'setTransactionUUID', 'cartItemPosition' => 'setCartItemPosition', 'cartItemSubPosition' => 'setCartItemSubPosition', - 'cardIdentifier' => 'setCardIdentifier' + 'cardIdentifier' => 'setCardIdentifier', + 'bundleIndex' => 'setBundleIndex', + 'bundleName' => 'setBundleName' ]; /** @@ -170,7 +178,9 @@ public static function openAPIFormats() 'transactionUUID' => 'getTransactionUUID', 'cartItemPosition' => 'getCartItemPosition', 'cartItemSubPosition' => 'getCartItemSubPosition', - 'cardIdentifier' => 'getCardIdentifier' + 'cardIdentifier' => 'getCardIdentifier', + 'bundleIndex' => 'getBundleIndex', + 'bundleName' => 'getBundleName' ]; /** @@ -245,6 +255,8 @@ public function __construct(array $data = null) $this->container['cartItemPosition'] = isset($data['cartItemPosition']) ? $data['cartItemPosition'] : null; $this->container['cartItemSubPosition'] = isset($data['cartItemSubPosition']) ? $data['cartItemSubPosition'] : null; $this->container['cardIdentifier'] = isset($data['cardIdentifier']) ? $data['cardIdentifier'] : null; + $this->container['bundleIndex'] = isset($data['bundleIndex']) ? $data['bundleIndex'] : null; + $this->container['bundleName'] = isset($data['bundleName']) ? $data['bundleName'] : null; } /** @@ -278,6 +290,10 @@ public function listInvalidProperties() if ($this->container['transactionUUID'] === null) { $invalidProperties[] = "'transactionUUID' can't be null"; } + if (!is_null($this->container['cardIdentifier']) && (mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; + } + return $invalidProperties; } @@ -306,7 +322,7 @@ public function getName() /** * Sets name * - * @param string $name The reason of the point addition. + * @param string $name The name / description of this loyalty point addition. * * @return $this */ @@ -574,16 +590,68 @@ public function getCardIdentifier() /** * Sets cardIdentifier * - * @param string|null $cardIdentifier The card on which these points were added. + * @param string|null $cardIdentifier The alphanumeric identifier of the loyalty card. * * @return $this */ public function setCardIdentifier($cardIdentifier) { + if (!is_null($cardIdentifier) && (mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling AddLoyaltyPointsEffectProps., must be smaller than or equal to 108.'); + } + $this->container['cardIdentifier'] = $cardIdentifier; return $this; } + + /** + * Gets bundleIndex + * + * @return int|null + */ + public function getBundleIndex() + { + return $this->container['bundleIndex']; + } + + /** + * Sets bundleIndex + * + * @param int|null $bundleIndex The position of the bundle in a list of item bundles created from the same bundle definition. + * + * @return $this + */ + public function setBundleIndex($bundleIndex) + { + $this->container['bundleIndex'] = $bundleIndex; + + return $this; + } + + /** + * Gets bundleName + * + * @return string|null + */ + public function getBundleName() + { + return $this->container['bundleName']; + } + + /** + * Sets bundleName + * + * @param string|null $bundleName The name of the bundle definition. + * + * @return $this + */ + public function setBundleName($bundleName) + { + $this->container['bundleName'] = $bundleName; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/AddedDeductedPointsNotificationPolicy.php b/lib/Model/AddedDeductedPointsNotificationPolicy.php new file mode 100644 index 00000000..da8fc487 --- /dev/null +++ b/lib/Model/AddedDeductedPointsNotificationPolicy.php @@ -0,0 +1,380 @@ + 'string', + 'scopes' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'scopes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'scopes' => 'scopes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'scopes' => 'setScopes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'scopes' => 'getScopes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const SCOPES_ALL = 'all'; + const SCOPES_CAMPAIGN_MANAGER = 'campaign_manager'; + const SCOPES_MANAGEMENT_API = 'management_api'; + const SCOPES_RULE_ENGINE = 'rule_engine'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getScopesAllowableValues() + { + return [ + self::SCOPES_ALL, + self::SCOPES_CAMPAIGN_MANAGER, + self::SCOPES_MANAGEMENT_API, + self::SCOPES_RULE_ENGINE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['scopes'] = isset($data['scopes']) ? $data['scopes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['scopes'] === null) { + $invalidProperties[] = "'scopes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling AddedDeductedPointsNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets scopes + * + * @return string[] + */ + public function getScopes() + { + return $this->container['scopes']; + } + + /** + * Sets scopes + * + * @param string[] $scopes scopes + * + * @return $this + */ + public function setScopes($scopes) + { + $allowedValues = $this->getScopesAllowableValues(); + if (array_diff($scopes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'scopes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['scopes'] = $scopes; + + 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/AdditionalCost.php b/lib/Model/AdditionalCost.php index 039aef42..a8021e8c 100644 --- a/lib/Model/AdditionalCost.php +++ b/lib/Model/AdditionalCost.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Application.php b/lib/Model/Application.php index f8ecd944..47f33759 100644 --- a/lib/Model/Application.php +++ b/lib/Model/Application.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -499,7 +499,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -523,7 +523,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -547,7 +547,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ @@ -910,7 +910,7 @@ public function getEnableFlattenedCartItems() /** * Sets enableFlattenedCartItems * - * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). + * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). * * @return $this */ diff --git a/lib/Model/ApplicationAPIKey.php b/lib/Model/ApplicationAPIKey.php index f0081de3..3b5422de 100644 --- a/lib/Model/ApplicationAPIKey.php +++ b/lib/Model/ApplicationAPIKey.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ApplicationApiHealth.php b/lib/Model/ApplicationApiHealth.php index 4324026b..acab3f12 100644 --- a/lib/Model/ApplicationApiHealth.php +++ b/lib/Model/ApplicationApiHealth.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -259,7 +259,7 @@ public function getSummary() /** * Sets summary * - * @param string $summary One-word summary of the health of the API connection of an application. + * @param string $summary One-word summary of the health of the API connection of an application. Possible values are: - `OK`: The Application has received only successful API requests in the last 5 minutes. - `WARNING`: The Application received at least one failed request in the last 50 minutes. - `ERROR`: More than 50% of received requests failed. - `CRITICAL`: All received requests failed. - `NONE`: During the last 5 minutes, the Application hasn't recorded any integration API requests. * * @return $this */ diff --git a/lib/Model/ApplicationCampaignStats.php b/lib/Model/ApplicationCampaignStats.php index d6726a58..5f655deb 100644 --- a/lib/Model/ApplicationCampaignStats.php +++ b/lib/Model/ApplicationCampaignStats.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ApplicationCustomer.php b/lib/Model/ApplicationCustomer.php index de7c651d..bf3a68c9 100644 --- a/lib/Model/ApplicationCustomer.php +++ b/lib/Model/ApplicationCustomer.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -68,6 +68,7 @@ class ApplicationCustomer implements ModelInterface, ArrayAccess 'loyaltyMemberships' => '\TalonOne\Client\Model\LoyaltyMembership[]', 'audienceMemberships' => '\TalonOne\Client\Model\AudienceMembership[]', 'lastActivity' => '\DateTime', + 'sandbox' => 'bool', 'advocateIntegrationId' => 'string' ]; @@ -87,6 +88,7 @@ class ApplicationCustomer implements ModelInterface, ArrayAccess 'loyaltyMemberships' => null, 'audienceMemberships' => null, 'lastActivity' => 'date-time', + 'sandbox' => null, 'advocateIntegrationId' => null ]; @@ -127,6 +129,7 @@ public static function openAPIFormats() 'loyaltyMemberships' => 'loyaltyMemberships', 'audienceMemberships' => 'audienceMemberships', 'lastActivity' => 'lastActivity', + 'sandbox' => 'sandbox', 'advocateIntegrationId' => 'advocateIntegrationId' ]; @@ -146,6 +149,7 @@ public static function openAPIFormats() 'loyaltyMemberships' => 'setLoyaltyMemberships', 'audienceMemberships' => 'setAudienceMemberships', 'lastActivity' => 'setLastActivity', + 'sandbox' => 'setSandbox', 'advocateIntegrationId' => 'setAdvocateIntegrationId' ]; @@ -165,6 +169,7 @@ public static function openAPIFormats() 'loyaltyMemberships' => 'getLoyaltyMemberships', 'audienceMemberships' => 'getAudienceMemberships', 'lastActivity' => 'getLastActivity', + 'sandbox' => 'getSandbox', 'advocateIntegrationId' => 'getAdvocateIntegrationId' ]; @@ -238,6 +243,7 @@ public function __construct(array $data = null) $this->container['loyaltyMemberships'] = isset($data['loyaltyMemberships']) ? $data['loyaltyMemberships'] : null; $this->container['audienceMemberships'] = isset($data['audienceMemberships']) ? $data['audienceMemberships'] : null; $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['advocateIntegrationId'] = isset($data['advocateIntegrationId']) ? $data['advocateIntegrationId'] : null; } @@ -310,7 +316,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. Internal ID of this entity. * * @return $this */ @@ -334,7 +340,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. The exact moment this entity was created. The exact moment this entity was created. The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. The time this entity was created. The time this entity was created. The time this entity was created. * * @return $this */ @@ -458,7 +464,7 @@ public function getTotalSales() /** * Sets totalSales * - * @param float $totalSales Sum of all purchases made by this customer. + * @param float $totalSales The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. * * @return $this */ @@ -506,7 +512,7 @@ public function getAudienceMemberships() /** * Sets audienceMemberships * - * @param \TalonOne\Client\Model\AudienceMembership[]|null $audienceMemberships A list of audiences the customer belongs to. + * @param \TalonOne\Client\Model\AudienceMembership[]|null $audienceMemberships The audiences the customer belongs to. * * @return $this */ @@ -530,7 +536,7 @@ public function getLastActivity() /** * Sets lastActivity * - * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api/#operation/createCouponReservation) for a customer doesn't impact this field. + * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. * * @return $this */ @@ -541,6 +547,30 @@ public function setLastActivity($lastActivity) return $this; } + /** + * Gets sandbox + * + * @return bool|null + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool|null $sandbox Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } + /** * Gets advocateIntegrationId * diff --git a/lib/Model/ApplicationCustomerEntity.php b/lib/Model/ApplicationCustomerEntity.php index 4cb69151..1e03511c 100644 --- a/lib/Model/ApplicationCustomerEntity.php +++ b/lib/Model/ApplicationCustomerEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ApplicationEntity.php b/lib/Model/ApplicationEntity.php index a8ebb40e..5ede66b6 100644 --- a/lib/Model/ApplicationEntity.php +++ b/lib/Model/ApplicationEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ApplicationEvent.php b/lib/Model/ApplicationEvent.php index b0cc6992..ace977ae 100644 --- a/lib/Model/ApplicationEvent.php +++ b/lib/Model/ApplicationEvent.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -65,7 +65,7 @@ class ApplicationEvent implements ModelInterface, ArrayAccess 'sessionId' => 'int', 'type' => 'string', 'attributes' => 'object', - 'effects' => 'object[]', + 'effects' => '\TalonOne\Client\Model\Effect[]', 'ruleFailureReasons' => '\TalonOne\Client\Model\RuleFailureReason[]' ]; @@ -284,7 +284,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -308,7 +308,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -442,7 +442,7 @@ public function setAttributes($attributes) /** * Gets effects * - * @return object[] + * @return \TalonOne\Client\Model\Effect[] */ public function getEffects() { @@ -452,7 +452,7 @@ public function getEffects() /** * Sets effects * - * @param object[] $effects An array containing the effects that were applied as a result of this event. + * @param \TalonOne\Client\Model\Effect[] $effects An array containing the effects that were applied as a result of this event. * * @return $this */ diff --git a/lib/Model/ApplicationNotification.php b/lib/Model/ApplicationNotification.php index d41a3247..b466943c 100644 --- a/lib/Model/ApplicationNotification.php +++ b/lib/Model/ApplicationNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ApplicationReferee.php b/lib/Model/ApplicationReferee.php index 6f55acb8..1b025c58 100644 --- a/lib/Model/ApplicationReferee.php +++ b/lib/Model/ApplicationReferee.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ApplicationSession.php b/lib/Model/ApplicationSession.php index ed0fadca..64b12ca8 100644 --- a/lib/Model/ApplicationSession.php +++ b/lib/Model/ApplicationSession.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -364,7 +364,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -388,7 +388,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. The time this entity was created. * * @return $this */ @@ -564,7 +564,7 @@ public function getState() /** * Sets state * - * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). + * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). * * @return $this */ diff --git a/lib/Model/ApplicationSessionEntity.php b/lib/Model/ApplicationSessionEntity.php index 20c4cfdd..9a79f15a 100644 --- a/lib/Model/ApplicationSessionEntity.php +++ b/lib/Model/ApplicationSessionEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AsyncCouponCreationResponse.php b/lib/Model/AsyncCouponCreationResponse.php index 1f1702f9..ffa41b32 100644 --- a/lib/Model/AsyncCouponCreationResponse.php +++ b/lib/Model/AsyncCouponCreationResponse.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Attribute.php b/lib/Model/Attribute.php index 6e2f8f33..2785ac1a 100644 --- a/lib/Model/Attribute.php +++ b/lib/Model/Attribute.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -443,7 +443,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -467,7 +467,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/AttributesMandatory.php b/lib/Model/AttributesMandatory.php index b193cf0f..5a70f2f3 100644 --- a/lib/Model/AttributesMandatory.php +++ b/lib/Model/AttributesMandatory.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AttributesSettings.php b/lib/Model/AttributesSettings.php index dda07191..913e8f9e 100644 --- a/lib/Model/AttributesSettings.php +++ b/lib/Model/AttributesSettings.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Audience.php b/lib/Model/Audience.php index d6aa06b5..c02ba5a6 100644 --- a/lib/Model/Audience.php +++ b/lib/Model/Audience.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -66,7 +66,8 @@ class Audience implements ModelInterface, ArrayAccess 'description' => 'string', 'integration' => 'string', 'integrationId' => 'string', - 'createdIn3rdParty' => 'bool' + 'createdIn3rdParty' => 'bool', + 'lastUpdate' => '\DateTime' ]; /** @@ -83,7 +84,8 @@ class Audience implements ModelInterface, ArrayAccess 'description' => null, 'integration' => null, 'integrationId' => null, - 'createdIn3rdParty' => null + 'createdIn3rdParty' => null, + 'lastUpdate' => 'date-time' ]; /** @@ -121,7 +123,8 @@ public static function openAPIFormats() 'description' => 'description', 'integration' => 'integration', 'integrationId' => 'integrationId', - 'createdIn3rdParty' => 'createdIn3rdParty' + 'createdIn3rdParty' => 'createdIn3rdParty', + 'lastUpdate' => 'lastUpdate' ]; /** @@ -138,7 +141,8 @@ public static function openAPIFormats() 'description' => 'setDescription', 'integration' => 'setIntegration', 'integrationId' => 'setIntegrationId', - 'createdIn3rdParty' => 'setCreatedIn3rdParty' + 'createdIn3rdParty' => 'setCreatedIn3rdParty', + 'lastUpdate' => 'setLastUpdate' ]; /** @@ -155,7 +159,8 @@ public static function openAPIFormats() 'description' => 'getDescription', 'integration' => 'getIntegration', 'integrationId' => 'getIntegrationId', - 'createdIn3rdParty' => 'getCreatedIn3rdParty' + 'createdIn3rdParty' => 'getCreatedIn3rdParty', + 'lastUpdate' => 'getLastUpdate' ]; /** @@ -227,6 +232,7 @@ public function __construct(array $data = null) $this->container['integration'] = isset($data['integration']) ? $data['integration'] : null; $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; $this->container['createdIn3rdParty'] = isset($data['createdIn3rdParty']) ? $data['createdIn3rdParty'] : null; + $this->container['lastUpdate'] = isset($data['lastUpdate']) ? $data['lastUpdate'] : null; } /** @@ -314,7 +320,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -338,7 +344,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -504,6 +510,30 @@ public function setCreatedIn3rdParty($createdIn3rdParty) return $this; } + + /** + * Gets lastUpdate + * + * @return \DateTime|null + */ + public function getLastUpdate() + { + return $this->container['lastUpdate']; + } + + /** + * Sets lastUpdate + * + * @param \DateTime|null $lastUpdate The last time that the audience memberships changed. + * + * @return $this + */ + public function setLastUpdate($lastUpdate) + { + $this->container['lastUpdate'] = $lastUpdate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/AudienceAnalytics.php b/lib/Model/AudienceAnalytics.php index a80acdc8..c1b79505 100644 --- a/lib/Model/AudienceAnalytics.php +++ b/lib/Model/AudienceAnalytics.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AudienceCustomer.php b/lib/Model/AudienceCustomer.php new file mode 100644 index 00000000..7c84c064 --- /dev/null +++ b/lib/Model/AudienceCustomer.php @@ -0,0 +1,700 @@ + 'int', + 'created' => '\DateTime', + 'integrationId' => 'string', + 'attributes' => 'object', + 'accountId' => 'int', + 'closedSessions' => 'int', + 'totalSales' => 'float', + 'loyaltyMemberships' => '\TalonOne\Client\Model\LoyaltyMembership[]', + 'audienceMemberships' => '\TalonOne\Client\Model\AudienceMembership[]', + 'lastActivity' => '\DateTime', + 'sandbox' => 'bool', + 'connectedApplicationsIds' => 'int[]', + 'connectedAudiences' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'integrationId' => 'string', + 'attributes' => null, + 'accountId' => null, + 'closedSessions' => null, + 'totalSales' => null, + 'loyaltyMemberships' => null, + 'audienceMemberships' => null, + 'lastActivity' => 'date-time', + 'sandbox' => null, + 'connectedApplicationsIds' => null, + 'connectedAudiences' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'integrationId' => 'integrationId', + 'attributes' => 'attributes', + 'accountId' => 'accountId', + 'closedSessions' => 'closedSessions', + 'totalSales' => 'totalSales', + 'loyaltyMemberships' => 'loyaltyMemberships', + 'audienceMemberships' => 'audienceMemberships', + 'lastActivity' => 'lastActivity', + 'sandbox' => 'sandbox', + 'connectedApplicationsIds' => 'connectedApplicationsIds', + 'connectedAudiences' => 'connectedAudiences' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'integrationId' => 'setIntegrationId', + 'attributes' => 'setAttributes', + 'accountId' => 'setAccountId', + 'closedSessions' => 'setClosedSessions', + 'totalSales' => 'setTotalSales', + 'loyaltyMemberships' => 'setLoyaltyMemberships', + 'audienceMemberships' => 'setAudienceMemberships', + 'lastActivity' => 'setLastActivity', + 'sandbox' => 'setSandbox', + 'connectedApplicationsIds' => 'setConnectedApplicationsIds', + 'connectedAudiences' => 'setConnectedAudiences' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'integrationId' => 'getIntegrationId', + 'attributes' => 'getAttributes', + 'accountId' => 'getAccountId', + 'closedSessions' => 'getClosedSessions', + 'totalSales' => 'getTotalSales', + 'loyaltyMemberships' => 'getLoyaltyMemberships', + 'audienceMemberships' => 'getAudienceMemberships', + 'lastActivity' => 'getLastActivity', + 'sandbox' => 'getSandbox', + 'connectedApplicationsIds' => 'getConnectedApplicationsIds', + 'connectedAudiences' => 'getConnectedAudiences' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; + $this->container['closedSessions'] = isset($data['closedSessions']) ? $data['closedSessions'] : null; + $this->container['totalSales'] = isset($data['totalSales']) ? $data['totalSales'] : null; + $this->container['loyaltyMemberships'] = isset($data['loyaltyMemberships']) ? $data['loyaltyMemberships'] : null; + $this->container['audienceMemberships'] = isset($data['audienceMemberships']) ? $data['audienceMemberships'] : null; + $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; + $this->container['connectedApplicationsIds'] = isset($data['connectedApplicationsIds']) ? $data['connectedApplicationsIds'] : null; + $this->container['connectedAudiences'] = isset($data['connectedAudiences']) ? $data['connectedAudiences'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['integrationId'] === null) { + $invalidProperties[] = "'integrationId' can't be null"; + } + if ((mb_strlen($this->container['integrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'integrationId', the character length must be smaller than or equal to 1000."; + } + + if ($this->container['attributes'] === null) { + $invalidProperties[] = "'attributes' can't be null"; + } + if ($this->container['accountId'] === null) { + $invalidProperties[] = "'accountId' can't be null"; + } + if ($this->container['closedSessions'] === null) { + $invalidProperties[] = "'closedSessions' can't be null"; + } + if ($this->container['totalSales'] === null) { + $invalidProperties[] = "'totalSales' can't be null"; + } + if ($this->container['lastActivity'] === null) { + $invalidProperties[] = "'lastActivity' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Internal ID of this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets integrationId + * + * @return string + */ + public function getIntegrationId() + { + return $this->container['integrationId']; + } + + /** + * Sets integrationId + * + * @param string $integrationId The integration ID set by your integration layer. + * + * @return $this + */ + public function setIntegrationId($integrationId) + { + if ((mb_strlen($integrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $integrationId when calling AudienceCustomer., must be smaller than or equal to 1000.'); + } + + $this->container['integrationId'] = $integrationId; + + return $this; + } + + /** + * Gets attributes + * + * @return object + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object $attributes Arbitrary properties associated with this item. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets accountId + * + * @return int + */ + public function getAccountId() + { + return $this->container['accountId']; + } + + /** + * Sets accountId + * + * @param int $accountId The ID of the Talon.One account that owns this profile. + * + * @return $this + */ + public function setAccountId($accountId) + { + $this->container['accountId'] = $accountId; + + return $this; + } + + /** + * Gets closedSessions + * + * @return int + */ + public function getClosedSessions() + { + return $this->container['closedSessions']; + } + + /** + * Sets closedSessions + * + * @param int $closedSessions The total amount of closed sessions by a customer. A closed session is a successful purchase. + * + * @return $this + */ + public function setClosedSessions($closedSessions) + { + $this->container['closedSessions'] = $closedSessions; + + return $this; + } + + /** + * Gets totalSales + * + * @return float + */ + public function getTotalSales() + { + return $this->container['totalSales']; + } + + /** + * Sets totalSales + * + * @param float $totalSales The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. + * + * @return $this + */ + public function setTotalSales($totalSales) + { + $this->container['totalSales'] = $totalSales; + + return $this; + } + + /** + * Gets loyaltyMemberships + * + * @return \TalonOne\Client\Model\LoyaltyMembership[]|null + */ + public function getLoyaltyMemberships() + { + return $this->container['loyaltyMemberships']; + } + + /** + * Sets loyaltyMemberships + * + * @param \TalonOne\Client\Model\LoyaltyMembership[]|null $loyaltyMemberships **DEPRECATED** A list of loyalty programs joined by the customer. + * + * @return $this + */ + public function setLoyaltyMemberships($loyaltyMemberships) + { + $this->container['loyaltyMemberships'] = $loyaltyMemberships; + + return $this; + } + + /** + * Gets audienceMemberships + * + * @return \TalonOne\Client\Model\AudienceMembership[]|null + */ + public function getAudienceMemberships() + { + return $this->container['audienceMemberships']; + } + + /** + * Sets audienceMemberships + * + * @param \TalonOne\Client\Model\AudienceMembership[]|null $audienceMemberships The audiences the customer belongs to. + * + * @return $this + */ + public function setAudienceMemberships($audienceMemberships) + { + $this->container['audienceMemberships'] = $audienceMemberships; + + return $this; + } + + /** + * Gets lastActivity + * + * @return \DateTime + */ + public function getLastActivity() + { + return $this->container['lastActivity']; + } + + /** + * Sets lastActivity + * + * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. + * + * @return $this + */ + public function setLastActivity($lastActivity) + { + $this->container['lastActivity'] = $lastActivity; + + return $this; + } + + /** + * Gets sandbox + * + * @return bool|null + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool|null $sandbox Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } + + /** + * Gets connectedApplicationsIds + * + * @return int[]|null + */ + public function getConnectedApplicationsIds() + { + return $this->container['connectedApplicationsIds']; + } + + /** + * Sets connectedApplicationsIds + * + * @param int[]|null $connectedApplicationsIds A list of the IDs of the Applications that are connected to this customer profile. + * + * @return $this + */ + public function setConnectedApplicationsIds($connectedApplicationsIds) + { + $this->container['connectedApplicationsIds'] = $connectedApplicationsIds; + + return $this; + } + + /** + * Gets connectedAudiences + * + * @return int[]|null + */ + public function getConnectedAudiences() + { + return $this->container['connectedAudiences']; + } + + /** + * Sets connectedAudiences + * + * @param int[]|null $connectedAudiences A list of the IDs of the audiences that are connected to this customer profile. + * + * @return $this + */ + public function setConnectedAudiences($connectedAudiences) + { + $this->container['connectedAudiences'] = $connectedAudiences; + + 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/AudienceIntegrationID.php b/lib/Model/AudienceIntegrationID.php index ae2ff90e..5aba3d1d 100644 --- a/lib/Model/AudienceIntegrationID.php +++ b/lib/Model/AudienceIntegrationID.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AudienceMembership.php b/lib/Model/AudienceMembership.php index 29874e2d..28660dae 100644 --- a/lib/Model/AudienceMembership.php +++ b/lib/Model/AudienceMembership.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/AwardGiveawayEffectProps.php b/lib/Model/AwardGiveawayEffectProps.php index 5ae578cf..b03e821f 100644 --- a/lib/Model/AwardGiveawayEffectProps.php +++ b/lib/Model/AwardGiveawayEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/BaseLoyaltyProgram.php b/lib/Model/BaseLoyaltyProgram.php index 85a0e7f2..120dafac 100644 --- a/lib/Model/BaseLoyaltyProgram.php +++ b/lib/Model/BaseLoyaltyProgram.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -63,7 +63,8 @@ class BaseLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultValidity' => 'string', 'defaultPending' => 'string', 'allowSubledger' => 'bool', - 'usersPerCardLimit' => 'int' + 'usersPerCardLimit' => 'int', + 'sandbox' => 'bool' ]; /** @@ -78,7 +79,8 @@ class BaseLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultValidity' => null, 'defaultPending' => null, 'allowSubledger' => null, - 'usersPerCardLimit' => null + 'usersPerCardLimit' => null, + 'sandbox' => null ]; /** @@ -114,7 +116,8 @@ public static function openAPIFormats() 'defaultValidity' => 'defaultValidity', 'defaultPending' => 'defaultPending', 'allowSubledger' => 'allowSubledger', - 'usersPerCardLimit' => 'usersPerCardLimit' + 'usersPerCardLimit' => 'usersPerCardLimit', + 'sandbox' => 'sandbox' ]; /** @@ -129,7 +132,8 @@ public static function openAPIFormats() 'defaultValidity' => 'setDefaultValidity', 'defaultPending' => 'setDefaultPending', 'allowSubledger' => 'setAllowSubledger', - 'usersPerCardLimit' => 'setUsersPerCardLimit' + 'usersPerCardLimit' => 'setUsersPerCardLimit', + 'sandbox' => 'setSandbox' ]; /** @@ -144,7 +148,8 @@ public static function openAPIFormats() 'defaultValidity' => 'getDefaultValidity', 'defaultPending' => 'getDefaultPending', 'allowSubledger' => 'getAllowSubledger', - 'usersPerCardLimit' => 'getUsersPerCardLimit' + 'usersPerCardLimit' => 'getUsersPerCardLimit', + 'sandbox' => 'getSandbox' ]; /** @@ -214,6 +219,7 @@ public function __construct(array $data = null) $this->container['defaultPending'] = isset($data['defaultPending']) ? $data['defaultPending'] : null; $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; } /** @@ -329,7 +335,7 @@ public function getDefaultValidity() /** * Sets defaultValidity * - * @param string|null $defaultValidity Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. + * @param string|null $defaultValidity The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -353,7 +359,7 @@ public function getDefaultPending() /** * Sets defaultPending * - * @param string|null $defaultPending Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. + * @param string|null $defaultPending The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -416,6 +422,30 @@ public function setUsersPerCardLimit($usersPerCardLimit) return $this; } + + /** + * Gets sandbox + * + * @return bool|null + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool|null $sandbox Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/BaseNotification.php b/lib/Model/BaseNotification.php new file mode 100644 index 00000000..2f01e61c --- /dev/null +++ b/lib/Model/BaseNotification.php @@ -0,0 +1,386 @@ + 'object', + 'webhook' => '\TalonOne\Client\Model\BaseNotificationWebhook', + 'id' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'policy' => null, + 'webhook' => null, + 'id' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'policy' => 'policy', + 'webhook' => 'webhook', + 'id' => 'id' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'policy' => 'setPolicy', + 'webhook' => 'setWebhook', + 'id' => 'setId' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'policy' => 'getPolicy', + 'webhook' => 'getWebhook', + 'id' => 'getId' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['policy'] = isset($data['policy']) ? $data['policy'] : null; + $this->container['webhook'] = isset($data['webhook']) ? $data['webhook'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['policy'] === null) { + $invalidProperties[] = "'policy' can't be null"; + } + if ($this->container['webhook'] === null) { + $invalidProperties[] = "'webhook' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if (($this->container['id'] < 1)) { + $invalidProperties[] = "invalid value for 'id', must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets policy + * + * @return object + */ + public function getPolicy() + { + return $this->container['policy']; + } + + /** + * Sets policy + * + * @param object $policy policy + * + * @return $this + */ + public function setPolicy($policy) + { + $this->container['policy'] = $policy; + + return $this; + } + + /** + * Gets webhook + * + * @return \TalonOne\Client\Model\BaseNotificationWebhook + */ + public function getWebhook() + { + return $this->container['webhook']; + } + + /** + * Sets webhook + * + * @param \TalonOne\Client\Model\BaseNotificationWebhook $webhook webhook + * + * @return $this + */ + public function setWebhook($webhook) + { + $this->container['webhook'] = $webhook; + + return $this; + } + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. + * + * @return $this + */ + public function setId($id) + { + + if (($id < 1)) { + throw new \InvalidArgumentException('invalid value for $id when calling BaseNotification., must be bigger than or equal to 1.'); + } + + $this->container['id'] = $id; + + 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/BaseNotificationEntity.php b/lib/Model/BaseNotificationEntity.php new file mode 100644 index 00000000..a11b3fdd --- /dev/null +++ b/lib/Model/BaseNotificationEntity.php @@ -0,0 +1,310 @@ + 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'policy' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'policy' => 'policy' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'policy' => 'setPolicy' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'policy' => 'getPolicy' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * 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['policy'] = isset($data['policy']) ? $data['policy'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['policy'] === null) { + $invalidProperties[] = "'policy' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets policy + * + * @return object + */ + public function getPolicy() + { + return $this->container['policy']; + } + + /** + * Sets policy + * + * @param object $policy policy + * + * @return $this + */ + public function setPolicy($policy) + { + $this->container['policy'] = $policy; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/BaseNotificationWebhook.php b/lib/Model/BaseNotificationWebhook.php new file mode 100644 index 00000000..f0e57509 --- /dev/null +++ b/lib/Model/BaseNotificationWebhook.php @@ -0,0 +1,443 @@ + 'int', + 'created' => '\DateTime', + 'modified' => '\DateTime', + 'url' => 'string', + 'headers' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'modified' => 'date-time', + 'url' => null, + 'headers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'modified' => 'modified', + 'url' => 'url', + 'headers' => 'headers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'modified' => 'setModified', + 'url' => 'setUrl', + 'headers' => 'setHeaders' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'modified' => 'getModified', + 'url' => 'getUrl', + 'headers' => 'getHeaders' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; + $this->container['url'] = isset($data['url']) ? $data['url'] : null; + $this->container['headers'] = isset($data['headers']) ? $data['headers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['modified'] === null) { + $invalidProperties[] = "'modified' can't be null"; + } + if ($this->container['url'] === null) { + $invalidProperties[] = "'url' can't be null"; + } + if ($this->container['headers'] === null) { + $invalidProperties[] = "'headers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Internal ID of this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets modified + * + * @return \DateTime + */ + public function getModified() + { + return $this->container['modified']; + } + + /** + * Sets modified + * + * @param \DateTime $modified The time this entity was last modified. + * + * @return $this + */ + public function setModified($modified) + { + $this->container['modified'] = $modified; + + return $this; + } + + /** + * Gets url + * + * @return string + */ + public function getUrl() + { + return $this->container['url']; + } + + /** + * Sets url + * + * @param string $url API URL for the given webhook-based notification. + * + * @return $this + */ + public function setUrl($url) + { + $this->container['url'] = $url; + + return $this; + } + + /** + * Gets headers + * + * @return string[] + */ + public function getHeaders() + { + return $this->container['headers']; + } + + /** + * Sets headers + * + * @param string[] $headers List of API HTTP headers for the given webhook-based notification. + * + * @return $this + */ + public function setHeaders($headers) + { + $this->container['headers'] = $headers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/BaseNotifications.php b/lib/Model/BaseNotifications.php new file mode 100644 index 00000000..6c4b7b2e --- /dev/null +++ b/lib/Model/BaseNotifications.php @@ -0,0 +1,307 @@ + '\TalonOne\Client\Model\BaseNotification[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \TalonOne\Client\Model\BaseNotification[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\BaseNotification[]|null $data List of notifications. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/BaseSamlConnection.php b/lib/Model/BaseSamlConnection.php index 437f4da4..c4eaea02 100644 --- a/lib/Model/BaseSamlConnection.php +++ b/lib/Model/BaseSamlConnection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Binding.php b/lib/Model/Binding.php index 9ad469b8..7f778174 100644 --- a/lib/Model/Binding.php +++ b/lib/Model/Binding.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/BulkApplicationNotification.php b/lib/Model/BulkApplicationNotification.php index 2b1c1dee..0c088a46 100644 --- a/lib/Model/BulkApplicationNotification.php +++ b/lib/Model/BulkApplicationNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/BulkCampaignNotification.php b/lib/Model/BulkCampaignNotification.php index 271061f1..6a8f3526 100644 --- a/lib/Model/BulkCampaignNotification.php +++ b/lib/Model/BulkCampaignNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Campaign.php b/lib/Model/Campaign.php index 615a5ba9..2e95ff69 100644 --- a/lib/Model/Campaign.php +++ b/lib/Model/Campaign.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -89,6 +89,7 @@ class Campaign implements ModelInterface, ArrayAccess 'redeemedLoyaltyPointsCount' => 'float', 'redeemedLoyaltyPointsEffectCount' => 'int', 'callApiEffectCount' => 'int', + 'reservecouponEffectCount' => 'int', 'lastActivity' => '\DateTime', 'updated' => '\DateTime', 'createdBy' => 'string', @@ -133,6 +134,7 @@ class Campaign implements ModelInterface, ArrayAccess 'redeemedLoyaltyPointsCount' => null, 'redeemedLoyaltyPointsEffectCount' => null, 'callApiEffectCount' => null, + 'reservecouponEffectCount' => null, 'lastActivity' => 'date-time', 'updated' => 'date-time', 'createdBy' => null, @@ -198,6 +200,7 @@ public static function openAPIFormats() 'redeemedLoyaltyPointsCount' => 'redeemedLoyaltyPointsCount', 'redeemedLoyaltyPointsEffectCount' => 'redeemedLoyaltyPointsEffectCount', 'callApiEffectCount' => 'callApiEffectCount', + 'reservecouponEffectCount' => 'reservecouponEffectCount', 'lastActivity' => 'lastActivity', 'updated' => 'updated', 'createdBy' => 'createdBy', @@ -242,6 +245,7 @@ public static function openAPIFormats() 'redeemedLoyaltyPointsCount' => 'setRedeemedLoyaltyPointsCount', 'redeemedLoyaltyPointsEffectCount' => 'setRedeemedLoyaltyPointsEffectCount', 'callApiEffectCount' => 'setCallApiEffectCount', + 'reservecouponEffectCount' => 'setReservecouponEffectCount', 'lastActivity' => 'setLastActivity', 'updated' => 'setUpdated', 'createdBy' => 'setCreatedBy', @@ -286,6 +290,7 @@ public static function openAPIFormats() 'redeemedLoyaltyPointsCount' => 'getRedeemedLoyaltyPointsCount', 'redeemedLoyaltyPointsEffectCount' => 'getRedeemedLoyaltyPointsEffectCount', 'callApiEffectCount' => 'getCallApiEffectCount', + 'reservecouponEffectCount' => 'getReservecouponEffectCount', 'lastActivity' => 'getLastActivity', 'updated' => 'getUpdated', 'createdBy' => 'getCreatedBy', @@ -341,6 +346,7 @@ public function getModelName() const FEATURES_REFERRALS = 'referrals'; const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; @@ -370,6 +376,7 @@ public function getFeaturesAllowableValues() self::FEATURES_REFERRALS, self::FEATURES_LOYALTY, self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, ]; } @@ -420,6 +427,7 @@ public function __construct(array $data = null) $this->container['redeemedLoyaltyPointsCount'] = isset($data['redeemedLoyaltyPointsCount']) ? $data['redeemedLoyaltyPointsCount'] : null; $this->container['redeemedLoyaltyPointsEffectCount'] = isset($data['redeemedLoyaltyPointsEffectCount']) ? $data['redeemedLoyaltyPointsEffectCount'] : null; $this->container['callApiEffectCount'] = isset($data['callApiEffectCount']) ? $data['callApiEffectCount'] : null; + $this->container['reservecouponEffectCount'] = isset($data['reservecouponEffectCount']) ? $data['reservecouponEffectCount'] : null; $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; $this->container['updated'] = isset($data['updated']) ? $data['updated'] : null; $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; @@ -578,7 +586,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ @@ -760,7 +768,7 @@ public function getActiveRulesetId() /** * Sets activeRulesetId * - * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api/#operation/getRulesets) this campaign applies on customer session evaluation. + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. * * @return $this */ @@ -889,7 +897,7 @@ public function getLimits() /** * Sets limits * - * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/) for this campaign. + * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. * * @return $this */ @@ -913,7 +921,7 @@ public function getCampaignGroups() /** * Sets campaignGroups * - * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this campaign belongs to. + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. * * @return $this */ @@ -1260,6 +1268,30 @@ public function setCallApiEffectCount($callApiEffectCount) return $this; } + /** + * Gets reservecouponEffectCount + * + * @return int|null + */ + public function getReservecouponEffectCount() + { + return $this->container['reservecouponEffectCount']; + } + + /** + * Sets reservecouponEffectCount + * + * @param int|null $reservecouponEffectCount Total number of reserve coupon effects triggered by rules in this campaign. + * + * @return $this + */ + public function setReservecouponEffectCount($reservecouponEffectCount) + { + $this->container['reservecouponEffectCount'] = $reservecouponEffectCount; + + return $this; + } + /** * Gets lastActivity * diff --git a/lib/Model/CampaignActivationRequest.php b/lib/Model/CampaignActivationRequest.php index 7236ef65..469198b4 100644 --- a/lib/Model/CampaignActivationRequest.php +++ b/lib/Model/CampaignActivationRequest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignAnalytics.php b/lib/Model/CampaignAnalytics.php index b9939a7b..db21c896 100644 --- a/lib/Model/CampaignAnalytics.php +++ b/lib/Model/CampaignAnalytics.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignCollection.php b/lib/Model/CampaignCollection.php index 93657768..e2f9f607 100644 --- a/lib/Model/CampaignCollection.php +++ b/lib/Model/CampaignCollection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -304,7 +304,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -328,7 +328,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -376,7 +376,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/CampaignCollectionWithoutPayload.php b/lib/Model/CampaignCollectionWithoutPayload.php index 8967369a..a107d57a 100644 --- a/lib/Model/CampaignCollectionWithoutPayload.php +++ b/lib/Model/CampaignCollectionWithoutPayload.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -298,7 +298,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -322,7 +322,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -370,7 +370,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/CampaignCopy.php b/lib/Model/CampaignCopy.php index a8e31b49..857e83ad 100644 --- a/lib/Model/CampaignCopy.php +++ b/lib/Model/CampaignCopy.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignCreatedNotification.php b/lib/Model/CampaignCreatedNotification.php index 37a3f226..034513bc 100644 --- a/lib/Model/CampaignCreatedNotification.php +++ b/lib/Model/CampaignCreatedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,9 @@ class CampaignCreatedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => '\TalonOne\Client\Model\Campaign' + 'campaign' => 'Campaign', + 'ruleset' => '\TalonOne\Client\Model\Ruleset', + 'priority' => '\TalonOne\Client\Model\PriorityPosition' ]; /** @@ -67,7 +69,9 @@ class CampaignCreatedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'campaign' => null + 'campaign' => null, + 'ruleset' => null, + 'priority' => null ]; /** @@ -97,7 +101,9 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'campaign' => 'campaign' + 'campaign' => 'campaign', + 'ruleset' => 'ruleset', + 'priority' => 'priority' ]; /** @@ -106,7 +112,9 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'campaign' => 'setCampaign' + 'campaign' => 'setCampaign', + 'ruleset' => 'setRuleset', + 'priority' => 'setPriority' ]; /** @@ -115,7 +123,9 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'campaign' => 'getCampaign' + 'campaign' => 'getCampaign', + 'ruleset' => 'getRuleset', + 'priority' => 'getPriority' ]; /** @@ -179,6 +189,8 @@ public function getModelName() public function __construct(array $data = null) { $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; + $this->container['ruleset'] = isset($data['ruleset']) ? $data['ruleset'] : null; + $this->container['priority'] = isset($data['priority']) ? $data['priority'] : null; } /** @@ -193,6 +205,9 @@ public function listInvalidProperties() if ($this->container['campaign'] === null) { $invalidProperties[] = "'campaign' can't be null"; } + if ($this->container['priority'] === null) { + $invalidProperties[] = "'priority' can't be null"; + } return $invalidProperties; } @@ -211,7 +226,7 @@ public function valid() /** * Gets campaign * - * @return \TalonOne\Client\Model\Campaign + * @return Campaign */ public function getCampaign() { @@ -221,7 +236,7 @@ public function getCampaign() /** * Sets campaign * - * @param \TalonOne\Client\Model\Campaign $campaign campaign + * @param Campaign $campaign campaign * * @return $this */ @@ -231,6 +246,54 @@ public function setCampaign($campaign) return $this; } + + /** + * Gets ruleset + * + * @return \TalonOne\Client\Model\Ruleset|null + */ + public function getRuleset() + { + return $this->container['ruleset']; + } + + /** + * Sets ruleset + * + * @param \TalonOne\Client\Model\Ruleset|null $ruleset ruleset + * + * @return $this + */ + public function setRuleset($ruleset) + { + $this->container['ruleset'] = $ruleset; + + return $this; + } + + /** + * Gets priority + * + * @return \TalonOne\Client\Model\PriorityPosition + */ + public function getPriority() + { + return $this->container['priority']; + } + + /** + * Sets priority + * + * @param \TalonOne\Client\Model\PriorityPosition $priority priority + * + * @return $this + */ + public function setPriority($priority) + { + $this->container['priority'] = $priority; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignDeletedNotification.php b/lib/Model/CampaignDeletedNotification.php index 4d751e6b..82ebee58 100644 --- a/lib/Model/CampaignDeletedNotification.php +++ b/lib/Model/CampaignDeletedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,8 @@ class CampaignDeletedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => '\TalonOne\Client\Model\Campaign' + 'campaign' => 'Campaign', + 'deletedAt' => '\DateTime' ]; /** @@ -67,7 +68,8 @@ class CampaignDeletedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'campaign' => null + 'campaign' => null, + 'deletedAt' => 'date-time' ]; /** @@ -97,7 +99,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'campaign' => 'campaign' + 'campaign' => 'campaign', + 'deletedAt' => 'deletedAt' ]; /** @@ -106,7 +109,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'campaign' => 'setCampaign' + 'campaign' => 'setCampaign', + 'deletedAt' => 'setDeletedAt' ]; /** @@ -115,7 +119,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'campaign' => 'getCampaign' + 'campaign' => 'getCampaign', + 'deletedAt' => 'getDeletedAt' ]; /** @@ -179,6 +184,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; + $this->container['deletedAt'] = isset($data['deletedAt']) ? $data['deletedAt'] : null; } /** @@ -193,6 +199,9 @@ public function listInvalidProperties() if ($this->container['campaign'] === null) { $invalidProperties[] = "'campaign' can't be null"; } + if ($this->container['deletedAt'] === null) { + $invalidProperties[] = "'deletedAt' can't be null"; + } return $invalidProperties; } @@ -211,7 +220,7 @@ public function valid() /** * Gets campaign * - * @return \TalonOne\Client\Model\Campaign + * @return Campaign */ public function getCampaign() { @@ -221,7 +230,7 @@ public function getCampaign() /** * Sets campaign * - * @param \TalonOne\Client\Model\Campaign $campaign campaign + * @param Campaign $campaign campaign * * @return $this */ @@ -231,6 +240,30 @@ public function setCampaign($campaign) return $this; } + + /** + * Gets deletedAt + * + * @return \DateTime + */ + public function getDeletedAt() + { + return $this->container['deletedAt']; + } + + /** + * Sets deletedAt + * + * @param \DateTime $deletedAt Time when the campaign was deleted. + * + * @return $this + */ + public function setDeletedAt($deletedAt) + { + $this->container['deletedAt'] = $deletedAt; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignEditedNotification.php b/lib/Model/CampaignEditedNotification.php index 15647c57..fa27cede 100644 --- a/lib/Model/CampaignEditedNotification.php +++ b/lib/Model/CampaignEditedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,8 +58,9 @@ class CampaignEditedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => '\TalonOne\Client\Model\Campaign', - 'oldCampaign' => '\TalonOne\Client\Model\Campaign' + 'campaign' => 'Campaign', + 'oldCampaign' => 'Campaign', + 'ruleset' => '\TalonOne\Client\Model\Ruleset' ]; /** @@ -69,7 +70,8 @@ class CampaignEditedNotification implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'campaign' => null, - 'oldCampaign' => null + 'oldCampaign' => null, + 'ruleset' => null ]; /** @@ -100,7 +102,8 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'campaign' => 'campaign', - 'oldCampaign' => 'oldCampaign' + 'oldCampaign' => 'oldCampaign', + 'ruleset' => 'ruleset' ]; /** @@ -110,7 +113,8 @@ public static function openAPIFormats() */ protected static $setters = [ 'campaign' => 'setCampaign', - 'oldCampaign' => 'setOldCampaign' + 'oldCampaign' => 'setOldCampaign', + 'ruleset' => 'setRuleset' ]; /** @@ -120,7 +124,8 @@ public static function openAPIFormats() */ protected static $getters = [ 'campaign' => 'getCampaign', - 'oldCampaign' => 'getOldCampaign' + 'oldCampaign' => 'getOldCampaign', + 'ruleset' => 'getRuleset' ]; /** @@ -185,6 +190,7 @@ public function __construct(array $data = null) { $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; $this->container['oldCampaign'] = isset($data['oldCampaign']) ? $data['oldCampaign'] : null; + $this->container['ruleset'] = isset($data['ruleset']) ? $data['ruleset'] : null; } /** @@ -220,7 +226,7 @@ public function valid() /** * Gets campaign * - * @return \TalonOne\Client\Model\Campaign + * @return Campaign */ public function getCampaign() { @@ -230,7 +236,7 @@ public function getCampaign() /** * Sets campaign * - * @param \TalonOne\Client\Model\Campaign $campaign campaign + * @param Campaign $campaign campaign * * @return $this */ @@ -244,7 +250,7 @@ public function setCampaign($campaign) /** * Gets oldCampaign * - * @return \TalonOne\Client\Model\Campaign + * @return Campaign */ public function getOldCampaign() { @@ -254,7 +260,7 @@ public function getOldCampaign() /** * Sets oldCampaign * - * @param \TalonOne\Client\Model\Campaign $oldCampaign oldCampaign + * @param Campaign $oldCampaign oldCampaign * * @return $this */ @@ -264,6 +270,30 @@ public function setOldCampaign($oldCampaign) return $this; } + + /** + * Gets ruleset + * + * @return \TalonOne\Client\Model\Ruleset|null + */ + public function getRuleset() + { + return $this->container['ruleset']; + } + + /** + * Sets ruleset + * + * @param \TalonOne\Client\Model\Ruleset|null $ruleset ruleset + * + * @return $this + */ + public function setRuleset($ruleset) + { + $this->container['ruleset'] = $ruleset; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignEntity.php b/lib/Model/CampaignEntity.php index 876a0b12..bcc6ebe8 100644 --- a/lib/Model/CampaignEntity.php +++ b/lib/Model/CampaignEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignGroup.php b/lib/Model/CampaignGroup.php index 39166119..e10bf85f 100644 --- a/lib/Model/CampaignGroup.php +++ b/lib/Model/CampaignGroup.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -279,7 +279,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -303,7 +303,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -327,7 +327,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/CampaignGroupEntity.php b/lib/Model/CampaignGroupEntity.php index 6dda4209..33630617 100644 --- a/lib/Model/CampaignGroupEntity.php +++ b/lib/Model/CampaignGroupEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignNotification.php b/lib/Model/CampaignNotification.php index d569fd7e..15950716 100644 --- a/lib/Model/CampaignNotification.php +++ b/lib/Model/CampaignNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignPrioritiesChangedNotification.php b/lib/Model/CampaignPrioritiesChangedNotification.php index d1204a88..85b32284 100644 --- a/lib/Model/CampaignPrioritiesChangedNotification.php +++ b/lib/Model/CampaignPrioritiesChangedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,9 +58,9 @@ class CampaignPrioritiesChangedNotification implements ModelInterface, ArrayAcce * @var string[] */ protected static $openAPITypes = [ - 'application' => '\TalonOne\Client\Model\Application', - 'oldPriorities' => 'map[string,int[]]', - 'priorities' => 'map[string,int[]]' + 'applicationId' => 'int', + 'oldPriorities' => '\TalonOne\Client\Model\CampaignSet', + 'priorities' => '\TalonOne\Client\Model\CampaignSet' ]; /** @@ -69,7 +69,7 @@ class CampaignPrioritiesChangedNotification implements ModelInterface, ArrayAcce * @var string[] */ protected static $openAPIFormats = [ - 'application' => null, + 'applicationId' => null, 'oldPriorities' => null, 'priorities' => null ]; @@ -101,7 +101,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'application' => 'application', + 'applicationId' => 'applicationId', 'oldPriorities' => 'oldPriorities', 'priorities' => 'priorities' ]; @@ -112,7 +112,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'application' => 'setApplication', + 'applicationId' => 'setApplicationId', 'oldPriorities' => 'setOldPriorities', 'priorities' => 'setPriorities' ]; @@ -123,7 +123,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'application' => 'getApplication', + 'applicationId' => 'getApplicationId', 'oldPriorities' => 'getOldPriorities', 'priorities' => 'getPriorities' ]; @@ -188,7 +188,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['application'] = isset($data['application']) ? $data['application'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['oldPriorities'] = isset($data['oldPriorities']) ? $data['oldPriorities'] : null; $this->container['priorities'] = isset($data['priorities']) ? $data['priorities'] : null; } @@ -202,8 +202,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['application'] === null) { - $invalidProperties[] = "'application' can't be null"; + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; } if ($this->container['priorities'] === null) { $invalidProperties[] = "'priorities' can't be null"; @@ -224,25 +224,25 @@ public function valid() /** - * Gets application + * Gets applicationId * - * @return \TalonOne\Client\Model\Application + * @return int */ - public function getApplication() + public function getApplicationId() { - return $this->container['application']; + return $this->container['applicationId']; } /** - * Sets application + * Sets applicationId * - * @param \TalonOne\Client\Model\Application $application application + * @param int $applicationId The ID of the Application whose campaigns' priorities changed. * * @return $this */ - public function setApplication($application) + public function setApplicationId($applicationId) { - $this->container['application'] = $application; + $this->container['applicationId'] = $applicationId; return $this; } @@ -250,7 +250,7 @@ public function setApplication($application) /** * Gets oldPriorities * - * @return map[string,int[]]|null + * @return \TalonOne\Client\Model\CampaignSet|null */ public function getOldPriorities() { @@ -260,7 +260,7 @@ public function getOldPriorities() /** * Sets oldPriorities * - * @param map[string,int[]]|null $oldPriorities Campaign IDs for each priority. The priority can be one of: ['universal', 'stackable', 'exclusive'] + * @param \TalonOne\Client\Model\CampaignSet|null $oldPriorities oldPriorities * * @return $this */ @@ -274,7 +274,7 @@ public function setOldPriorities($oldPriorities) /** * Gets priorities * - * @return map[string,int[]] + * @return \TalonOne\Client\Model\CampaignSet */ public function getPriorities() { @@ -284,7 +284,7 @@ public function getPriorities() /** * Sets priorities * - * @param map[string,int[]] $priorities Campaign IDs for each priority. The priority can be one of: ['universal', 'stackable', 'exclusive'] + * @param \TalonOne\Client\Model\CampaignSet $priorities priorities * * @return $this */ diff --git a/lib/Model/CampaignPrioritiesV2.php b/lib/Model/CampaignPrioritiesV2.php index e1971759..398356f2 100644 --- a/lib/Model/CampaignPrioritiesV2.php +++ b/lib/Model/CampaignPrioritiesV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignRulesetChangedNotification.php b/lib/Model/CampaignRulesetChangedNotification.php index 1d760849..d28d4cdc 100644 --- a/lib/Model/CampaignRulesetChangedNotification.php +++ b/lib/Model/CampaignRulesetChangedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class CampaignRulesetChangedNotification implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'campaign' => '\TalonOne\Client\Model\Campaign', + 'campaign' => 'Campaign', 'oldRuleset' => '\TalonOne\Client\Model\Ruleset', 'ruleset' => '\TalonOne\Client\Model\Ruleset' ]; @@ -205,9 +205,6 @@ public function listInvalidProperties() if ($this->container['campaign'] === null) { $invalidProperties[] = "'campaign' can't be null"; } - if ($this->container['ruleset'] === null) { - $invalidProperties[] = "'ruleset' can't be null"; - } return $invalidProperties; } @@ -226,7 +223,7 @@ public function valid() /** * Gets campaign * - * @return \TalonOne\Client\Model\Campaign + * @return Campaign */ public function getCampaign() { @@ -236,7 +233,7 @@ public function getCampaign() /** * Sets campaign * - * @param \TalonOne\Client\Model\Campaign $campaign campaign + * @param Campaign $campaign campaign * * @return $this */ @@ -274,7 +271,7 @@ public function setOldRuleset($oldRuleset) /** * Gets ruleset * - * @return \TalonOne\Client\Model\Ruleset + * @return \TalonOne\Client\Model\Ruleset|null */ public function getRuleset() { @@ -284,7 +281,7 @@ public function getRuleset() /** * Sets ruleset * - * @param \TalonOne\Client\Model\Ruleset $ruleset ruleset + * @param \TalonOne\Client\Model\Ruleset|null $ruleset ruleset * * @return $this */ diff --git a/lib/Model/CampaignSearch.php b/lib/Model/CampaignSearch.php index 7f2f11c8..3815b00c 100644 --- a/lib/Model/CampaignSearch.php +++ b/lib/Model/CampaignSearch.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignSet.php b/lib/Model/CampaignSet.php index 641562c6..34fc10f8 100644 --- a/lib/Model/CampaignSet.php +++ b/lib/Model/CampaignSet.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -62,7 +62,8 @@ class CampaignSet implements ModelInterface, ArrayAccess 'created' => '\DateTime', 'applicationId' => 'int', 'version' => 'int', - 'set' => '\TalonOne\Client\Model\CampaignSetBranchNode' + 'set' => '\TalonOne\Client\Model\CampaignSetBranchNode', + 'updatedBy' => 'string' ]; /** @@ -75,7 +76,8 @@ class CampaignSet implements ModelInterface, ArrayAccess 'created' => 'date-time', 'applicationId' => null, 'version' => null, - 'set' => null + 'set' => null, + 'updatedBy' => null ]; /** @@ -109,7 +111,8 @@ public static function openAPIFormats() 'created' => 'created', 'applicationId' => 'applicationId', 'version' => 'version', - 'set' => 'set' + 'set' => 'set', + 'updatedBy' => 'updatedBy' ]; /** @@ -122,7 +125,8 @@ public static function openAPIFormats() 'created' => 'setCreated', 'applicationId' => 'setApplicationId', 'version' => 'setVersion', - 'set' => 'setSet' + 'set' => 'setSet', + 'updatedBy' => 'setUpdatedBy' ]; /** @@ -135,7 +139,8 @@ public static function openAPIFormats() 'created' => 'getCreated', 'applicationId' => 'getApplicationId', 'version' => 'getVersion', - 'set' => 'getSet' + 'set' => 'getSet', + 'updatedBy' => 'getUpdatedBy' ]; /** @@ -203,6 +208,7 @@ public function __construct(array $data = null) $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['version'] = isset($data['version']) ? $data['version'] : null; $this->container['set'] = isset($data['set']) ? $data['set'] : null; + $this->container['updatedBy'] = isset($data['updatedBy']) ? $data['updatedBy'] : null; } /** @@ -261,7 +267,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -285,7 +291,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -372,6 +378,30 @@ public function setSet($set) return $this; } + + /** + * Gets updatedBy + * + * @return string|null + */ + public function getUpdatedBy() + { + return $this->container['updatedBy']; + } + + /** + * Sets updatedBy + * + * @param string|null $updatedBy Name of the user who last updated this campaign set, if available. + * + * @return $this + */ + public function setUpdatedBy($updatedBy) + { + $this->container['updatedBy'] = $updatedBy; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignSetBranchNode.php b/lib/Model/CampaignSetBranchNode.php index e13f2ee2..34f95ca3 100644 --- a/lib/Model/CampaignSetBranchNode.php +++ b/lib/Model/CampaignSetBranchNode.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignSetIDs.php b/lib/Model/CampaignSetIDs.php index ad178a51..b58f8459 100644 --- a/lib/Model/CampaignSetIDs.php +++ b/lib/Model/CampaignSetIDs.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignSetLeafNode.php b/lib/Model/CampaignSetLeafNode.php index 9f3f80ac..78c1a8ef 100644 --- a/lib/Model/CampaignSetLeafNode.php +++ b/lib/Model/CampaignSetLeafNode.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignSetNode.php b/lib/Model/CampaignSetNode.php index aa8e4ac2..fb4252bc 100644 --- a/lib/Model/CampaignSetNode.php +++ b/lib/Model/CampaignSetNode.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignSetV2.php b/lib/Model/CampaignSetV2.php index 922b34da..29112fb4 100644 --- a/lib/Model/CampaignSetV2.php +++ b/lib/Model/CampaignSetV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -261,7 +261,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -285,7 +285,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/CampaignStateChangedNotification.php b/lib/Model/CampaignStateChangedNotification.php index 4bea3a70..930d7afb 100644 --- a/lib/Model/CampaignStateChangedNotification.php +++ b/lib/Model/CampaignStateChangedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,7 +60,8 @@ class CampaignStateChangedNotification implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'campaign' => '\TalonOne\Client\Model\Campaign', 'oldState' => 'string', - 'newState' => 'string' + 'newState' => 'string', + 'ruleset' => '\TalonOne\Client\Model\Ruleset' ]; /** @@ -71,7 +72,8 @@ class CampaignStateChangedNotification implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'campaign' => null, 'oldState' => null, - 'newState' => null + 'newState' => null, + 'ruleset' => null ]; /** @@ -103,7 +105,8 @@ public static function openAPIFormats() protected static $attributeMap = [ 'campaign' => 'campaign', 'oldState' => 'oldState', - 'newState' => 'newState' + 'newState' => 'newState', + 'ruleset' => 'ruleset' ]; /** @@ -114,7 +117,8 @@ public static function openAPIFormats() protected static $setters = [ 'campaign' => 'setCampaign', 'oldState' => 'setOldState', - 'newState' => 'setNewState' + 'newState' => 'setNewState', + 'ruleset' => 'setRuleset' ]; /** @@ -125,7 +129,8 @@ public static function openAPIFormats() protected static $getters = [ 'campaign' => 'getCampaign', 'oldState' => 'getOldState', - 'newState' => 'getNewState' + 'newState' => 'getNewState', + 'ruleset' => 'getRuleset' ]; /** @@ -191,6 +196,7 @@ public function __construct(array $data = null) $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; $this->container['oldState'] = isset($data['oldState']) ? $data['oldState'] : null; $this->container['newState'] = isset($data['newState']) ? $data['newState'] : null; + $this->container['ruleset'] = isset($data['ruleset']) ? $data['ruleset'] : null; } /** @@ -297,6 +303,30 @@ public function setNewState($newState) return $this; } + + /** + * Gets ruleset + * + * @return \TalonOne\Client\Model\Ruleset|null + */ + public function getRuleset() + { + return $this->container['ruleset']; + } + + /** + * Sets ruleset + * + * @param \TalonOne\Client\Model\Ruleset|null $ruleset ruleset + * + * @return $this + */ + public function setRuleset($ruleset) + { + $this->container['ruleset'] = $ruleset; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CampaignTemplate.php b/lib/Model/CampaignTemplate.php index 1f53a893..a1a2756a 100644 --- a/lib/Model/CampaignTemplate.php +++ b/lib/Model/CampaignTemplate.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -276,6 +276,7 @@ public function getModelName() const FEATURES_REFERRALS = 'referrals'; const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; @@ -305,6 +306,7 @@ public function getFeaturesAllowableValues() self::FEATURES_REFERRALS, self::FEATURES_LOYALTY, self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, ]; } @@ -428,7 +430,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -452,7 +454,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -500,7 +502,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ @@ -601,7 +603,7 @@ public function getCampaignAttributes() /** * Sets campaignAttributes * - * @param object|null $campaignAttributes The Campaign Attributes that Campaigns created from this template will have by default. + * @param object|null $campaignAttributes The campaign attributes that campaigns created from this template will have by default. * * @return $this */ @@ -625,7 +627,7 @@ public function getCouponAttributes() /** * Sets couponAttributes * - * @param object|null $couponAttributes The Campaign Attributes that Coupons created from this template will have by default. + * @param object|null $couponAttributes The campaign attributes that coupons created from this template will have by default. * * @return $this */ @@ -649,7 +651,7 @@ public function getState() /** * Sets state * - * @param string $state Only Campaign Templates in 'available' state may be used to create Campaigns. + * @param string $state Only campaign templates in 'available' state may be used to create campaigns. * * @return $this */ @@ -682,7 +684,7 @@ public function getActiveRulesetId() /** * Sets activeRulesetId * - * @param int|null $activeRulesetId The ID of the Ruleset this Campaign Template will use. + * @param int|null $activeRulesetId The ID of the ruleset this campaign template will use. * * @return $this */ @@ -811,7 +813,7 @@ public function getLimits() /** * Sets limits * - * @param \TalonOne\Client\Model\TemplateLimitConfig[]|null $limits The set of limits that will operate for this campaign template. + * @param \TalonOne\Client\Model\TemplateLimitConfig[]|null $limits The set of limits that operate for this campaign template. * * @return $this */ @@ -835,7 +837,7 @@ public function getTemplateParams() /** * Sets templateParams * - * @param \TalonOne\Client\Model\CampaignTemplateParams[]|null $templateParams Template parameters are fields which can be used to replace values in a rule. + * @param \TalonOne\Client\Model\CampaignTemplateParams[]|null $templateParams Fields which can be used to replace values in a rule. * * @return $this */ @@ -859,7 +861,7 @@ public function getApplicationsIds() /** * Sets applicationsIds * - * @param int[] $applicationsIds A list of the IDs of the applications that are subscribed to this campaign template. A list of the IDs of the applications that are subscribed to this campaign template. + * @param int[] $applicationsIds A list of IDs of the Applications that are subscribed to this campaign template. * * @return $this */ @@ -907,7 +909,7 @@ public function getDefaultCampaignGroupId() /** * Sets defaultCampaignGroupId * - * @param int|null $defaultCampaignGroupId The default campaignGroupId. + * @param int|null $defaultCampaignGroupId The default campaign group ID. * * @return $this */ @@ -955,7 +957,7 @@ public function getUpdatedBy() /** * Sets updatedBy * - * @param string|null $updatedBy Name of the user who last updated this campaign template if available. + * @param string|null $updatedBy Name of the user who last updated this campaign template, if available. * * @return $this */ @@ -979,7 +981,7 @@ public function getValidApplicationIds() /** * Sets validApplicationIds * - * @param int[] $validApplicationIds The IDs of the applications that are related to this entity. + * @param int[] $validApplicationIds The IDs of the Applications that are related to this entity. * * @return $this */ diff --git a/lib/Model/CampaignTemplateCollection.php b/lib/Model/CampaignTemplateCollection.php index c906a538..4257e627 100644 --- a/lib/Model/CampaignTemplateCollection.php +++ b/lib/Model/CampaignTemplateCollection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CampaignTemplateParams.php b/lib/Model/CampaignTemplateParams.php index 8dcb1949..ce72e038 100644 --- a/lib/Model/CampaignTemplateParams.php +++ b/lib/Model/CampaignTemplateParams.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CardLedgerTransactionLogEntry.php b/lib/Model/CardLedgerTransactionLogEntry.php index cbf8d0a7..c7f70312 100644 --- a/lib/Model/CardLedgerTransactionLogEntry.php +++ b/lib/Model/CardLedgerTransactionLogEntry.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -286,14 +286,11 @@ public function listInvalidProperties() if ($this->container['cardIdentifier'] === null) { $invalidProperties[] = "'cardIdentifier' can't be null"; } - if ((mb_strlen($this->container['cardIdentifier']) > 255)) { - $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 255."; + if ((mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; } - if ($this->container['customerSessionId'] === null) { - $invalidProperties[] = "'customerSessionId' can't be null"; - } - if ((mb_strlen($this->container['customerSessionId']) > 255)) { + if (!is_null($this->container['customerSessionId']) && (mb_strlen($this->container['customerSessionId']) > 255)) { $invalidProperties[] = "invalid value for 'customerSessionId', the character length must be smaller than or equal to 255."; } @@ -418,14 +415,14 @@ public function getCardIdentifier() /** * Sets cardIdentifier * - * @param string $cardIdentifier Identifier of the loyalty card. + * @param string $cardIdentifier The alphanumeric identifier of the loyalty card. * * @return $this */ public function setCardIdentifier($cardIdentifier) { - if ((mb_strlen($cardIdentifier) > 255)) { - throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling CardLedgerTransactionLogEntry., must be smaller than or equal to 255.'); + if ((mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling CardLedgerTransactionLogEntry., must be smaller than or equal to 108.'); } $this->container['cardIdentifier'] = $cardIdentifier; @@ -484,7 +481,7 @@ public function setSessionId($sessionId) /** * Gets customerSessionId * - * @return string + * @return string|null */ public function getCustomerSessionId() { @@ -494,13 +491,13 @@ public function getCustomerSessionId() /** * Sets customerSessionId * - * @param string $customerSessionId ID of the customer session where the transaction occurred. + * @param string|null $customerSessionId ID of the customer session where the transaction occurred. * * @return $this */ public function setCustomerSessionId($customerSessionId) { - if ((mb_strlen($customerSessionId) > 255)) { + if (!is_null($customerSessionId) && (mb_strlen($customerSessionId) > 255)) { throw new \InvalidArgumentException('invalid length for $customerSessionId when calling CardLedgerTransactionLogEntry., must be smaller than or equal to 255.'); } @@ -522,7 +519,7 @@ public function getType() /** * Sets type * - * @param string $type Type of transaction. Possible values are: - `addition`: Points were added. - `subtraction`: Points were subtracted. + * @param string $type Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. * * @return $this */ @@ -587,7 +584,7 @@ public function getStartDate() /** * Sets startDate * - * @param string $startDate Date when points become active. Possible values are: - `immediate`: Points are active immediately. - `timestamp value`: Points become active from the given date. + * @param string $startDate When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time. * * @return $this */ diff --git a/lib/Model/CardLedgerTransactionLogEntryIntegrationAPI.php b/lib/Model/CardLedgerTransactionLogEntryIntegrationAPI.php index fffb9fe9..c6ac3b56 100644 --- a/lib/Model/CardLedgerTransactionLogEntryIntegrationAPI.php +++ b/lib/Model/CardLedgerTransactionLogEntryIntegrationAPI.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -286,14 +286,11 @@ public function listInvalidProperties() if ($this->container['cardIdentifier'] === null) { $invalidProperties[] = "'cardIdentifier' can't be null"; } - if ((mb_strlen($this->container['cardIdentifier']) > 255)) { - $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 255."; + if ((mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; } - if ($this->container['customerSessionId'] === null) { - $invalidProperties[] = "'customerSessionId' can't be null"; - } - if ((mb_strlen($this->container['customerSessionId']) > 255)) { + if (!is_null($this->container['customerSessionId']) && (mb_strlen($this->container['customerSessionId']) > 255)) { $invalidProperties[] = "invalid value for 'customerSessionId', the character length must be smaller than or equal to 255."; } @@ -418,14 +415,14 @@ public function getCardIdentifier() /** * Sets cardIdentifier * - * @param string $cardIdentifier Identifier of the loyalty card. + * @param string $cardIdentifier The alphanumeric identifier of the loyalty card. * * @return $this */ public function setCardIdentifier($cardIdentifier) { - if ((mb_strlen($cardIdentifier) > 255)) { - throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling CardLedgerTransactionLogEntryIntegrationAPI., must be smaller than or equal to 255.'); + if ((mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling CardLedgerTransactionLogEntryIntegrationAPI., must be smaller than or equal to 108.'); } $this->container['cardIdentifier'] = $cardIdentifier; @@ -436,7 +433,7 @@ public function setCardIdentifier($cardIdentifier) /** * Gets customerSessionId * - * @return string + * @return string|null */ public function getCustomerSessionId() { @@ -446,13 +443,13 @@ public function getCustomerSessionId() /** * Sets customerSessionId * - * @param string $customerSessionId ID of the customer session where the transaction occurred. + * @param string|null $customerSessionId ID of the customer session where the transaction occurred. * * @return $this */ public function setCustomerSessionId($customerSessionId) { - if ((mb_strlen($customerSessionId) > 255)) { + if (!is_null($customerSessionId) && (mb_strlen($customerSessionId) > 255)) { throw new \InvalidArgumentException('invalid length for $customerSessionId when calling CardLedgerTransactionLogEntryIntegrationAPI., must be smaller than or equal to 255.'); } @@ -474,7 +471,7 @@ public function getType() /** * Sets type * - * @param string $type Type of transaction. Possible values are: - `addition`: Points were added. - `subtraction`: Points were subtracted. + * @param string $type Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. * * @return $this */ @@ -539,7 +536,7 @@ public function getStartDate() /** * Sets startDate * - * @param string $startDate Date when points become active. Possible values are: - `immediate`: Points are active immediately. - `timestamp value`: Points become active from the given date. + * @param string $startDate When points become active. Possible values: - `immediate`: Points are active immediately. - a timestamp value: Points become active at a given date and time. * * @return $this */ diff --git a/lib/Model/CartItem.php b/lib/Model/CartItem.php index 256eb039..2510a26f 100644 --- a/lib/Model/CartItem.php +++ b/lib/Model/CartItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -273,13 +273,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['name'] === null) { - $invalidProperties[] = "'name' can't be null"; - } - if ((mb_strlen($this->container['name']) < 1)) { - $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; - } - if ($this->container['sku'] === null) { $invalidProperties[] = "'sku' can't be null"; } @@ -294,9 +287,6 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'quantity', must be bigger than or equal to 1."; } - if ($this->container['price'] === null) { - $invalidProperties[] = "'price' can't be null"; - } return $invalidProperties; } @@ -315,7 +305,7 @@ public function valid() /** * Gets name * - * @return string + * @return string|null */ public function getName() { @@ -325,17 +315,12 @@ public function getName() /** * Sets name * - * @param string $name Name of item. + * @param string|null $name Name of item. * * @return $this */ public function setName($name) { - - if ((mb_strlen($name) < 1)) { - throw new \InvalidArgumentException('invalid length for $name when calling CartItem., must be bigger than or equal to 1.'); - } - $this->container['name'] = $name; return $this; @@ -383,7 +368,7 @@ public function getQuantity() /** * Sets quantity * - * @param int $quantity Quantity of item. **Important:** If you enabled [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items), the quantity is always one and the same cart item might receive multiple per-item discounts. Ensure you can process multiple discounts on one cart item correctly. + * @param int $quantity Quantity of item. **Important:** If you enabled [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening), the quantity is always one and the same cart item might receive multiple per-item discounts. Ensure you can process multiple discounts on one cart item correctly. * * @return $this */ @@ -450,7 +435,7 @@ public function setRemainingQuantity($remainingQuantity) /** * Gets price * - * @return float + * @return float|null */ public function getPrice() { @@ -460,7 +445,7 @@ public function getPrice() /** * Sets price * - * @param float $price Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/). If it is part of a catalog, setting a price here overrides the price from the catalog. + * @param float|null $price Price of the item in the currency defined by your Application. This field is required if this item is not part of a [catalog](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs). If it is part of a catalog, setting a price here overrides the price from the catalog. * * @return $this */ @@ -652,7 +637,7 @@ public function getAdditionalCosts() /** * Sets additionalCosts * - * @param map[string,\TalonOne\Client\Model\AdditionalCost]|null $additionalCosts Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs/). + * @param map[string,\TalonOne\Client\Model\AdditionalCost]|null $additionalCosts Use this property to set a value for the additional costs of this item, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). * * @return $this */ diff --git a/lib/Model/Catalog.php b/lib/Model/Catalog.php index 33d11f4f..089c97ac 100644 --- a/lib/Model/Catalog.php +++ b/lib/Model/Catalog.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -290,7 +290,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -314,7 +314,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -362,7 +362,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/CatalogAction.php b/lib/Model/CatalogAction.php index 991525c4..57884044 100644 --- a/lib/Model/CatalogAction.php +++ b/lib/Model/CatalogAction.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CatalogActionFilter.php b/lib/Model/CatalogActionFilter.php index 08a06047..21e4d74c 100644 --- a/lib/Model/CatalogActionFilter.php +++ b/lib/Model/CatalogActionFilter.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CatalogItem.php b/lib/Model/CatalogItem.php index 14a09864..757daa4b 100644 --- a/lib/Model/CatalogItem.php +++ b/lib/Model/CatalogItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -273,7 +273,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -297,7 +297,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/CatalogSyncRequest.php b/lib/Model/CatalogSyncRequest.php index ff426287..6b930a29 100644 --- a/lib/Model/CatalogSyncRequest.php +++ b/lib/Model/CatalogSyncRequest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -198,6 +198,10 @@ public function listInvalidProperties() if ($this->container['actions'] === null) { $invalidProperties[] = "'actions' can't be null"; } + if (!is_null($this->container['version']) && ($this->container['version'] < 1)) { + $invalidProperties[] = "invalid value for 'version', must be bigger than or equal to 1."; + } + return $invalidProperties; } @@ -256,6 +260,11 @@ public function getVersion() */ public function setVersion($version) { + + if (!is_null($version) && ($version < 1)) { + throw new \InvalidArgumentException('invalid value for $version when calling CatalogSyncRequest., must be bigger than or equal to 1.'); + } + $this->container['version'] = $version; return $this; diff --git a/lib/Model/CatalogsStrikethroughNotificationPolicy.php b/lib/Model/CatalogsStrikethroughNotificationPolicy.php new file mode 100644 index 00000000..6faf59a1 --- /dev/null +++ b/lib/Model/CatalogsStrikethroughNotificationPolicy.php @@ -0,0 +1,319 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling CatalogsStrikethroughNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/Change.php b/lib/Model/Change.php index b75a0d5d..80bb2eca 100644 --- a/lib/Model/Change.php +++ b/lib/Model/Change.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -64,7 +64,8 @@ class Change implements ModelInterface, ArrayAccess 'applicationId' => 'int', 'entity' => 'string', 'old' => 'object', - 'new' => 'object' + 'new' => 'object', + 'managementKeyId' => 'int' ]; /** @@ -79,7 +80,8 @@ class Change implements ModelInterface, ArrayAccess 'applicationId' => null, 'entity' => null, 'old' => null, - 'new' => null + 'new' => null, + 'managementKeyId' => null ]; /** @@ -115,7 +117,8 @@ public static function openAPIFormats() 'applicationId' => 'applicationId', 'entity' => 'entity', 'old' => 'old', - 'new' => 'new' + 'new' => 'new', + 'managementKeyId' => 'managementKeyId' ]; /** @@ -130,7 +133,8 @@ public static function openAPIFormats() 'applicationId' => 'setApplicationId', 'entity' => 'setEntity', 'old' => 'setOld', - 'new' => 'setNew' + 'new' => 'setNew', + 'managementKeyId' => 'setManagementKeyId' ]; /** @@ -145,7 +149,8 @@ public static function openAPIFormats() 'applicationId' => 'getApplicationId', 'entity' => 'getEntity', 'old' => 'getOld', - 'new' => 'getNew' + 'new' => 'getNew', + 'managementKeyId' => 'getManagementKeyId' ]; /** @@ -215,6 +220,7 @@ public function __construct(array $data = 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; + $this->container['managementKeyId'] = isset($data['managementKeyId']) ? $data['managementKeyId'] : null; } /** @@ -266,7 +272,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -290,7 +296,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -314,7 +320,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ @@ -420,6 +426,30 @@ public function setNew($new) return $this; } + + /** + * Gets managementKeyId + * + * @return int|null + */ + public function getManagementKeyId() + { + return $this->container['managementKeyId']; + } + + /** + * Sets managementKeyId + * + * @param int|null $managementKeyId ID of management key used to perform changes. + * + * @return $this + */ + public function setManagementKeyId($managementKeyId) + { + $this->container['managementKeyId'] = $managementKeyId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/ChangeProfilePassword.php b/lib/Model/ChangeProfilePassword.php index b249d9ab..fb5132ed 100644 --- a/lib/Model/ChangeProfilePassword.php +++ b/lib/Model/ChangeProfilePassword.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CodeGeneratorSettings.php b/lib/Model/CodeGeneratorSettings.php index 354b3baa..ead84ee1 100644 --- a/lib/Model/CodeGeneratorSettings.php +++ b/lib/Model/CodeGeneratorSettings.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -237,7 +237,7 @@ public function getValidCharacters() /** * Sets validCharacters * - * @param string[] $validCharacters List of characters used to generate the random parts of a code. Defaults to a list equivalent to the `[A-Z, 0-9]` regexp. + * @param string[] $validCharacters List of characters used to generate the random parts of a code. * * @return $this */ diff --git a/lib/Model/Collection.php b/lib/Model/Collection.php index a8c73d1a..776d8e87 100644 --- a/lib/Model/Collection.php +++ b/lib/Model/Collection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -310,7 +310,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -334,7 +334,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -382,7 +382,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/CollectionItem.php b/lib/Model/CollectionItem.php index 94615dd6..34077725 100644 --- a/lib/Model/CollectionItem.php +++ b/lib/Model/CollectionItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CollectionWithoutPayload.php b/lib/Model/CollectionWithoutPayload.php index 8bb712ae..bc0cc2f7 100644 --- a/lib/Model/CollectionWithoutPayload.php +++ b/lib/Model/CollectionWithoutPayload.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -304,7 +304,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -328,7 +328,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -376,7 +376,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/Coupon.php b/lib/Model/Coupon.php index 42634dc8..3b5d1db9 100644 --- a/lib/Model/Coupon.php +++ b/lib/Model/Coupon.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -64,18 +64,21 @@ class Coupon implements ModelInterface, ArrayAccess 'value' => 'string', 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'usageCounter' => 'int', 'discountCounter' => 'float', 'discountRemainder' => 'float', + 'reservationCounter' => 'float', 'attributes' => 'object', 'referralId' => 'int', 'recipientIntegrationId' => 'string', 'importId' => 'int', 'reservation' => 'bool', - 'batchId' => 'string' + 'batchId' => 'string', + 'isReservationMandatory' => 'bool' ]; /** @@ -90,18 +93,21 @@ class Coupon implements ModelInterface, ArrayAccess 'value' => null, 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'limits' => null, 'usageCounter' => null, 'discountCounter' => null, 'discountRemainder' => null, + 'reservationCounter' => null, 'attributes' => null, 'referralId' => null, 'recipientIntegrationId' => null, 'importId' => null, 'reservation' => null, - 'batchId' => null + 'batchId' => null, + 'isReservationMandatory' => null ]; /** @@ -137,18 +143,21 @@ public static function openAPIFormats() 'value' => 'value', 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'limits' => 'limits', 'usageCounter' => 'usageCounter', 'discountCounter' => 'discountCounter', 'discountRemainder' => 'discountRemainder', + 'reservationCounter' => 'reservationCounter', 'attributes' => 'attributes', 'referralId' => 'referralId', 'recipientIntegrationId' => 'recipientIntegrationId', 'importId' => 'importId', 'reservation' => 'reservation', - 'batchId' => 'batchId' + 'batchId' => 'batchId', + 'isReservationMandatory' => 'isReservationMandatory' ]; /** @@ -163,18 +172,21 @@ public static function openAPIFormats() 'value' => 'setValue', 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'limits' => 'setLimits', 'usageCounter' => 'setUsageCounter', 'discountCounter' => 'setDiscountCounter', 'discountRemainder' => 'setDiscountRemainder', + 'reservationCounter' => 'setReservationCounter', 'attributes' => 'setAttributes', 'referralId' => 'setReferralId', 'recipientIntegrationId' => 'setRecipientIntegrationId', 'importId' => 'setImportId', 'reservation' => 'setReservation', - 'batchId' => 'setBatchId' + 'batchId' => 'setBatchId', + 'isReservationMandatory' => 'setIsReservationMandatory' ]; /** @@ -189,18 +201,21 @@ public static function openAPIFormats() 'value' => 'getValue', 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'limits' => 'getLimits', 'usageCounter' => 'getUsageCounter', 'discountCounter' => 'getDiscountCounter', 'discountRemainder' => 'getDiscountRemainder', + 'reservationCounter' => 'getReservationCounter', 'attributes' => 'getAttributes', 'referralId' => 'getReferralId', 'recipientIntegrationId' => 'getRecipientIntegrationId', 'importId' => 'getImportId', 'reservation' => 'getReservation', - 'batchId' => 'getBatchId' + 'batchId' => 'getBatchId', + 'isReservationMandatory' => 'getIsReservationMandatory' ]; /** @@ -269,18 +284,21 @@ public function __construct(array $data = null) $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['usageLimit'] = isset($data['usageLimit']) ? $data['usageLimit'] : null; $this->container['discountLimit'] = isset($data['discountLimit']) ? $data['discountLimit'] : null; + $this->container['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['usageCounter'] = isset($data['usageCounter']) ? $data['usageCounter'] : null; $this->container['discountCounter'] = isset($data['discountCounter']) ? $data['discountCounter'] : null; $this->container['discountRemainder'] = isset($data['discountRemainder']) ? $data['discountRemainder'] : null; + $this->container['reservationCounter'] = isset($data['reservationCounter']) ? $data['reservationCounter'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['referralId'] = isset($data['referralId']) ? $data['referralId'] : null; $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; $this->container['importId'] = isset($data['importId']) ? $data['importId'] : null; $this->container['reservation'] = isset($data['reservation']) ? $data['reservation'] : true; $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; + $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; } /** @@ -327,6 +345,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if ($this->container['usageCounter'] === null) { $invalidProperties[] = "'usageCounter' can't be null"; } @@ -362,7 +388,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -386,7 +412,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -495,7 +521,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -514,6 +540,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling Coupon., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling Coupon., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -551,7 +609,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ @@ -599,7 +657,7 @@ public function getUsageCounter() /** * Sets usageCounter * - * @param int $usageCounter The number of times this coupon has been successfully used. + * @param int $usageCounter The number of times the coupon has been successfully redeemed. * * @return $this */ @@ -658,6 +716,30 @@ public function setDiscountRemainder($discountRemainder) return $this; } + /** + * Gets reservationCounter + * + * @return float|null + */ + public function getReservationCounter() + { + return $this->container['reservationCounter']; + } + + /** + * Sets reservationCounter + * + * @param float|null $reservationCounter The number of times this coupon has been reserved. + * + * @return $this + */ + public function setReservationCounter($reservationCounter) + { + $this->container['reservationCounter'] = $reservationCounter; + + return $this; + } + /** * Gets attributes * @@ -771,7 +853,7 @@ public function getReservation() /** * Sets reservation * - * @param bool|null $reservation Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation endpoint](/integration-api/#operation/createCouponReservation). - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons endpoint](/management-api/#operation/createCoupons) or [Create coupons for multiple recipients endpoint](/management-api/#operation/createCouponsForMultipleRecipients). + * @param bool|null $reservation Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. * * @return $this */ @@ -805,6 +887,30 @@ public function setBatchId($batchId) return $this; } + + /** + * Gets isReservationMandatory + * + * @return bool|null + */ + public function getIsReservationMandatory() + { + return $this->container['isReservationMandatory']; + } + + /** + * Sets isReservationMandatory + * + * @param bool|null $isReservationMandatory Whether the reservation effect actually created a new reservation. + * + * @return $this + */ + public function setIsReservationMandatory($isReservationMandatory) + { + $this->container['isReservationMandatory'] = $isReservationMandatory; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CouponConstraints.php b/lib/Model/CouponConstraints.php index 00da9683..1e48f470 100644 --- a/lib/Model/CouponConstraints.php +++ b/lib/Model/CouponConstraints.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,6 +59,7 @@ class CouponConstraints implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime' ]; @@ -71,6 +72,7 @@ class CouponConstraints implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time' ]; @@ -104,6 +106,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate' ]; @@ -116,6 +119,7 @@ public static function openAPIFormats() protected static $setters = [ 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate' ]; @@ -128,6 +132,7 @@ public static function openAPIFormats() protected static $getters = [ 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate' ]; @@ -194,6 +199,7 @@ 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['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; } @@ -223,6 +229,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + return $invalidProperties; } @@ -283,7 +297,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -302,6 +316,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling CouponConstraints., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling CouponConstraints., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -339,7 +385,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/CouponCreatedEffectProps.php b/lib/Model/CouponCreatedEffectProps.php index 56fb058b..134ad113 100644 --- a/lib/Model/CouponCreatedEffectProps.php +++ b/lib/Model/CouponCreatedEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CouponCreationJob.php b/lib/Model/CouponCreationJob.php index 3deaf5a7..06eb1afd 100644 --- a/lib/Model/CouponCreationJob.php +++ b/lib/Model/CouponCreationJob.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -65,6 +65,7 @@ class CouponCreationJob implements ModelInterface, ArrayAccess 'accountId' => 'int', 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'numberOfCoupons' => 'int', @@ -94,6 +95,7 @@ class CouponCreationJob implements ModelInterface, ArrayAccess 'accountId' => null, 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'numberOfCoupons' => null, @@ -144,6 +146,7 @@ public static function openAPIFormats() 'accountId' => 'accountId', 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'numberOfCoupons' => 'numberOfCoupons', @@ -173,6 +176,7 @@ public static function openAPIFormats() 'accountId' => 'setAccountId', 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'numberOfCoupons' => 'setNumberOfCoupons', @@ -202,6 +206,7 @@ public static function openAPIFormats() 'accountId' => 'getAccountId', 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'numberOfCoupons' => 'getNumberOfCoupons', @@ -285,6 +290,7 @@ public function __construct(array $data = null) $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; $this->container['usageLimit'] = isset($data['usageLimit']) ? $data['usageLimit'] : null; $this->container['discountLimit'] = isset($data['discountLimit']) ? $data['discountLimit'] : null; + $this->container['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['numberOfCoupons'] = isset($data['numberOfCoupons']) ? $data['numberOfCoupons'] : null; @@ -344,6 +350,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if ($this->container['numberOfCoupons'] === null) { $invalidProperties[] = "'numberOfCoupons' can't be null"; } @@ -351,6 +365,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'numberOfCoupons', must be smaller than or equal to 5000000."; } + if (($this->container['numberOfCoupons'] < 1)) { + $invalidProperties[] = "invalid value for 'numberOfCoupons', must be bigger than or equal to 1."; + } + if ($this->container['attributes'] === null) { $invalidProperties[] = "'attributes' can't be null"; } @@ -406,7 +424,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -430,7 +448,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -558,7 +576,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -577,6 +595,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling CouponCreationJob., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling CouponCreationJob., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -614,7 +664,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ @@ -638,7 +688,7 @@ public function getNumberOfCoupons() /** * Sets numberOfCoupons * - * @param int $numberOfCoupons The number of new coupon codes to generate for the campaign. Must be between 20,001 and 5,000,000. + * @param int $numberOfCoupons The number of new coupon codes to generate for the campaign. * * @return $this */ @@ -648,6 +698,9 @@ public function setNumberOfCoupons($numberOfCoupons) if (($numberOfCoupons > 5000000)) { throw new \InvalidArgumentException('invalid value for $numberOfCoupons when calling CouponCreationJob., must be smaller than or equal to 5000000.'); } + if (($numberOfCoupons < 1)) { + throw new \InvalidArgumentException('invalid value for $numberOfCoupons when calling CouponCreationJob., must be bigger than or equal to 1.'); + } $this->container['numberOfCoupons'] = $numberOfCoupons; diff --git a/lib/Model/CouponLimitConfigs.php b/lib/Model/CouponLimitConfigs.php index b6a02d86..72cbdb1c 100644 --- a/lib/Model/CouponLimitConfigs.php +++ b/lib/Model/CouponLimitConfigs.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CouponRejectionReason.php b/lib/Model/CouponRejectionReason.php index 4b737c64..f2300fad 100644 --- a/lib/Model/CouponRejectionReason.php +++ b/lib/Model/CouponRejectionReason.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -171,7 +171,6 @@ public function getModelName() const REASON_COUPON_NOT_FOUND = 'CouponNotFound'; const REASON_COUPON_PART_OF_NOT_RUNNING_CAMPAIGN = 'CouponPartOfNotRunningCampaign'; - const REASON_COUPON_LIMIT_REACHED = 'CouponLimitReached'; const REASON_CAMPAIGN_LIMIT_REACHED = 'CampaignLimitReached'; const REASON_PROFILE_LIMIT_REACHED = 'ProfileLimitReached'; const REASON_COUPON_RECIPIENT_DOES_NOT_MATCH = 'CouponRecipientDoesNotMatch'; @@ -179,6 +178,9 @@ public function getModelName() const REASON_COUPON_START_DATE_IN_FUTURE = 'CouponStartDateInFuture'; const REASON_COUPON_REJECTED_BY_CONDITION = 'CouponRejectedByCondition'; const REASON_EFFECT_COULD_NOT_BE_APPLIED = 'EffectCouldNotBeApplied'; + const REASON_COUPON_PART_OF_NOT_TRIGGERED_CAMPAIGN = 'CouponPartOfNotTriggeredCampaign'; + const REASON_COUPON_RESERVATION_REQUIRED = 'CouponReservationRequired'; + const REASON_PROFILE_REQUIRED = 'ProfileRequired'; @@ -192,7 +194,6 @@ public function getReasonAllowableValues() return [ self::REASON_COUPON_NOT_FOUND, self::REASON_COUPON_PART_OF_NOT_RUNNING_CAMPAIGN, - self::REASON_COUPON_LIMIT_REACHED, self::REASON_CAMPAIGN_LIMIT_REACHED, self::REASON_PROFILE_LIMIT_REACHED, self::REASON_COUPON_RECIPIENT_DOES_NOT_MATCH, @@ -200,6 +201,9 @@ public function getReasonAllowableValues() self::REASON_COUPON_START_DATE_IN_FUTURE, self::REASON_COUPON_REJECTED_BY_CONDITION, self::REASON_EFFECT_COULD_NOT_BE_APPLIED, + self::REASON_COUPON_PART_OF_NOT_TRIGGERED_CAMPAIGN, + self::REASON_COUPON_RESERVATION_REQUIRED, + self::REASON_PROFILE_REQUIRED, ]; } diff --git a/lib/Model/CouponReservations.php b/lib/Model/CouponReservations.php index 1371e6e2..678cd1ba 100644 --- a/lib/Model/CouponReservations.php +++ b/lib/Model/CouponReservations.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CouponSearch.php b/lib/Model/CouponSearch.php index fed9bd03..432a6efe 100644 --- a/lib/Model/CouponSearch.php +++ b/lib/Model/CouponSearch.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CouponValue.php b/lib/Model/CouponValue.php index 46d834ea..ecef849e 100644 --- a/lib/Model/CouponValue.php +++ b/lib/Model/CouponValue.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CouponsNotificationPolicy.php b/lib/Model/CouponsNotificationPolicy.php new file mode 100644 index 00000000..112503d5 --- /dev/null +++ b/lib/Model/CouponsNotificationPolicy.php @@ -0,0 +1,380 @@ + 'string', + 'scopes' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'scopes' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'scopes' => 'scopes' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'scopes' => 'setScopes' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'scopes' => 'getScopes' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const SCOPES_ALL = 'all'; + const SCOPES_CAMPAIGN_MANAGER = 'campaign_manager'; + const SCOPES_MANAGEMENT_API = 'management_api'; + const SCOPES_RULE_ENGINE = 'rule_engine'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getScopesAllowableValues() + { + return [ + self::SCOPES_ALL, + self::SCOPES_CAMPAIGN_MANAGER, + self::SCOPES_MANAGEMENT_API, + self::SCOPES_RULE_ENGINE, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['scopes'] = isset($data['scopes']) ? $data['scopes'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['scopes'] === null) { + $invalidProperties[] = "'scopes' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling CouponsNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets scopes + * + * @return string[] + */ + public function getScopes() + { + return $this->container['scopes']; + } + + /** + * Sets scopes + * + * @param string[] $scopes scopes + * + * @return $this + */ + public function setScopes($scopes) + { + $allowedValues = $this->getScopesAllowableValues(); + if (array_diff($scopes, $allowedValues)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'scopes', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['scopes'] = $scopes; + + 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/CreateApplicationAPIKey.php b/lib/Model/CreateApplicationAPIKey.php index b01a073c..c3385091 100644 --- a/lib/Model/CreateApplicationAPIKey.php +++ b/lib/Model/CreateApplicationAPIKey.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CreateManagementKey.php b/lib/Model/CreateManagementKey.php index 1d32078a..d55ad367 100644 --- a/lib/Model/CreateManagementKey.php +++ b/lib/Model/CreateManagementKey.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,7 +59,8 @@ class CreateManagementKey implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'name' => 'string', 'expiryDate' => '\DateTime', - 'endpoints' => '\TalonOne\Client\Model\Endpoint[]' + 'endpoints' => '\TalonOne\Client\Model\Endpoint[]', + 'allowedApplicationIds' => 'int[]' ]; /** @@ -70,7 +71,8 @@ class CreateManagementKey implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'name' => null, 'expiryDate' => 'date-time', - 'endpoints' => null + 'endpoints' => null, + 'allowedApplicationIds' => null ]; /** @@ -102,7 +104,8 @@ public static function openAPIFormats() protected static $attributeMap = [ 'name' => 'name', 'expiryDate' => 'expiryDate', - 'endpoints' => 'endpoints' + 'endpoints' => 'endpoints', + 'allowedApplicationIds' => 'allowedApplicationIds' ]; /** @@ -113,7 +116,8 @@ public static function openAPIFormats() protected static $setters = [ 'name' => 'setName', 'expiryDate' => 'setExpiryDate', - 'endpoints' => 'setEndpoints' + 'endpoints' => 'setEndpoints', + 'allowedApplicationIds' => 'setAllowedApplicationIds' ]; /** @@ -124,7 +128,8 @@ public static function openAPIFormats() protected static $getters = [ 'name' => 'getName', 'expiryDate' => 'getExpiryDate', - 'endpoints' => 'getEndpoints' + 'endpoints' => 'getEndpoints', + 'allowedApplicationIds' => 'getAllowedApplicationIds' ]; /** @@ -190,6 +195,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['endpoints'] = isset($data['endpoints']) ? $data['endpoints'] : null; + $this->container['allowedApplicationIds'] = isset($data['allowedApplicationIds']) ? $data['allowedApplicationIds'] : null; } /** @@ -296,6 +302,30 @@ public function setEndpoints($endpoints) return $this; } + + /** + * Gets allowedApplicationIds + * + * @return int[]|null + */ + public function getAllowedApplicationIds() + { + return $this->container['allowedApplicationIds']; + } + + /** + * Sets allowedApplicationIds + * + * @param int[]|null $allowedApplicationIds A list of Application IDs that you can access with the management key. An empty or missing list means the management key can be used for all Applications in the account. + * + * @return $this + */ + public function setAllowedApplicationIds($allowedApplicationIds) + { + $this->container['allowedApplicationIds'] = $allowedApplicationIds; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CreateTemplateCampaign.php b/lib/Model/CreateTemplateCampaign.php index 903abe5e..1747b7cd 100644 --- a/lib/Model/CreateTemplateCampaign.php +++ b/lib/Model/CreateTemplateCampaign.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -418,7 +418,7 @@ public function getCampaignGroups() /** * Sets campaignGroups * - * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this campaign belongs to. + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. * * @return $this */ diff --git a/lib/Model/CreateTemplateCampaignResponse.php b/lib/Model/CreateTemplateCampaignResponse.php index 9f7b585b..1fae27c6 100644 --- a/lib/Model/CreateTemplateCampaignResponse.php +++ b/lib/Model/CreateTemplateCampaignResponse.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CustomEffect.php b/lib/Model/CustomEffect.php index 220a5956..1e2a4d70 100644 --- a/lib/Model/CustomEffect.php +++ b/lib/Model/CustomEffect.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -63,6 +63,7 @@ class CustomEffect implements ModelInterface, ArrayAccess 'accountId' => 'int', 'modified' => '\DateTime', 'applicationIds' => 'int[]', + 'isPerItem' => 'bool', 'name' => 'string', 'title' => 'string', 'payload' => 'string', @@ -84,6 +85,7 @@ class CustomEffect implements ModelInterface, ArrayAccess 'accountId' => null, 'modified' => 'date-time', 'applicationIds' => null, + 'isPerItem' => null, 'name' => null, 'title' => null, 'payload' => null, @@ -126,6 +128,7 @@ public static function openAPIFormats() 'accountId' => 'accountId', 'modified' => 'modified', 'applicationIds' => 'applicationIds', + 'isPerItem' => 'isPerItem', 'name' => 'name', 'title' => 'title', 'payload' => 'payload', @@ -147,6 +150,7 @@ public static function openAPIFormats() 'accountId' => 'setAccountId', 'modified' => 'setModified', 'applicationIds' => 'setApplicationIds', + 'isPerItem' => 'setIsPerItem', 'name' => 'setName', 'title' => 'setTitle', 'payload' => 'setPayload', @@ -168,6 +172,7 @@ public static function openAPIFormats() 'accountId' => 'getAccountId', 'modified' => 'getModified', 'applicationIds' => 'getApplicationIds', + 'isPerItem' => 'getIsPerItem', 'name' => 'getName', 'title' => 'getTitle', 'payload' => 'getPayload', @@ -243,6 +248,7 @@ public function __construct(array $data = null) $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; $this->container['applicationIds'] = isset($data['applicationIds']) ? $data['applicationIds'] : null; + $this->container['isPerItem'] = isset($data['isPerItem']) ? $data['isPerItem'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['title'] = isset($data['title']) ? $data['title'] : null; $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; @@ -328,7 +334,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -352,7 +358,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -400,7 +406,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ @@ -424,7 +430,7 @@ public function getApplicationIds() /** * Sets applicationIds * - * @param int[] $applicationIds The IDs of the applications that are related to this entity. + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. * * @return $this */ @@ -435,6 +441,30 @@ public function setApplicationIds($applicationIds) return $this; } + /** + * Gets isPerItem + * + * @return bool|null + */ + public function getIsPerItem() + { + return $this->container['isPerItem']; + } + + /** + * Sets isPerItem + * + * @param bool|null $isPerItem Indicates if this effect is per item or not. + * + * @return $this + */ + public function setIsPerItem($isPerItem) + { + $this->container['isPerItem'] = $isPerItem; + + return $this; + } + /** * Gets name * diff --git a/lib/Model/CustomEffectProps.php b/lib/Model/CustomEffectProps.php index fc3e3aae..180ee43e 100644 --- a/lib/Model/CustomEffectProps.php +++ b/lib/Model/CustomEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,6 +60,10 @@ class CustomEffectProps implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'effectId' => 'int', 'name' => 'string', + 'cartItemPosition' => 'float', + 'cartItemSubPosition' => 'float', + 'bundleIndex' => 'int', + 'bundleName' => 'string', 'payload' => 'object' ]; @@ -71,6 +75,10 @@ class CustomEffectProps implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'effectId' => null, 'name' => null, + 'cartItemPosition' => null, + 'cartItemSubPosition' => null, + 'bundleIndex' => null, + 'bundleName' => null, 'payload' => null ]; @@ -103,6 +111,10 @@ public static function openAPIFormats() protected static $attributeMap = [ 'effectId' => 'effectId', 'name' => 'name', + 'cartItemPosition' => 'cartItemPosition', + 'cartItemSubPosition' => 'cartItemSubPosition', + 'bundleIndex' => 'bundleIndex', + 'bundleName' => 'bundleName', 'payload' => 'payload' ]; @@ -114,6 +126,10 @@ public static function openAPIFormats() protected static $setters = [ 'effectId' => 'setEffectId', 'name' => 'setName', + 'cartItemPosition' => 'setCartItemPosition', + 'cartItemSubPosition' => 'setCartItemSubPosition', + 'bundleIndex' => 'setBundleIndex', + 'bundleName' => 'setBundleName', 'payload' => 'setPayload' ]; @@ -125,6 +141,10 @@ public static function openAPIFormats() protected static $getters = [ 'effectId' => 'getEffectId', 'name' => 'getName', + 'cartItemPosition' => 'getCartItemPosition', + 'cartItemSubPosition' => 'getCartItemSubPosition', + 'bundleIndex' => 'getBundleIndex', + 'bundleName' => 'getBundleName', 'payload' => 'getPayload' ]; @@ -190,6 +210,10 @@ public function __construct(array $data = null) { $this->container['effectId'] = isset($data['effectId']) ? $data['effectId'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['cartItemPosition'] = isset($data['cartItemPosition']) ? $data['cartItemPosition'] : null; + $this->container['cartItemSubPosition'] = isset($data['cartItemSubPosition']) ? $data['cartItemSubPosition'] : null; + $this->container['bundleIndex'] = isset($data['bundleIndex']) ? $data['bundleIndex'] : null; + $this->container['bundleName'] = isset($data['bundleName']) ? $data['bundleName'] : null; $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; } @@ -274,6 +298,102 @@ public function setName($name) return $this; } + /** + * Gets cartItemPosition + * + * @return float|null + */ + public function getCartItemPosition() + { + return $this->container['cartItemPosition']; + } + + /** + * Sets cartItemPosition + * + * @param float|null $cartItemPosition The index of the item in the cart item list to which the custom effect is applied. + * + * @return $this + */ + public function setCartItemPosition($cartItemPosition) + { + $this->container['cartItemPosition'] = $cartItemPosition; + + return $this; + } + + /** + * Gets cartItemSubPosition + * + * @return float|null + */ + public function getCartItemSubPosition() + { + return $this->container['cartItemSubPosition']; + } + + /** + * Sets cartItemSubPosition + * + * @param float|null $cartItemSubPosition When cart item flattening is enabled, the sub position indicates to which item unit the custom effect is applied, for cart items with quantity > 1. + * + * @return $this + */ + public function setCartItemSubPosition($cartItemSubPosition) + { + $this->container['cartItemSubPosition'] = $cartItemSubPosition; + + return $this; + } + + /** + * Gets bundleIndex + * + * @return int|null + */ + public function getBundleIndex() + { + return $this->container['bundleIndex']; + } + + /** + * Sets bundleIndex + * + * @param int|null $bundleIndex The position of the bundle in a list of item bundles created from the same bundle definition. + * + * @return $this + */ + public function setBundleIndex($bundleIndex) + { + $this->container['bundleIndex'] = $bundleIndex; + + return $this; + } + + /** + * Gets bundleName + * + * @return string|null + */ + public function getBundleName() + { + return $this->container['bundleName']; + } + + /** + * Sets bundleName + * + * @param string|null $bundleName The name of the bundle definition. + * + * @return $this + */ + public function setBundleName($bundleName) + { + $this->container['bundleName'] = $bundleName; + + return $this; + } + /** * Gets payload * diff --git a/lib/Model/CustomerActivityReport.php b/lib/Model/CustomerActivityReport.php index 4f2c4feb..38c67e6a 100644 --- a/lib/Model/CustomerActivityReport.php +++ b/lib/Model/CustomerActivityReport.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -358,7 +358,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/CustomerAnalytics.php b/lib/Model/CustomerAnalytics.php index 5f846fe8..06ddd4ff 100644 --- a/lib/Model/CustomerAnalytics.php +++ b/lib/Model/CustomerAnalytics.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CustomerInventory.php b/lib/Model/CustomerInventory.php index f09fb59e..01dad3d0 100644 --- a/lib/Model/CustomerInventory.php +++ b/lib/Model/CustomerInventory.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CustomerProfile.php b/lib/Model/CustomerProfile.php index 0f917e77..a6540963 100644 --- a/lib/Model/CustomerProfile.php +++ b/lib/Model/CustomerProfile.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -67,7 +67,8 @@ class CustomerProfile implements ModelInterface, ArrayAccess 'totalSales' => 'float', 'loyaltyMemberships' => '\TalonOne\Client\Model\LoyaltyMembership[]', 'audienceMemberships' => '\TalonOne\Client\Model\AudienceMembership[]', - 'lastActivity' => '\DateTime' + 'lastActivity' => '\DateTime', + 'sandbox' => 'bool' ]; /** @@ -85,7 +86,8 @@ class CustomerProfile implements ModelInterface, ArrayAccess 'totalSales' => null, 'loyaltyMemberships' => null, 'audienceMemberships' => null, - 'lastActivity' => 'date-time' + 'lastActivity' => 'date-time', + 'sandbox' => null ]; /** @@ -124,7 +126,8 @@ public static function openAPIFormats() 'totalSales' => 'totalSales', 'loyaltyMemberships' => 'loyaltyMemberships', 'audienceMemberships' => 'audienceMemberships', - 'lastActivity' => 'lastActivity' + 'lastActivity' => 'lastActivity', + 'sandbox' => 'sandbox' ]; /** @@ -142,7 +145,8 @@ public static function openAPIFormats() 'totalSales' => 'setTotalSales', 'loyaltyMemberships' => 'setLoyaltyMemberships', 'audienceMemberships' => 'setAudienceMemberships', - 'lastActivity' => 'setLastActivity' + 'lastActivity' => 'setLastActivity', + 'sandbox' => 'setSandbox' ]; /** @@ -160,7 +164,8 @@ public static function openAPIFormats() 'totalSales' => 'getTotalSales', 'loyaltyMemberships' => 'getLoyaltyMemberships', 'audienceMemberships' => 'getAudienceMemberships', - 'lastActivity' => 'getLastActivity' + 'lastActivity' => 'getLastActivity', + 'sandbox' => 'getSandbox' ]; /** @@ -233,6 +238,7 @@ public function __construct(array $data = null) $this->container['loyaltyMemberships'] = isset($data['loyaltyMemberships']) ? $data['loyaltyMemberships'] : null; $this->container['audienceMemberships'] = isset($data['audienceMemberships']) ? $data['audienceMemberships'] : null; $this->container['lastActivity'] = isset($data['lastActivity']) ? $data['lastActivity'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; } /** @@ -300,7 +306,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -324,7 +330,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. The time this entity was created. * * @return $this */ @@ -448,7 +454,7 @@ public function getTotalSales() /** * Sets totalSales * - * @param float $totalSales Sum of all purchases made by this customer. + * @param float $totalSales The total amount of money spent by the customer **before** discounts are applied. The total sales amount excludes the following: - Cancelled or reopened sessions. - Returned items. * * @return $this */ @@ -496,7 +502,7 @@ public function getAudienceMemberships() /** * Sets audienceMemberships * - * @param \TalonOne\Client\Model\AudienceMembership[]|null $audienceMemberships A list of audiences the customer belongs to. + * @param \TalonOne\Client\Model\AudienceMembership[]|null $audienceMemberships The audiences the customer belongs to. * * @return $this */ @@ -520,7 +526,7 @@ public function getLastActivity() /** * Sets lastActivity * - * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api/#operation/createCouponReservation) for a customer doesn't impact this field. + * @param \DateTime $lastActivity Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the rule-engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. * * @return $this */ @@ -530,6 +536,30 @@ public function setLastActivity($lastActivity) return $this; } + + /** + * Gets sandbox + * + * @return bool|null + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool|null $sandbox Shows whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/CustomerProfileAudienceRequest.php b/lib/Model/CustomerProfileAudienceRequest.php index 042f0992..523c3be1 100644 --- a/lib/Model/CustomerProfileAudienceRequest.php +++ b/lib/Model/CustomerProfileAudienceRequest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CustomerProfileAudienceRequestItem.php b/lib/Model/CustomerProfileAudienceRequestItem.php index f2a4032c..93951394 100644 --- a/lib/Model/CustomerProfileAudienceRequestItem.php +++ b/lib/Model/CustomerProfileAudienceRequestItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CustomerProfileIntegrationRequestV2.php b/lib/Model/CustomerProfileIntegrationRequestV2.php index 438b19dd..c31fffd1 100644 --- a/lib/Model/CustomerProfileIntegrationRequestV2.php +++ b/lib/Model/CustomerProfileIntegrationRequestV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,6 +59,7 @@ class CustomerProfileIntegrationRequestV2 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'attributes' => 'object', + 'evaluableCampaignIds' => 'int[]', 'audiencesChanges' => '\TalonOne\Client\Model\ProfileAudiencesChanges', 'responseContent' => 'string[]' ]; @@ -70,6 +71,7 @@ class CustomerProfileIntegrationRequestV2 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'attributes' => null, + 'evaluableCampaignIds' => null, 'audiencesChanges' => null, 'responseContent' => null ]; @@ -102,6 +104,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'attributes' => 'attributes', + 'evaluableCampaignIds' => 'evaluableCampaignIds', 'audiencesChanges' => 'audiencesChanges', 'responseContent' => 'responseContent' ]; @@ -113,6 +116,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'attributes' => 'setAttributes', + 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'audiencesChanges' => 'setAudiencesChanges', 'responseContent' => 'setResponseContent' ]; @@ -124,6 +128,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'attributes' => 'getAttributes', + 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'audiencesChanges' => 'getAudiencesChanges', 'responseContent' => 'getResponseContent' ]; @@ -212,6 +217,7 @@ public function getResponseContentAllowableValues() public function __construct(array $data = null) { $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['audiencesChanges'] = isset($data['audiencesChanges']) ? $data['audiencesChanges'] : null; $this->container['responseContent'] = isset($data['responseContent']) ? $data['responseContent'] : null; } @@ -264,6 +270,30 @@ public function setAttributes($attributes) return $this; } + /** + * Gets evaluableCampaignIds + * + * @return int[]|null + */ + public function getEvaluableCampaignIds() + { + return $this->container['evaluableCampaignIds']; + } + + /** + * Sets evaluableCampaignIds + * + * @param int[]|null $evaluableCampaignIds When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. + * + * @return $this + */ + public function setEvaluableCampaignIds($evaluableCampaignIds) + { + $this->container['evaluableCampaignIds'] = $evaluableCampaignIds; + + return $this; + } + /** * Gets audiencesChanges * @@ -301,7 +331,7 @@ public function getResponseContent() /** * Sets responseContent * - * @param string[]|null $responseContent Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. **Note:** `ruleFailureReasons` is always part of the response when the [Application type](https://docs.talon.one/docs/product/applications/overview#application-types) is `sandbox`. + * @param string[]|null $responseContent Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer profile_ request instead of sending extra requests to other endpoints. * * @return $this */ diff --git a/lib/Model/CustomerProfileSearchQuery.php b/lib/Model/CustomerProfileSearchQuery.php index e268d517..7b8d9337 100644 --- a/lib/Model/CustomerProfileSearchQuery.php +++ b/lib/Model/CustomerProfileSearchQuery.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/CustomerProfileUpdateV2Response.php b/lib/Model/CustomerProfileUpdateV2Response.php new file mode 100644 index 00000000..a520986f --- /dev/null +++ b/lib/Model/CustomerProfileUpdateV2Response.php @@ -0,0 +1,311 @@ + '\TalonOne\Client\Model\CustomerProfile' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'customerProfile' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'customerProfile' => 'customerProfile' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'customerProfile' => 'setCustomerProfile' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'customerProfile' => 'getCustomerProfile' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['customerProfile'] = isset($data['customerProfile']) ? $data['customerProfile'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['customerProfile'] === null) { + $invalidProperties[] = "'customerProfile' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets customerProfile + * + * @return \TalonOne\Client\Model\CustomerProfile + */ + public function getCustomerProfile() + { + return $this->container['customerProfile']; + } + + /** + * Sets customerProfile + * + * @param \TalonOne\Client\Model\CustomerProfile $customerProfile customerProfile + * + * @return $this + */ + public function setCustomerProfile($customerProfile) + { + $this->container['customerProfile'] = $customerProfile; + + 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/CustomerSession.php b/lib/Model/CustomerSession.php index 71ab55f5..fe65cb01 100644 --- a/lib/Model/CustomerSession.php +++ b/lib/Model/CustomerSession.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -402,7 +402,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -530,7 +530,7 @@ public function getState() /** * Sets state * - * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). + * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). * * @return $this */ @@ -587,7 +587,7 @@ public function getIdentifiers() /** * Sets identifiers * - * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). + * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). * * @return $this */ diff --git a/lib/Model/CustomerSessionV2.php b/lib/Model/CustomerSessionV2.php index ed99c76f..2fbc78aa 100644 --- a/lib/Model/CustomerSessionV2.php +++ b/lib/Model/CustomerSessionV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -63,6 +63,7 @@ class CustomerSessionV2 implements ModelInterface, ArrayAccess 'integrationId' => 'string', 'applicationId' => 'int', 'profileId' => 'string', + 'evaluableCampaignIds' => 'int[]', 'couponCodes' => 'string[]', 'referralCode' => 'string', 'loyaltyCards' => 'string[]', @@ -89,6 +90,7 @@ class CustomerSessionV2 implements ModelInterface, ArrayAccess 'integrationId' => 'string', 'applicationId' => null, 'profileId' => null, + 'evaluableCampaignIds' => null, 'couponCodes' => null, 'referralCode' => null, 'loyaltyCards' => null, @@ -136,6 +138,7 @@ public static function openAPIFormats() 'integrationId' => 'integrationId', 'applicationId' => 'applicationId', 'profileId' => 'profileId', + 'evaluableCampaignIds' => 'evaluableCampaignIds', 'couponCodes' => 'couponCodes', 'referralCode' => 'referralCode', 'loyaltyCards' => 'loyaltyCards', @@ -162,6 +165,7 @@ public static function openAPIFormats() 'integrationId' => 'setIntegrationId', 'applicationId' => 'setApplicationId', 'profileId' => 'setProfileId', + 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'couponCodes' => 'setCouponCodes', 'referralCode' => 'setReferralCode', 'loyaltyCards' => 'setLoyaltyCards', @@ -188,6 +192,7 @@ public static function openAPIFormats() 'integrationId' => 'getIntegrationId', 'applicationId' => 'getApplicationId', 'profileId' => 'getProfileId', + 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'couponCodes' => 'getCouponCodes', 'referralCode' => 'getReferralCode', 'loyaltyCards' => 'getLoyaltyCards', @@ -287,6 +292,7 @@ public function __construct(array $data = null) $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['couponCodes'] = isset($data['couponCodes']) ? $data['couponCodes'] : null; $this->container['referralCode'] = isset($data['referralCode']) ? $data['referralCode'] : null; $this->container['loyaltyCards'] = isset($data['loyaltyCards']) ? $data['loyaltyCards'] : null; @@ -394,7 +400,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -418,7 +424,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. The time this entity was created. * * @return $this */ @@ -505,6 +511,30 @@ public function setProfileId($profileId) return $this; } + /** + * Gets evaluableCampaignIds + * + * @return int[]|null + */ + public function getEvaluableCampaignIds() + { + return $this->container['evaluableCampaignIds']; + } + + /** + * Sets evaluableCampaignIds + * + * @param int[]|null $evaluableCampaignIds When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. + * + * @return $this + */ + public function setEvaluableCampaignIds($evaluableCampaignIds) + { + $this->container['evaluableCampaignIds'] = $evaluableCampaignIds; + + return $this; + } + /** * Gets couponCodes * @@ -594,7 +624,7 @@ public function getState() /** * Sets state * - * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). + * @param string $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). * * @return $this */ @@ -651,7 +681,7 @@ public function getAdditionalCosts() /** * Sets additionalCosts * - * @param map[string,\TalonOne\Client\Model\AdditionalCost]|null $additionalCosts Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs/). + * @param map[string,\TalonOne\Client\Model\AdditionalCost]|null $additionalCosts Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). * * @return $this */ @@ -675,7 +705,7 @@ public function getIdentifiers() /** * Sets identifiers * - * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). **Important**: If you [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains an identifier by the time you close it. + * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). * * @return $this */ diff --git a/lib/Model/LoyaltyPoints.php b/lib/Model/DeductLoyaltyPoints.php similarity index 70% rename from lib/Model/LoyaltyPoints.php rename to lib/Model/DeductLoyaltyPoints.php index 64ab879d..31119836 100644 --- a/lib/Model/LoyaltyPoints.php +++ b/lib/Model/DeductLoyaltyPoints.php @@ -1,6 +1,6 @@ 'float', 'name' => 'string', - 'validityDuration' => 'string', - 'pendingDuration' => 'string', - 'subLedgerID' => 'string' + 'subledgerId' => 'string', + 'applicationId' => 'int' ]; /** @@ -73,9 +72,8 @@ class LoyaltyPoints implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'points' => null, 'name' => null, - 'validityDuration' => null, - 'pendingDuration' => null, - 'subLedgerID' => null + 'subledgerId' => null, + 'applicationId' => null ]; /** @@ -107,9 +105,8 @@ public static function openAPIFormats() protected static $attributeMap = [ 'points' => 'points', 'name' => 'name', - 'validityDuration' => 'validityDuration', - 'pendingDuration' => 'pendingDuration', - 'subLedgerID' => 'subLedgerID' + 'subledgerId' => 'subledgerId', + 'applicationId' => 'applicationId' ]; /** @@ -120,9 +117,8 @@ public static function openAPIFormats() protected static $setters = [ 'points' => 'setPoints', 'name' => 'setName', - 'validityDuration' => 'setValidityDuration', - 'pendingDuration' => 'setPendingDuration', - 'subLedgerID' => 'setSubLedgerID' + 'subledgerId' => 'setSubledgerId', + 'applicationId' => 'setApplicationId' ]; /** @@ -133,9 +129,8 @@ public static function openAPIFormats() protected static $getters = [ 'points' => 'getPoints', 'name' => 'getName', - 'validityDuration' => 'getValidityDuration', - 'pendingDuration' => 'getPendingDuration', - 'subLedgerID' => 'getSubLedgerID' + 'subledgerId' => 'getSubledgerId', + 'applicationId' => 'getApplicationId' ]; /** @@ -200,9 +195,8 @@ public function __construct(array $data = null) { $this->container['points'] = isset($data['points']) ? $data['points'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; - $this->container['validityDuration'] = isset($data['validityDuration']) ? $data['validityDuration'] : null; - $this->container['pendingDuration'] = isset($data['pendingDuration']) ? $data['pendingDuration'] : null; - $this->container['subLedgerID'] = isset($data['subLedgerID']) ? $data['subLedgerID'] : null; + $this->container['subledgerId'] = isset($data['subledgerId']) ? $data['subledgerId'] : null; + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; } /** @@ -261,10 +255,10 @@ public function setPoints($points) { if (($points > 999999999999.99)) { - throw new \InvalidArgumentException('invalid value for $points when calling LoyaltyPoints., must be smaller than or equal to 999999999999.99.'); + throw new \InvalidArgumentException('invalid value for $points when calling DeductLoyaltyPoints., must be smaller than or equal to 999999999999.99.'); } if (($points <= 0)) { - throw new \InvalidArgumentException('invalid value for $points when calling LoyaltyPoints., must be bigger than 0.'); + throw new \InvalidArgumentException('invalid value for $points when calling DeductLoyaltyPoints., must be bigger than 0.'); } $this->container['points'] = $points; @@ -285,7 +279,7 @@ public function getName() /** * Sets name * - * @param string|null $name Allows to specify a name/reason for the point addition or deduction. + * @param string|null $name Name / reason for the point deduction. * * @return $this */ @@ -297,73 +291,49 @@ public function setName($name) } /** - * Gets validityDuration + * Gets subledgerId * * @return string|null */ - public function getValidityDuration() + public function getSubledgerId() { - return $this->container['validityDuration']; + return $this->container['subledgerId']; } /** - * Sets validityDuration + * Sets subledgerId * - * @param string|null $validityDuration Indicates the duration after which the added loyalty points should expire. The format is a number followed by one letter indicating the time unit, like '1h' or '40m' (defined by Go time package). + * @param string|null $subledgerId ID of the subledger the points are deducted from. * * @return $this */ - public function setValidityDuration($validityDuration) + public function setSubledgerId($subledgerId) { - $this->container['validityDuration'] = $validityDuration; + $this->container['subledgerId'] = $subledgerId; return $this; } /** - * Gets pendingDuration + * Gets applicationId * - * @return string|null - */ - public function getPendingDuration() - { - return $this->container['pendingDuration']; - } - - /** - * Sets pendingDuration - * - * @param string|null $pendingDuration Indicates the amount of time before the points are considered valid. The format is a number followed by one letter indicating the time unit, like '1h' or '40m' (defined by Go time package). - * - * @return $this - */ - public function setPendingDuration($pendingDuration) - { - $this->container['pendingDuration'] = $pendingDuration; - - return $this; - } - - /** - * Gets subLedgerID - * - * @return string|null + * @return int|null */ - public function getSubLedgerID() + public function getApplicationId() { - return $this->container['subLedgerID']; + return $this->container['applicationId']; } /** - * Sets subLedgerID + * Sets applicationId * - * @param string|null $subLedgerID This specifies if we are adding loyalty points to the main ledger or a subledger. + * @param int|null $applicationId ID of the Application that is connected to the loyalty program. * * @return $this */ - public function setSubLedgerID($subLedgerID) + public function setApplicationId($applicationId) { - $this->container['subLedgerID'] = $subLedgerID; + $this->container['applicationId'] = $applicationId; return $this; } diff --git a/lib/Model/DeductLoyaltyPointsEffectProps.php b/lib/Model/DeductLoyaltyPointsEffectProps.php index 019f674c..9e901b7c 100644 --- a/lib/Model/DeductLoyaltyPointsEffectProps.php +++ b/lib/Model/DeductLoyaltyPointsEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -244,6 +244,10 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if (!is_null($this->container['cardIdentifier']) && (mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; + } + return $invalidProperties; } @@ -416,12 +420,16 @@ public function getCardIdentifier() /** * Sets cardIdentifier * - * @param string|null $cardIdentifier The card on which these points were added. + * @param string|null $cardIdentifier The alphanumeric identifier of the loyalty card. * * @return $this */ public function setCardIdentifier($cardIdentifier) { + if (!is_null($cardIdentifier) && (mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling DeductLoyaltyPointsEffectProps., must be smaller than or equal to 108.'); + } + $this->container['cardIdentifier'] = $cardIdentifier; return $this; diff --git a/lib/Model/Effect.php b/lib/Model/Effect.php index 8cfaa005..15f78b8f 100644 --- a/lib/Model/Effect.php +++ b/lib/Model/Effect.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -374,7 +374,7 @@ public function getEffectType() /** * Sets effectType * - * @param string $effectType The type of effect that was triggered. + * @param string $effectType The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). * * @return $this */ @@ -446,7 +446,7 @@ public function getProps() /** * Sets props * - * @param object $props props + * @param object $props The properties of the effect. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). * * @return $this */ diff --git a/lib/Model/EffectEntity.php b/lib/Model/EffectEntity.php index 368fe0ec..54b16b79 100644 --- a/lib/Model/EffectEntity.php +++ b/lib/Model/EffectEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -365,7 +365,7 @@ public function getEffectType() /** * Sets effectType * - * @param string $effectType The type of effect that was triggered. + * @param string $effectType The type of effect that was triggered. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). * * @return $this */ diff --git a/lib/Model/EmailEntity.php b/lib/Model/EmailEntity.php index 4c80285a..37cfaf20 100644 --- a/lib/Model/EmailEntity.php +++ b/lib/Model/EmailEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Endpoint.php b/lib/Model/Endpoint.php index e50f0635..02e7b9d9 100644 --- a/lib/Model/Endpoint.php +++ b/lib/Model/Endpoint.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Entity.php b/lib/Model/Entity.php index 3c095491..149a1037 100644 --- a/lib/Model/Entity.php +++ b/lib/Model/Entity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -229,7 +229,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -253,7 +253,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/EntityWithTalangVisibleID.php b/lib/Model/EntityWithTalangVisibleID.php index a8fab4ca..86c9e8ce 100644 --- a/lib/Model/EntityWithTalangVisibleID.php +++ b/lib/Model/EntityWithTalangVisibleID.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Environment.php b/lib/Model/Environment.php index 4211e5ec..f88b2e4a 100644 --- a/lib/Model/Environment.php +++ b/lib/Model/Environment.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -311,7 +311,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -335,7 +335,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/ErrorEffectProps.php b/lib/Model/ErrorEffectProps.php index 9c8945eb..0640deb6 100644 --- a/lib/Model/ErrorEffectProps.php +++ b/lib/Model/ErrorEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ErrorResponse.php b/lib/Model/ErrorResponse.php index a8ebe38e..dc312d0f 100644 --- a/lib/Model/ErrorResponse.php +++ b/lib/Model/ErrorResponse.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ErrorResponseWithStatus.php b/lib/Model/ErrorResponseWithStatus.php index b82f6924..06a07cb9 100644 --- a/lib/Model/ErrorResponseWithStatus.php +++ b/lib/Model/ErrorResponseWithStatus.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ErrorSource.php b/lib/Model/ErrorSource.php index 2b3e323c..04cfcd20 100644 --- a/lib/Model/ErrorSource.php +++ b/lib/Model/ErrorSource.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/EvaluableCampaignIds.php b/lib/Model/EvaluableCampaignIds.php new file mode 100644 index 00000000..1eeae6d9 --- /dev/null +++ b/lib/Model/EvaluableCampaignIds.php @@ -0,0 +1,307 @@ + 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'evaluableCampaignIds' => 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 = [ + 'evaluableCampaignIds' => 'evaluableCampaignIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'evaluableCampaignIds' => 'setEvaluableCampaignIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'evaluableCampaignIds' => 'getEvaluableCampaignIds' + ]; + + /** + * 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['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets evaluableCampaignIds + * + * @return int[]|null + */ + public function getEvaluableCampaignIds() + { + return $this->container['evaluableCampaignIds']; + } + + /** + * Sets evaluableCampaignIds + * + * @param int[]|null $evaluableCampaignIds When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. + * + * @return $this + */ + public function setEvaluableCampaignIds($evaluableCampaignIds) + { + $this->container['evaluableCampaignIds'] = $evaluableCampaignIds; + + 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/Event.php b/lib/Model/Event.php index 8541f947..0f8603be 100644 --- a/lib/Model/Event.php +++ b/lib/Model/Event.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -297,7 +297,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -321,7 +321,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -470,7 +470,7 @@ public function getEffects() /** * Sets effects * - * @param object[] $effects An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](/docs/dev/integration-api/api-effects). + * @param object[] $effects An array of effects generated by the rules of the enabled campaigns of the Application. You decide how to apply them in your system. See the list of [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). * * @return $this */ diff --git a/lib/Model/EventType.php b/lib/Model/EventType.php index 2902fcc9..95651560 100644 --- a/lib/Model/EventType.php +++ b/lib/Model/EventType.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -262,7 +262,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -286,7 +286,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -310,7 +310,7 @@ public function getTitle() /** * Sets title * - * @param string $title The human-friendly display name for this event type. Use a short, past-tense, description of the event. + * @param string $title The human-friendly name for this event type. * * @return $this */ @@ -339,7 +339,7 @@ public function getName() /** * Sets name * - * @param string $name The machine-friendly canonical name for this event type. This will be used in URLs, and cannot be changed after an event type has been created. + * @param string $name The integration name for this event type. This will be used in URLs and cannot be changed after an event type has been created. * * @return $this */ @@ -368,7 +368,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description An explanation of when the event type is triggered. Write this with a campaign manager in mind. For example: > The \"Payment Accepted\" event is triggered after successful processing of a payment by our payment gateway. + * @param string|null $description A description of what the event represents. * * @return $this */ diff --git a/lib/Model/EventV2.php b/lib/Model/EventV2.php index da75f2c6..5da78398 100644 --- a/lib/Model/EventV2.php +++ b/lib/Model/EventV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,6 +59,7 @@ class EventV2 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'evaluableCampaignIds' => 'int[]', 'type' => 'string', 'attributes' => 'object' ]; @@ -70,6 +71,7 @@ class EventV2 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'evaluableCampaignIds' => null, 'type' => null, 'attributes' => null ]; @@ -102,6 +104,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'evaluableCampaignIds' => 'evaluableCampaignIds', 'type' => 'type', 'attributes' => 'attributes' ]; @@ -113,6 +116,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'type' => 'setType', 'attributes' => 'setAttributes' ]; @@ -124,6 +128,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'type' => 'getType', 'attributes' => 'getAttributes' ]; @@ -189,6 +194,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; } @@ -248,6 +254,30 @@ public function setProfileId($profileId) return $this; } + /** + * Gets evaluableCampaignIds + * + * @return int[]|null + */ + public function getEvaluableCampaignIds() + { + return $this->container['evaluableCampaignIds']; + } + + /** + * Sets evaluableCampaignIds + * + * @param int[]|null $evaluableCampaignIds When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. + * + * @return $this + */ + public function setEvaluableCampaignIds($evaluableCampaignIds) + { + $this->container['evaluableCampaignIds'] = $evaluableCampaignIds; + + return $this; + } + /** * Gets type * @@ -261,7 +291,7 @@ public function getType() /** * Sets type * - * @param string $type A string representing the event. Must not be a reserved event name. + * @param string $type A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. * * @return $this */ @@ -290,7 +320,7 @@ public function getAttributes() /** * Sets attributes * - * @param object|null $attributes Arbitrary additional JSON data associated with the event. + * @param object|null $attributes Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). * * @return $this */ diff --git a/lib/Model/ExpiringPointsNotificationPolicy.php b/lib/Model/ExpiringPointsNotificationPolicy.php new file mode 100644 index 00000000..60578197 --- /dev/null +++ b/lib/Model/ExpiringPointsNotificationPolicy.php @@ -0,0 +1,352 @@ + 'string', + 'triggers' => '\TalonOne\Client\Model\ExpiringPointsNotificationTrigger[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'triggers' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'triggers' => 'triggers' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'triggers' => 'setTriggers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'triggers' => 'getTriggers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['triggers'] = isset($data['triggers']) ? $data['triggers'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if ($this->container['triggers'] === null) { + $invalidProperties[] = "'triggers' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Notification name. + * + * @return $this + */ + public function setName($name) + { + + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling ExpiringPointsNotificationPolicy., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets triggers + * + * @return \TalonOne\Client\Model\ExpiringPointsNotificationTrigger[] + */ + public function getTriggers() + { + return $this->container['triggers']; + } + + /** + * Sets triggers + * + * @param \TalonOne\Client\Model\ExpiringPointsNotificationTrigger[] $triggers triggers + * + * @return $this + */ + public function setTriggers($triggers) + { + $this->container['triggers'] = $triggers; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/ExpiringPointsNotificationTrigger.php b/lib/Model/ExpiringPointsNotificationTrigger.php new file mode 100644 index 00000000..434d9177 --- /dev/null +++ b/lib/Model/ExpiringPointsNotificationTrigger.php @@ -0,0 +1,384 @@ + 'int', + 'period' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'amount' => null, + 'period' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'amount' => 'amount', + 'period' => 'period' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'amount' => 'setAmount', + 'period' => 'setPeriod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'amount' => 'getAmount', + 'period' => 'getPeriod' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const PERIOD_W = 'w'; + const PERIOD_D = 'd'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getPeriodAllowableValues() + { + return [ + self::PERIOD_W, + self::PERIOD_D, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; + $this->container['period'] = isset($data['period']) ? $data['period'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if (($this->container['amount'] < 1)) { + $invalidProperties[] = "invalid value for 'amount', must be bigger than or equal to 1."; + } + + if ($this->container['period'] === null) { + $invalidProperties[] = "'period' can't be null"; + } + $allowedValues = $this->getPeriodAllowableValues(); + if (!is_null($this->container['period']) && !in_array($this->container['period'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'period', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets amount + * + * @return int + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param int $amount The amount of period. + * + * @return $this + */ + public function setAmount($amount) + { + + if (($amount < 1)) { + throw new \InvalidArgumentException('invalid value for $amount when calling ExpiringPointsNotificationTrigger., must be bigger than or equal to 1.'); + } + + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets period + * + * @return string + */ + public function getPeriod() + { + return $this->container['period']; + } + + /** + * Sets period + * + * @param string $period Notification period indicated by a letter; \"w\" means week, \"d\" means day. + * + * @return $this + */ + public function setPeriod($period) + { + $allowedValues = $this->getPeriodAllowableValues(); + if (!in_array($period, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'period', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['period'] = $period; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/Export.php b/lib/Model/Export.php index 5eb49698..2dec49e1 100644 --- a/lib/Model/Export.php +++ b/lib/Model/Export.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -299,7 +299,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -323,7 +323,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -371,7 +371,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ diff --git a/lib/Model/FeatureFlag.php b/lib/Model/FeatureFlag.php index 54d9ef26..3091ca5c 100644 --- a/lib/Model/FeatureFlag.php +++ b/lib/Model/FeatureFlag.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -241,7 +241,7 @@ public function getName() /** * Sets name * - * @param string $name The name for the featureflag. + * @param string $name The name of the feature flag. * * @return $this */ @@ -265,7 +265,7 @@ public function getValue() /** * Sets value * - * @param string $value The value for the featureflag. + * @param string $value The value of the feature flag. * * @return $this */ @@ -289,7 +289,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime|null $created The exact moment this entity was last created. + * @param \DateTime|null $created The time this entity was last created. * * @return $this */ @@ -313,7 +313,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime|null $modified The exact moment this entity was last modified. + * @param \DateTime|null $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/FeaturesFeed.php b/lib/Model/FeaturesFeed.php index 8dfc06c2..59d0d49f 100644 --- a/lib/Model/FeaturesFeed.php +++ b/lib/Model/FeaturesFeed.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/FeedNotification.php b/lib/Model/FeedNotification.php index 090ab2f4..79f5dcfb 100644 --- a/lib/Model/FeedNotification.php +++ b/lib/Model/FeedNotification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/FrontendState.php b/lib/Model/FrontendState.php new file mode 100644 index 00000000..1e719419 --- /dev/null +++ b/lib/Model/FrontendState.php @@ -0,0 +1,69 @@ + '\DateTime', 'attributes' => 'object', 'used' => 'bool', - 'importId' => 'int' + 'importId' => 'int', + 'profileIntegrationId' => 'string', + 'profileId' => 'int' ]; /** @@ -83,7 +85,9 @@ class Giveaway implements ModelInterface, ArrayAccess 'endDate' => 'date-time', 'attributes' => null, 'used' => null, - 'importId' => null + 'importId' => null, + 'profileIntegrationId' => null, + 'profileId' => null ]; /** @@ -121,7 +125,9 @@ public static function openAPIFormats() 'endDate' => 'endDate', 'attributes' => 'attributes', 'used' => 'used', - 'importId' => 'importId' + 'importId' => 'importId', + 'profileIntegrationId' => 'profileIntegrationId', + 'profileId' => 'profileId' ]; /** @@ -138,7 +144,9 @@ public static function openAPIFormats() 'endDate' => 'setEndDate', 'attributes' => 'setAttributes', 'used' => 'setUsed', - 'importId' => 'setImportId' + 'importId' => 'setImportId', + 'profileIntegrationId' => 'setProfileIntegrationId', + 'profileId' => 'setProfileId' ]; /** @@ -155,7 +163,9 @@ public static function openAPIFormats() 'endDate' => 'getEndDate', 'attributes' => 'getAttributes', 'used' => 'getUsed', - 'importId' => 'getImportId' + 'importId' => 'getImportId', + 'profileIntegrationId' => 'getProfileIntegrationId', + 'profileId' => 'getProfileId' ]; /** @@ -227,6 +237,8 @@ public function __construct(array $data = null) $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['used'] = isset($data['used']) ? $data['used'] : null; $this->container['importId'] = isset($data['importId']) ? $data['importId'] : null; + $this->container['profileIntegrationId'] = isset($data['profileIntegrationId']) ? $data['profileIntegrationId'] : null; + $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; } /** @@ -278,7 +290,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -302,7 +314,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -480,6 +492,54 @@ public function setImportId($importId) return $this; } + + /** + * Gets profileIntegrationId + * + * @return string|null + */ + public function getProfileIntegrationId() + { + return $this->container['profileIntegrationId']; + } + + /** + * Sets profileIntegrationId + * + * @param string|null $profileIntegrationId The third-party integration ID of the customer profile that was awarded the giveaway, if the giveaway was awarded. + * + * @return $this + */ + public function setProfileIntegrationId($profileIntegrationId) + { + $this->container['profileIntegrationId'] = $profileIntegrationId; + + return $this; + } + + /** + * Gets profileId + * + * @return int|null + */ + public function getProfileId() + { + return $this->container['profileId']; + } + + /** + * Sets profileId + * + * @param int|null $profileId The internal ID of the customer profile that was awarded the giveaway, if the giveaway was awarded and an internal ID exists. + * + * @return $this + */ + public function setProfileId($profileId) + { + $this->container['profileId'] = $profileId; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/GiveawaysPool.php b/lib/Model/GiveawaysPool.php index 41909671..f6faf812 100644 --- a/lib/Model/GiveawaysPool.php +++ b/lib/Model/GiveawaysPool.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -64,6 +64,7 @@ class GiveawaysPool implements ModelInterface, ArrayAccess 'name' => 'string', 'description' => 'string', 'subscribedApplicationsIds' => 'int[]', + 'sandbox' => 'bool', 'modified' => '\DateTime', 'createdBy' => 'int', 'modifiedBy' => 'int' @@ -81,6 +82,7 @@ class GiveawaysPool implements ModelInterface, ArrayAccess 'name' => null, 'description' => null, 'subscribedApplicationsIds' => null, + 'sandbox' => null, 'modified' => 'date-time', 'createdBy' => null, 'modifiedBy' => null @@ -119,6 +121,7 @@ public static function openAPIFormats() 'name' => 'name', 'description' => 'description', 'subscribedApplicationsIds' => 'subscribedApplicationsIds', + 'sandbox' => 'sandbox', 'modified' => 'modified', 'createdBy' => 'createdBy', 'modifiedBy' => 'modifiedBy' @@ -136,6 +139,7 @@ public static function openAPIFormats() 'name' => 'setName', 'description' => 'setDescription', 'subscribedApplicationsIds' => 'setSubscribedApplicationsIds', + 'sandbox' => 'setSandbox', 'modified' => 'setModified', 'createdBy' => 'setCreatedBy', 'modifiedBy' => 'setModifiedBy' @@ -153,6 +157,7 @@ public static function openAPIFormats() 'name' => 'getName', 'description' => 'getDescription', 'subscribedApplicationsIds' => 'getSubscribedApplicationsIds', + 'sandbox' => 'getSandbox', 'modified' => 'getModified', 'createdBy' => 'getCreatedBy', 'modifiedBy' => 'getModifiedBy' @@ -224,6 +229,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['subscribedApplicationsIds'] = isset($data['subscribedApplicationsIds']) ? $data['subscribedApplicationsIds'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; $this->container['modifiedBy'] = isset($data['modifiedBy']) ? $data['modifiedBy'] : null; @@ -250,6 +256,9 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if ($this->container['sandbox'] === null) { + $invalidProperties[] = "'sandbox' can't be null"; + } if ($this->container['createdBy'] === null) { $invalidProperties[] = "'createdBy' can't be null"; } @@ -281,7 +290,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -305,7 +314,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -412,6 +421,30 @@ public function setSubscribedApplicationsIds($subscribedApplicationsIds) return $this; } + /** + * Gets sandbox + * + * @return bool + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool $sandbox Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } + /** * Gets modified * diff --git a/lib/Model/Import.php b/lib/Model/Import.php index 694f12e9..b119e850 100644 --- a/lib/Model/Import.php +++ b/lib/Model/Import.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -270,7 +270,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -294,7 +294,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -342,7 +342,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ diff --git a/lib/Model/ImportEntity.php b/lib/Model/ImportEntity.php index 085c37d5..6cb4e56c 100644 --- a/lib/Model/ImportEntity.php +++ b/lib/Model/ImportEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/InlineResponse200.php b/lib/Model/InlineResponse200.php index ca10014b..244fc359 100644 --- a/lib/Model/InlineResponse200.php +++ b/lib/Model/InlineResponse200.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/InlineResponse2001.php b/lib/Model/InlineResponse2001.php index 4c026ff8..fdcf87bb 100644 --- a/lib/Model/InlineResponse2001.php +++ b/lib/Model/InlineResponse2001.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse2001 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[]' + 'data' => '\TalonOne\Client\Model\CardLedgerTransactionLogEntryIntegrationAPI[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[] + * @return \TalonOne\Client\Model\CardLedgerTransactionLogEntryIntegrationAPI[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[] $data data + * @param \TalonOne\Client\Model\CardLedgerTransactionLogEntryIntegrationAPI[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20010.php b/lib/Model/InlineResponse20010.php index bfd2eae9..223ec963 100644 --- a/lib/Model/InlineResponse20010.php +++ b/lib/Model/InlineResponse20010.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,8 +58,7 @@ class InlineResponse20010 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\CollectionWithoutPayload[]' + 'data' => '\TalonOne\Client\Model\CampaignTemplate[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20010 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, - 'totalResultSize' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', - 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', - 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', - 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -222,7 +219,7 @@ public function valid() /** * Gets hasMore * - * @return bool|null + * @return bool */ public function getHasMore() { @@ -232,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool|null $hasMore hasMore + * @param bool $hasMore hasMore * * @return $this */ @@ -243,34 +240,10 @@ public function setHasMore($hasMore) return $this; } - /** - * Gets totalResultSize - * - * @return int|null - */ - public function getTotalResultSize() - { - return $this->container['totalResultSize']; - } - - /** - * Sets totalResultSize - * - * @param int|null $totalResultSize totalResultSize - * - * @return $this - */ - public function setTotalResultSize($totalResultSize) - { - $this->container['totalResultSize'] = $totalResultSize; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\CollectionWithoutPayload[] + * @return \TalonOne\Client\Model\CampaignTemplate[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CollectionWithoutPayload[] $data data + * @param \TalonOne\Client\Model\CampaignTemplate[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20011.php b/lib/Model/InlineResponse20011.php index e60e85d4..44a35528 100644 --- a/lib/Model/InlineResponse20011.php +++ b/lib/Model/InlineResponse20011.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20011 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CollectionItem[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\LoyaltyProgram[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20011 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool + * @return int */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool $hasMore hasMore + * @param int $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\CollectionItem[] + * @return \TalonOne\Client\Model\LoyaltyProgram[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CollectionItem[] $data data + * @param \TalonOne\Client\Model\LoyaltyProgram[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20012.php b/lib/Model/InlineResponse20012.php index 2b9c4889..ee1d889b 100644 --- a/lib/Model/InlineResponse20012.php +++ b/lib/Model/InlineResponse20012.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,8 +58,7 @@ class InlineResponse20012 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Collection[]' + 'data' => '\TalonOne\Client\Model\LoyaltyProgramTransaction[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20012 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, - 'totalResultSize' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', - 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', - 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', - 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -201,6 +195,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -222,7 +219,7 @@ public function valid() /** * Gets hasMore * - * @return bool|null + * @return bool */ public function getHasMore() { @@ -232,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool|null $hasMore hasMore + * @param bool $hasMore hasMore * * @return $this */ @@ -243,34 +240,10 @@ public function setHasMore($hasMore) return $this; } - /** - * Gets totalResultSize - * - * @return int|null - */ - public function getTotalResultSize() - { - return $this->container['totalResultSize']; - } - - /** - * Sets totalResultSize - * - * @param int|null $totalResultSize totalResultSize - * - * @return $this - */ - public function setTotalResultSize($totalResultSize) - { - $this->container['totalResultSize'] = $totalResultSize; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\Collection[] + * @return \TalonOne\Client\Model\LoyaltyProgramTransaction[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Collection[] $data data + * @param \TalonOne\Client\Model\LoyaltyProgramTransaction[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20013.php b/lib/Model/InlineResponse20013.php index 9866eac7..bd426210 100644 --- a/lib/Model/InlineResponse20013.php +++ b/lib/Model/InlineResponse20013.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse20013 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' + 'data' => '\TalonOne\Client\Model\LoyaltyCard[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\AccessLogEntry[] + * @return \TalonOne\Client\Model\LoyaltyCard[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\AccessLogEntry[] $data data + * @param \TalonOne\Client\Model\LoyaltyCard[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20014.php b/lib/Model/InlineResponse20014.php index 3f21425e..172048c1 100644 --- a/lib/Model/InlineResponse20014.php +++ b/lib/Model/InlineResponse20014.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20014 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\CardLedgerTransactionLogEntry[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20014 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore true means there is more data in the source collection to request.. * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\AccessLogEntry[] + * @return \TalonOne\Client\Model\CardLedgerTransactionLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\AccessLogEntry[] $data data + * @param \TalonOne\Client\Model\CardLedgerTransactionLogEntry[] $data List of loyalty card transaction logs. * * @return $this */ diff --git a/lib/Model/InlineResponse20015.php b/lib/Model/InlineResponse20015.php index e1b43894..a69290a8 100644 --- a/lib/Model/InlineResponse20015.php +++ b/lib/Model/InlineResponse20015.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,9 @@ class InlineResponse20015 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\CampaignAnalytics[]' + 'data' => '\TalonOne\Client\Model\CollectionWithoutPayload[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20015 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +256,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\CampaignAnalytics[] + * @return \TalonOne\Client\Model\CollectionWithoutPayload[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CampaignAnalytics[] $data data + * @param \TalonOne\Client\Model\CollectionWithoutPayload[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20016.php b/lib/Model/InlineResponse20016.php index be6970e9..ab8a0c98 100644 --- a/lib/Model/InlineResponse20016.php +++ b/lib/Model/InlineResponse20016.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,9 +57,8 @@ class InlineResponse20016 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' + 'data' => '\TalonOne\Client\Model\CollectionItem[]' ]; /** @@ -68,7 +67,6 @@ class InlineResponse20016 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, 'hasMore' => null, 'data' => null ]; @@ -100,7 +98,6 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -111,7 +108,6 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -122,7 +118,6 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -187,7 +182,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['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; + } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,34 +216,10 @@ public function valid() } - /** - * Gets totalResultSize - * - * @return int|null - */ - public function getTotalResultSize() - { - return $this->container['totalResultSize']; - } - - /** - * Sets totalResultSize - * - * @param int|null $totalResultSize totalResultSize - * - * @return $this - */ - public function setTotalResultSize($totalResultSize) - { - $this->container['totalResultSize'] = $totalResultSize; - - return $this; - } - /** * Gets hasMore * - * @return bool|null + * @return bool */ public function getHasMore() { @@ -256,7 +229,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool|null $hasMore hasMore + * @param bool $hasMore hasMore * * @return $this */ @@ -270,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationCustomer[] + * @return \TalonOne\Client\Model\CollectionItem[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationCustomer[] $data data + * @param \TalonOne\Client\Model\CollectionItem[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20017.php b/lib/Model/InlineResponse20017.php index 0d84e965..9110c219 100644 --- a/lib/Model/InlineResponse20017.php +++ b/lib/Model/InlineResponse20017.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,8 @@ class InlineResponse20017 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\Collection[]' ]; /** @@ -68,6 +69,7 @@ class InlineResponse20017 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -99,6 +101,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -109,6 +112,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -119,6 +123,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -183,6 +188,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -219,7 +222,7 @@ public function valid() /** * Gets hasMore * - * @return bool + * @return bool|null */ public function getHasMore() { @@ -229,7 +232,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore hasMore + * @param bool|null $hasMore hasMore * * @return $this */ @@ -240,10 +243,34 @@ public function setHasMore($hasMore) return $this; } + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationCustomer[] + * @return \TalonOne\Client\Model\Collection[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationCustomer[] $data data + * @param \TalonOne\Client\Model\Collection[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20018.php b/lib/Model/InlineResponse20018.php index 40a8a3a1..52cf0057 100644 --- a/lib/Model/InlineResponse20018.php +++ b/lib/Model/InlineResponse20018.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse20018 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CustomerProfile[]' + 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\CustomerProfile[] + * @return \TalonOne\Client\Model\AccessLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CustomerProfile[] $data data + * @param \TalonOne\Client\Model\AccessLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20019.php b/lib/Model/InlineResponse20019.php index 144d29b4..8ac1a0bf 100644 --- a/lib/Model/InlineResponse20019.php +++ b/lib/Model/InlineResponse20019.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20019 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\CustomerActivityReport[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\AccessLogEntry[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20019 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool + * @return int */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool $hasMore hasMore + * @param int $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\CustomerActivityReport[] + * @return \TalonOne\Client\Model\AccessLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\CustomerActivityReport[] $data data + * @param \TalonOne\Client\Model\AccessLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2002.php b/lib/Model/InlineResponse2002.php index 9e793b0a..f4bd1da2 100644 --- a/lib/Model/InlineResponse2002.php +++ b/lib/Model/InlineResponse2002.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse2002 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Application[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse2002 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Application[] + * @return \TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Application[] $data data + * @param \TalonOne\Client\Model\LedgerTransactionLogEntryIntegrationAPI[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20020.php b/lib/Model/InlineResponse20020.php index e7b60fc8..c02e5438 100644 --- a/lib/Model/InlineResponse20020.php +++ b/lib/Model/InlineResponse20020.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20020 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationSession[]' + 'totalResultSize' => 'int', + 'data' => '\TalonOne\Client\Model\CampaignAnalytics[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20020 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,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"; } @@ -214,25 +217,25 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool|null + * @return int */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool|null $hasMore hasMore + * @param int $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } @@ -240,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationSession[] + * @return \TalonOne\Client\Model\CampaignAnalytics[] */ public function getData() { @@ -250,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationSession[] $data data + * @param \TalonOne\Client\Model\CampaignAnalytics[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20021.php b/lib/Model/InlineResponse20021.php index dd8ac9a9..19036961 100644 --- a/lib/Model/InlineResponse20021.php +++ b/lib/Model/InlineResponse20021.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,9 @@ class InlineResponse20021 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'totalResultSize' => 'int', 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\ApplicationEvent[]' + 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20021 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'totalResultSize' => null, 'hasMore' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,6 +187,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['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + /** * Gets hasMore * - * @return bool + * @return bool|null */ public function getHasMore() { @@ -229,7 +256,7 @@ public function getHasMore() /** * Sets hasMore * - * @param bool $hasMore hasMore + * @param bool|null $hasMore hasMore * * @return $this */ @@ -243,7 +270,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationEvent[] + * @return \TalonOne\Client\Model\ApplicationCustomer[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationEvent[] $data data + * @param \TalonOne\Client\Model\ApplicationCustomer[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20022.php b/lib/Model/InlineResponse20022.php index d0308730..0d8a49a1 100644 --- a/lib/Model/InlineResponse20022.php +++ b/lib/Model/InlineResponse20022.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,9 @@ class InlineResponse20022 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => 'string[]' + 'data' => '\TalonOne\Client\Model\ApplicationCustomer[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20022 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +256,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return string[] + * @return \TalonOne\Client\Model\ApplicationCustomer[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param string[] $data data + * @param \TalonOne\Client\Model\ApplicationCustomer[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20023.php b/lib/Model/InlineResponse20023.php index 381b56eb..7a836d35 100644 --- a/lib/Model/InlineResponse20023.php +++ b/lib/Model/InlineResponse20023.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,7 +59,7 @@ class InlineResponse20023 implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Audience[]' + 'data' => '\TalonOne\Client\Model\CustomerProfile[]' ]; /** @@ -270,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Audience[] + * @return \TalonOne\Client\Model\CustomerProfile[] */ public function getData() { @@ -280,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Audience[] $data data + * @param \TalonOne\Client\Model\CustomerProfile[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20024.php b/lib/Model/InlineResponse20024.php index 5d5380f7..1df724cb 100644 --- a/lib/Model/InlineResponse20024.php +++ b/lib/Model/InlineResponse20024.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,8 +58,7 @@ class InlineResponse20024 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\ApplicationReferee[]' + 'data' => '\TalonOne\Client\Model\CustomerProfile[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20024 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'hasMore' => null, - 'totalResultSize' => null, 'data' => null ]; @@ -101,7 +99,6 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'hasMore' => 'hasMore', - 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -112,7 +109,6 @@ public static function openAPIFormats() */ protected static $setters = [ 'hasMore' => 'setHasMore', - 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -123,7 +119,6 @@ public static function openAPIFormats() */ protected static $getters = [ 'hasMore' => 'getHasMore', - 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -188,7 +183,6 @@ public function getModelName() public function __construct(array $data = null) { $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -204,9 +198,6 @@ public function listInvalidProperties() if ($this->container['hasMore'] === null) { $invalidProperties[] = "'hasMore' can't be null"; } - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -249,34 +240,10 @@ public function setHasMore($hasMore) return $this; } - /** - * Gets totalResultSize - * - * @return int - */ - public function getTotalResultSize() - { - return $this->container['totalResultSize']; - } - - /** - * Sets totalResultSize - * - * @param int $totalResultSize totalResultSize - * - * @return $this - */ - public function setTotalResultSize($totalResultSize) - { - $this->container['totalResultSize'] = $totalResultSize; - - return $this; - } - /** * Gets data * - * @return \TalonOne\Client\Model\ApplicationReferee[] + * @return \TalonOne\Client\Model\CustomerProfile[] */ public function getData() { @@ -286,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\ApplicationReferee[] $data data + * @param \TalonOne\Client\Model\CustomerProfile[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20025.php b/lib/Model/InlineResponse20025.php index 3c38d9ef..fe242bc1 100644 --- a/lib/Model/InlineResponse20025.php +++ b/lib/Model/InlineResponse20025.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20025 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Attribute[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\CustomerActivityReport[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20025 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Attribute[] + * @return \TalonOne\Client\Model\CustomerActivityReport[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Attribute[] $data data + * @param \TalonOne\Client\Model\CustomerActivityReport[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20026.php b/lib/Model/InlineResponse20026.php index 1b3260f9..2d6db01d 100644 --- a/lib/Model/InlineResponse20026.php +++ b/lib/Model/InlineResponse20026.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20026 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\AccountAdditionalCost[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\ApplicationSession[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20026 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,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"; } @@ -217,25 +214,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool|null */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool|null $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +240,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\AccountAdditionalCost[] + * @return \TalonOne\Client\Model\ApplicationSession[] */ public function getData() { @@ -253,7 +250,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\AccountAdditionalCost[] $data data + * @param \TalonOne\Client\Model\ApplicationSession[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20027.php b/lib/Model/InlineResponse20027.php index a2c4e33e..d7f1c3f9 100644 --- a/lib/Model/InlineResponse20027.php +++ b/lib/Model/InlineResponse20027.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse20027 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Webhook[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\ApplicationEvent[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse20027 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Webhook[] + * @return \TalonOne\Client\Model\ApplicationEvent[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Webhook[] $data data + * @param \TalonOne\Client\Model\ApplicationEvent[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20028.php b/lib/Model/InlineResponse20028.php index 1b58e8d4..97cf449f 100644 --- a/lib/Model/InlineResponse20028.php +++ b/lib/Model/InlineResponse20028.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse20028 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\WebhookActivationLogEntry[]' + 'data' => 'string[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\WebhookActivationLogEntry[] + * @return string[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\WebhookActivationLogEntry[] $data data + * @param string[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20029.php b/lib/Model/InlineResponse20029.php index 3eb2e51c..b9d0b4d6 100644 --- a/lib/Model/InlineResponse20029.php +++ b/lib/Model/InlineResponse20029.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,9 @@ class InlineResponse20029 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\WebhookLogEntry[]' + 'data' => '\TalonOne\Client\Model\Audience[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20029 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +256,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\WebhookLogEntry[] + * @return \TalonOne\Client\Model\Audience[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\WebhookLogEntry[] $data data + * @param \TalonOne\Client\Model\Audience[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2003.php b/lib/Model/InlineResponse2003.php index 1bd5c3ad..1d80944f 100644 --- a/lib/Model/InlineResponse2003.php +++ b/lib/Model/InlineResponse2003.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse2003 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Campaign[]' + 'data' => '\TalonOne\Client\Model\Application[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Campaign[] + * @return \TalonOne\Client\Model\Application[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Campaign[] $data data + * @param \TalonOne\Client\Model\Application[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20030.php b/lib/Model/InlineResponse20030.php index aa723e55..cba0b10d 100644 --- a/lib/Model/InlineResponse20030.php +++ b/lib/Model/InlineResponse20030.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,9 @@ class InlineResponse20030 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'hasMore' => 'bool', 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\EventType[]' + 'data' => '\TalonOne\Client\Model\ApplicationReferee[]' ]; /** @@ -67,6 +68,7 @@ class InlineResponse20030 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'hasMore' => null, 'totalResultSize' => null, 'data' => null ]; @@ -98,6 +100,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'hasMore' => 'hasMore', 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,6 +111,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'hasMore' => 'setHasMore', 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,6 +122,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'hasMore' => 'getHasMore', 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,6 +187,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,9 +201,6 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; - } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; } @@ -216,10 +219,34 @@ public function valid() } + /** + * Gets hasMore + * + * @return bool|null + */ + public function getHasMore() + { + return $this->container['hasMore']; + } + + /** + * Sets hasMore + * + * @param bool|null $hasMore hasMore + * + * @return $this + */ + public function setHasMore($hasMore) + { + $this->container['hasMore'] = $hasMore; + + return $this; + } + /** * Gets totalResultSize * - * @return int + * @return int|null */ public function getTotalResultSize() { @@ -229,7 +256,7 @@ public function getTotalResultSize() /** * Sets totalResultSize * - * @param int $totalResultSize totalResultSize + * @param int|null $totalResultSize totalResultSize * * @return $this */ @@ -243,7 +270,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\EventType[] + * @return \TalonOne\Client\Model\ApplicationReferee[] */ public function getData() { @@ -253,7 +280,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\EventType[] $data data + * @param \TalonOne\Client\Model\ApplicationReferee[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20031.php b/lib/Model/InlineResponse20031.php index 3f3eb1d7..ba670714 100644 --- a/lib/Model/InlineResponse20031.php +++ b/lib/Model/InlineResponse20031.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse20031 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\User[]' + 'data' => '\TalonOne\Client\Model\Attribute[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\User[] + * @return \TalonOne\Client\Model\Attribute[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\User[] $data data + * @param \TalonOne\Client\Model\Attribute[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20032.php b/lib/Model/InlineResponse20032.php index 5a64a06e..c8ddf73f 100644 --- a/lib/Model/InlineResponse20032.php +++ b/lib/Model/InlineResponse20032.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,8 +58,7 @@ class InlineResponse20032 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\Change[]' + 'data' => '\TalonOne\Client\Model\AccountAdditionalCost[]' ]; /** @@ -69,7 +68,6 @@ class InlineResponse20032 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\AccountAdditionalCost[] */ public function getData() { @@ -280,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Change[] $data data + * @param \TalonOne\Client\Model\AccountAdditionalCost[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20033.php b/lib/Model/InlineResponse20033.php index c4511060..8c183099 100644 --- a/lib/Model/InlineResponse20033.php +++ b/lib/Model/InlineResponse20033.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse20033 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Export[]' + 'data' => '\TalonOne\Client\Model\Webhook[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Export[] + * @return \TalonOne\Client\Model\Webhook[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Export[] $data data + * @param \TalonOne\Client\Model\Webhook[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20034.php b/lib/Model/InlineResponse20034.php index 905c769f..ed6b4bb7 100644 --- a/lib/Model/InlineResponse20034.php +++ b/lib/Model/InlineResponse20034.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse20034 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Role[]' + 'data' => '\TalonOne\Client\Model\WebhookActivationLogEntry[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Role[] + * @return \TalonOne\Client\Model\WebhookActivationLogEntry[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Role[] $data data + * @param \TalonOne\Client\Model\WebhookActivationLogEntry[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20035.php b/lib/Model/InlineResponse20035.php new file mode 100644 index 00000000..4b46e3f6 --- /dev/null +++ b/lib/Model/InlineResponse20035.php @@ -0,0 +1,343 @@ + 'int', + 'data' => '\TalonOne\Client\Model\WebhookLogEntry[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\WebhookLogEntry[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\WebhookLogEntry[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/InlineResponse20036.php b/lib/Model/InlineResponse20036.php new file mode 100644 index 00000000..2602d26f --- /dev/null +++ b/lib/Model/InlineResponse20036.php @@ -0,0 +1,343 @@ + 'int', + 'data' => '\TalonOne\Client\Model\EventType[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\EventType[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\EventType[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/InlineResponse20037.php b/lib/Model/InlineResponse20037.php new file mode 100644 index 00000000..b666162a --- /dev/null +++ b/lib/Model/InlineResponse20037.php @@ -0,0 +1,343 @@ + 'int', + 'data' => '\TalonOne\Client\Model\User[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\User[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\User[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/InlineResponse20038.php b/lib/Model/InlineResponse20038.php new file mode 100644 index 00000000..efe20833 --- /dev/null +++ b/lib/Model/InlineResponse20038.php @@ -0,0 +1,370 @@ + 'int', + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\Change[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'hasMore' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int|null + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int|null $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets 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[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\Change[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/InlineResponse20039.php b/lib/Model/InlineResponse20039.php new file mode 100644 index 00000000..6fe090f8 --- /dev/null +++ b/lib/Model/InlineResponse20039.php @@ -0,0 +1,343 @@ + 'int', + 'data' => '\TalonOne\Client\Model\Export[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\Export[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\Export[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/InlineResponse2004.php b/lib/Model/InlineResponse2004.php index 7489b500..67fc15c6 100644 --- a/lib/Model/InlineResponse2004.php +++ b/lib/Model/InlineResponse2004.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse2004 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\NotificationWebhook[]' + 'data' => '\TalonOne\Client\Model\Campaign[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\NotificationWebhook[] + * @return \TalonOne\Client\Model\Campaign[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\NotificationWebhook[] $data data + * @param \TalonOne\Client\Model\Campaign[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse20040.php b/lib/Model/InlineResponse20040.php new file mode 100644 index 00000000..f8988f9c --- /dev/null +++ b/lib/Model/InlineResponse20040.php @@ -0,0 +1,343 @@ + 'int', + 'data' => '\TalonOne\Client\Model\Role[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'totalResultSize' => null, + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'totalResultSize' => 'totalResultSize', + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'totalResultSize' => 'setTotalResultSize', + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'totalResultSize' => 'getTotalResultSize', + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; + } + if ($this->container['data'] === null) { + $invalidProperties[] = "'data' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets totalResultSize + * + * @return int + */ + public function getTotalResultSize() + { + return $this->container['totalResultSize']; + } + + /** + * Sets totalResultSize + * + * @param int $totalResultSize totalResultSize + * + * @return $this + */ + public function setTotalResultSize($totalResultSize) + { + $this->container['totalResultSize'] = $totalResultSize; + + return $this; + } + + /** + * Gets data + * + * @return \TalonOne\Client\Model\Role[] + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\Role[] $data data + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/InlineResponse2005.php b/lib/Model/InlineResponse2005.php index 06f462c9..c9bef198 100644 --- a/lib/Model/InlineResponse2005.php +++ b/lib/Model/InlineResponse2005.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse2005 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Ruleset[]' + 'data' => '\TalonOne\Client\Model\NotificationWebhook[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Ruleset[] + * @return \TalonOne\Client\Model\NotificationWebhook[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Ruleset[] $data data + * @param \TalonOne\Client\Model\NotificationWebhook[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2006.php b/lib/Model/InlineResponse2006.php index c3160d4e..6de9f4e7 100644 --- a/lib/Model/InlineResponse2006.php +++ b/lib/Model/InlineResponse2006.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse2006 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\Coupon[]' + 'data' => '\TalonOne\Client\Model\Ruleset[]' ]; /** @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\Coupon[] + * @return \TalonOne\Client\Model\Ruleset[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Coupon[] $data data + * @param \TalonOne\Client\Model\Ruleset[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2007.php b/lib/Model/InlineResponse2007.php index 6210b911..0ea3e32f 100644 --- a/lib/Model/InlineResponse2007.php +++ b/lib/Model/InlineResponse2007.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,7 +57,7 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'hasMore' => 'bool', + 'totalResultSize' => 'int', 'data' => '\TalonOne\Client\Model\Coupon[]' ]; @@ -67,7 +67,7 @@ class InlineResponse2007 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'hasMore' => null, + 'totalResultSize' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'hasMore' => 'hasMore', + 'totalResultSize' => 'totalResultSize', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'hasMore' => 'setHasMore', + 'totalResultSize' => 'setTotalResultSize', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'hasMore' => 'getHasMore', + 'totalResultSize' => 'getTotalResultSize', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; + $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['hasMore'] === null) { - $invalidProperties[] = "'hasMore' can't be null"; + if ($this->container['totalResultSize'] === null) { + $invalidProperties[] = "'totalResultSize' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets hasMore + * Gets totalResultSize * - * @return bool + * @return int */ - public function getHasMore() + public function getTotalResultSize() { - return $this->container['hasMore']; + return $this->container['totalResultSize']; } /** - * Sets hasMore + * Sets totalResultSize * - * @param bool $hasMore hasMore + * @param int $totalResultSize totalResultSize * * @return $this */ - public function setHasMore($hasMore) + public function setTotalResultSize($totalResultSize) { - $this->container['hasMore'] = $hasMore; + $this->container['totalResultSize'] = $totalResultSize; return $this; } diff --git a/lib/Model/InlineResponse2008.php b/lib/Model/InlineResponse2008.php index 60a783a5..0ade85d4 100644 --- a/lib/Model/InlineResponse2008.php +++ b/lib/Model/InlineResponse2008.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,7 +58,7 @@ class InlineResponse2008 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'hasMore' => 'bool', - 'data' => '\TalonOne\Client\Model\Referral[]' + 'data' => '\TalonOne\Client\Model\Coupon[]' ]; /** @@ -243,7 +243,7 @@ public function setHasMore($hasMore) /** * Gets data * - * @return \TalonOne\Client\Model\Referral[] + * @return \TalonOne\Client\Model\Coupon[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\Referral[] $data data + * @param \TalonOne\Client\Model\Coupon[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse2009.php b/lib/Model/InlineResponse2009.php index 3357e70a..cb265475 100644 --- a/lib/Model/InlineResponse2009.php +++ b/lib/Model/InlineResponse2009.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,8 +57,8 @@ class InlineResponse2009 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ - 'totalResultSize' => 'int', - 'data' => '\TalonOne\Client\Model\LoyaltyProgram[]' + 'hasMore' => 'bool', + 'data' => '\TalonOne\Client\Model\Referral[]' ]; /** @@ -67,7 +67,7 @@ class InlineResponse2009 implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'totalResultSize' => null, + 'hasMore' => null, 'data' => null ]; @@ -98,7 +98,7 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'totalResultSize' => 'totalResultSize', + 'hasMore' => 'hasMore', 'data' => 'data' ]; @@ -108,7 +108,7 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'totalResultSize' => 'setTotalResultSize', + 'hasMore' => 'setHasMore', 'data' => 'setData' ]; @@ -118,7 +118,7 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'totalResultSize' => 'getTotalResultSize', + 'hasMore' => 'getHasMore', 'data' => 'getData' ]; @@ -182,7 +182,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['totalResultSize'] = isset($data['totalResultSize']) ? $data['totalResultSize'] : null; + $this->container['hasMore'] = isset($data['hasMore']) ? $data['hasMore'] : null; $this->container['data'] = isset($data['data']) ? $data['data'] : null; } @@ -195,8 +195,8 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['totalResultSize'] === null) { - $invalidProperties[] = "'totalResultSize' can't be null"; + if ($this->container['hasMore'] === null) { + $invalidProperties[] = "'hasMore' can't be null"; } if ($this->container['data'] === null) { $invalidProperties[] = "'data' can't be null"; @@ -217,25 +217,25 @@ public function valid() /** - * Gets totalResultSize + * Gets hasMore * - * @return int + * @return bool */ - public function getTotalResultSize() + public function getHasMore() { - return $this->container['totalResultSize']; + return $this->container['hasMore']; } /** - * Sets totalResultSize + * Sets hasMore * - * @param int $totalResultSize totalResultSize + * @param bool $hasMore hasMore * * @return $this */ - public function setTotalResultSize($totalResultSize) + public function setHasMore($hasMore) { - $this->container['totalResultSize'] = $totalResultSize; + $this->container['hasMore'] = $hasMore; return $this; } @@ -243,7 +243,7 @@ public function setTotalResultSize($totalResultSize) /** * Gets data * - * @return \TalonOne\Client\Model\LoyaltyProgram[] + * @return \TalonOne\Client\Model\Referral[] */ public function getData() { @@ -253,7 +253,7 @@ public function getData() /** * Sets data * - * @param \TalonOne\Client\Model\LoyaltyProgram[] $data data + * @param \TalonOne\Client\Model\Referral[] $data data * * @return $this */ diff --git a/lib/Model/InlineResponse201.php b/lib/Model/InlineResponse201.php index 70018973..b9f5ed7b 100644 --- a/lib/Model/InlineResponse201.php +++ b/lib/Model/InlineResponse201.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/IntegrationCoupon.php b/lib/Model/IntegrationCoupon.php new file mode 100644 index 00000000..e18ca807 --- /dev/null +++ b/lib/Model/IntegrationCoupon.php @@ -0,0 +1,1024 @@ + 'int', + 'created' => '\DateTime', + 'campaignId' => 'int', + 'value' => 'string', + 'usageLimit' => 'int', + 'discountLimit' => 'float', + 'reservationLimit' => 'int', + 'startDate' => '\DateTime', + 'expiryDate' => '\DateTime', + 'limits' => '\TalonOne\Client\Model\LimitConfig[]', + 'usageCounter' => 'int', + 'discountCounter' => 'float', + 'discountRemainder' => 'float', + 'reservationCounter' => 'float', + 'attributes' => 'object', + 'referralId' => 'int', + 'recipientIntegrationId' => 'string', + 'importId' => 'int', + 'reservation' => 'bool', + 'batchId' => 'string', + 'isReservationMandatory' => 'bool', + 'profileRedemptionCount' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'campaignId' => null, + 'value' => null, + 'usageLimit' => null, + 'discountLimit' => null, + 'reservationLimit' => null, + 'startDate' => 'date-time', + 'expiryDate' => 'date-time', + 'limits' => null, + 'usageCounter' => null, + 'discountCounter' => null, + 'discountRemainder' => null, + 'reservationCounter' => null, + 'attributes' => null, + 'referralId' => null, + 'recipientIntegrationId' => null, + 'importId' => null, + 'reservation' => null, + 'batchId' => null, + 'isReservationMandatory' => null, + 'profileRedemptionCount' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'campaignId' => 'campaignId', + 'value' => 'value', + 'usageLimit' => 'usageLimit', + 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', + 'startDate' => 'startDate', + 'expiryDate' => 'expiryDate', + 'limits' => 'limits', + 'usageCounter' => 'usageCounter', + 'discountCounter' => 'discountCounter', + 'discountRemainder' => 'discountRemainder', + 'reservationCounter' => 'reservationCounter', + 'attributes' => 'attributes', + 'referralId' => 'referralId', + 'recipientIntegrationId' => 'recipientIntegrationId', + 'importId' => 'importId', + 'reservation' => 'reservation', + 'batchId' => 'batchId', + 'isReservationMandatory' => 'isReservationMandatory', + 'profileRedemptionCount' => 'profileRedemptionCount' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'campaignId' => 'setCampaignId', + 'value' => 'setValue', + 'usageLimit' => 'setUsageLimit', + 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', + 'startDate' => 'setStartDate', + 'expiryDate' => 'setExpiryDate', + 'limits' => 'setLimits', + 'usageCounter' => 'setUsageCounter', + 'discountCounter' => 'setDiscountCounter', + 'discountRemainder' => 'setDiscountRemainder', + 'reservationCounter' => 'setReservationCounter', + 'attributes' => 'setAttributes', + 'referralId' => 'setReferralId', + 'recipientIntegrationId' => 'setRecipientIntegrationId', + 'importId' => 'setImportId', + 'reservation' => 'setReservation', + 'batchId' => 'setBatchId', + 'isReservationMandatory' => 'setIsReservationMandatory', + 'profileRedemptionCount' => 'setProfileRedemptionCount' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'campaignId' => 'getCampaignId', + 'value' => 'getValue', + 'usageLimit' => 'getUsageLimit', + 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', + 'startDate' => 'getStartDate', + 'expiryDate' => 'getExpiryDate', + 'limits' => 'getLimits', + 'usageCounter' => 'getUsageCounter', + 'discountCounter' => 'getDiscountCounter', + 'discountRemainder' => 'getDiscountRemainder', + 'reservationCounter' => 'getReservationCounter', + 'attributes' => 'getAttributes', + 'referralId' => 'getReferralId', + 'recipientIntegrationId' => 'getRecipientIntegrationId', + 'importId' => 'getImportId', + 'reservation' => 'getReservation', + 'batchId' => 'getBatchId', + 'isReservationMandatory' => 'getIsReservationMandatory', + 'profileRedemptionCount' => 'getProfileRedemptionCount' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['campaignId'] = isset($data['campaignId']) ? $data['campaignId'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + $this->container['usageLimit'] = isset($data['usageLimit']) ? $data['usageLimit'] : null; + $this->container['discountLimit'] = isset($data['discountLimit']) ? $data['discountLimit'] : null; + $this->container['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; + $this->container['usageCounter'] = isset($data['usageCounter']) ? $data['usageCounter'] : null; + $this->container['discountCounter'] = isset($data['discountCounter']) ? $data['discountCounter'] : null; + $this->container['discountRemainder'] = isset($data['discountRemainder']) ? $data['discountRemainder'] : null; + $this->container['reservationCounter'] = isset($data['reservationCounter']) ? $data['reservationCounter'] : null; + $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['referralId'] = isset($data['referralId']) ? $data['referralId'] : null; + $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; + $this->container['importId'] = isset($data['importId']) ? $data['importId'] : null; + $this->container['reservation'] = isset($data['reservation']) ? $data['reservation'] : true; + $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; + $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; + $this->container['profileRedemptionCount'] = isset($data['profileRedemptionCount']) ? $data['profileRedemptionCount'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['campaignId'] === null) { + $invalidProperties[] = "'campaignId' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + if ((mb_strlen($this->container['value']) < 4)) { + $invalidProperties[] = "invalid value for 'value', the character length must be bigger than or equal to 4."; + } + + 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 (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + + if ($this->container['usageCounter'] === null) { + $invalidProperties[] = "'usageCounter' can't be null"; + } + if (!is_null($this->container['recipientIntegrationId']) && (mb_strlen($this->container['recipientIntegrationId']) > 1000)) { + $invalidProperties[] = "invalid value for 'recipientIntegrationId', the character length must be smaller than or equal to 1000."; + } + + if ($this->container['profileRedemptionCount'] === null) { + $invalidProperties[] = "'profileRedemptionCount' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Internal ID of this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets campaignId + * + * @return int + */ + public function getCampaignId() + { + return $this->container['campaignId']; + } + + /** + * Sets campaignId + * + * @param int $campaignId The ID of the campaign that owns this entity. + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets value + * + * @return string + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param string $value The coupon code. + * + * @return $this + */ + public function setValue($value) + { + + if ((mb_strlen($value) < 4)) { + throw new \InvalidArgumentException('invalid length for $value when calling IntegrationCoupon., must be bigger than or equal to 4.'); + } + + $this->container['value'] = $value; + + return $this; + } + + /** + * Gets usageLimit + * + * @return int + */ + public function getUsageLimit() + { + return $this->container['usageLimit']; + } + + /** + * Sets usageLimit + * + * @param int $usageLimit The number of times the coupon code can be redeemed. `0` means unlimited redemptions 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 IntegrationCoupon., must be smaller than or equal to 999999.'); + } + if (($usageLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $usageLimit when calling IntegrationCoupon., 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 total discount value that the code can give. Typically used to represent a gift card value. + * + * @return $this + */ + public function setDiscountLimit($discountLimit) + { + + if (!is_null($discountLimit) && ($discountLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $discountLimit when calling IntegrationCoupon., must be smaller than or equal to 999999.'); + } + if (!is_null($discountLimit) && ($discountLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $discountLimit when calling IntegrationCoupon., must be bigger than or equal to 0.'); + } + + $this->container['discountLimit'] = $discountLimit; + + return $this; + } + + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling IntegrationCoupon., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling IntegrationCoupon., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + 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 Expiration 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 limits + * + * @return \TalonOne\Client\Model\LimitConfig[]|null + */ + public function getLimits() + { + return $this->container['limits']; + } + + /** + * Sets limits + * + * @param \TalonOne\Client\Model\LimitConfig[]|null $limits Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. + * + * @return $this + */ + public function setLimits($limits) + { + $this->container['limits'] = $limits; + + return $this; + } + + /** + * Gets usageCounter + * + * @return int + */ + public function getUsageCounter() + { + return $this->container['usageCounter']; + } + + /** + * Sets usageCounter + * + * @param int $usageCounter The number of times the coupon has been successfully redeemed. + * + * @return $this + */ + public function setUsageCounter($usageCounter) + { + $this->container['usageCounter'] = $usageCounter; + + return $this; + } + + /** + * Gets discountCounter + * + * @return float|null + */ + public function getDiscountCounter() + { + return $this->container['discountCounter']; + } + + /** + * Sets discountCounter + * + * @param float|null $discountCounter The amount of discounts given on rules redeeming this coupon. Only usable if a coupon discount budget was set for this coupon. + * + * @return $this + */ + public function setDiscountCounter($discountCounter) + { + $this->container['discountCounter'] = $discountCounter; + + return $this; + } + + /** + * Gets discountRemainder + * + * @return float|null + */ + public function getDiscountRemainder() + { + return $this->container['discountRemainder']; + } + + /** + * Sets discountRemainder + * + * @param float|null $discountRemainder The remaining discount this coupon can give. + * + * @return $this + */ + public function setDiscountRemainder($discountRemainder) + { + $this->container['discountRemainder'] = $discountRemainder; + + return $this; + } + + /** + * Gets reservationCounter + * + * @return float|null + */ + public function getReservationCounter() + { + return $this->container['reservationCounter']; + } + + /** + * Sets reservationCounter + * + * @param float|null $reservationCounter The number of times this coupon has been reserved. + * + * @return $this + */ + public function setReservationCounter($reservationCounter) + { + $this->container['reservationCounter'] = $reservationCounter; + + return $this; + } + + /** + * Gets attributes + * + * @return object|null + */ + public function getAttributes() + { + return $this->container['attributes']; + } + + /** + * Sets attributes + * + * @param object|null $attributes Custom attributes associated with this coupon. + * + * @return $this + */ + public function setAttributes($attributes) + { + $this->container['attributes'] = $attributes; + + return $this; + } + + /** + * Gets referralId + * + * @return int|null + */ + public function getReferralId() + { + return $this->container['referralId']; + } + + /** + * Sets referralId + * + * @param int|null $referralId The integration ID of the referring customer (if any) for whom this coupon was created as an effect. + * + * @return $this + */ + public function setReferralId($referralId) + { + $this->container['referralId'] = $referralId; + + return $this; + } + + /** + * Gets recipientIntegrationId + * + * @return string|null + */ + public function getRecipientIntegrationId() + { + return $this->container['recipientIntegrationId']; + } + + /** + * Sets recipientIntegrationId + * + * @param string|null $recipientIntegrationId The Integration ID of the customer that is allowed to redeem this coupon. + * + * @return $this + */ + public function setRecipientIntegrationId($recipientIntegrationId) + { + if (!is_null($recipientIntegrationId) && (mb_strlen($recipientIntegrationId) > 1000)) { + throw new \InvalidArgumentException('invalid length for $recipientIntegrationId when calling IntegrationCoupon., must be smaller than or equal to 1000.'); + } + + $this->container['recipientIntegrationId'] = $recipientIntegrationId; + + return $this; + } + + /** + * Gets importId + * + * @return int|null + */ + public function getImportId() + { + return $this->container['importId']; + } + + /** + * Sets importId + * + * @param int|null $importId The ID of the Import which created this coupon. + * + * @return $this + */ + public function setImportId($importId) + { + $this->container['importId'] = $importId; + + return $this; + } + + /** + * Gets reservation + * + * @return bool|null + */ + public function getReservation() + { + return $this->container['reservation']; + } + + /** + * Sets reservation + * + * @param bool|null $reservation Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. + * + * @return $this + */ + public function setReservation($reservation) + { + $this->container['reservation'] = $reservation; + + return $this; + } + + /** + * Gets batchId + * + * @return string|null + */ + public function getBatchId() + { + return $this->container['batchId']; + } + + /** + * Sets batchId + * + * @param string|null $batchId The id of the batch the coupon belongs to. + * + * @return $this + */ + public function setBatchId($batchId) + { + $this->container['batchId'] = $batchId; + + return $this; + } + + /** + * Gets isReservationMandatory + * + * @return bool|null + */ + public function getIsReservationMandatory() + { + return $this->container['isReservationMandatory']; + } + + /** + * Sets isReservationMandatory + * + * @param bool|null $isReservationMandatory Whether the reservation effect actually created a new reservation. + * + * @return $this + */ + public function setIsReservationMandatory($isReservationMandatory) + { + $this->container['isReservationMandatory'] = $isReservationMandatory; + + return $this; + } + + /** + * Gets profileRedemptionCount + * + * @return int + */ + public function getProfileRedemptionCount() + { + return $this->container['profileRedemptionCount']; + } + + /** + * Sets profileRedemptionCount + * + * @param int $profileRedemptionCount The number of times the coupon was redeemed by the profile. + * + * @return $this + */ + public function setProfileRedemptionCount($profileRedemptionCount) + { + $this->container['profileRedemptionCount'] = $profileRedemptionCount; + + 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/IntegrationCustomerSessionResponse.php b/lib/Model/IntegrationCustomerSessionResponse.php index 6c5304a2..65bff10a 100644 --- a/lib/Model/IntegrationCustomerSessionResponse.php +++ b/lib/Model/IntegrationCustomerSessionResponse.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/IntegrationEntity.php b/lib/Model/IntegrationEntity.php index 67b52c3c..67870fb5 100644 --- a/lib/Model/IntegrationEntity.php +++ b/lib/Model/IntegrationEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -261,7 +261,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/IntegrationEvent.php b/lib/Model/IntegrationEvent.php index 1ec89434..7dd88459 100644 --- a/lib/Model/IntegrationEvent.php +++ b/lib/Model/IntegrationEvent.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/IntegrationEventV2Request.php b/lib/Model/IntegrationEventV2Request.php index 13ab6845..c7316119 100644 --- a/lib/Model/IntegrationEventV2Request.php +++ b/lib/Model/IntegrationEventV2Request.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,6 +59,7 @@ class IntegrationEventV2Request implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'evaluableCampaignIds' => 'int[]', 'type' => 'string', 'attributes' => 'object', 'responseContent' => 'string[]' @@ -71,6 +72,7 @@ class IntegrationEventV2Request implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'evaluableCampaignIds' => null, 'type' => null, 'attributes' => null, 'responseContent' => null @@ -104,6 +106,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'evaluableCampaignIds' => 'evaluableCampaignIds', 'type' => 'type', 'attributes' => 'attributes', 'responseContent' => 'responseContent' @@ -116,6 +119,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'type' => 'setType', 'attributes' => 'setAttributes', 'responseContent' => 'setResponseContent' @@ -128,6 +132,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'type' => 'getType', 'attributes' => 'getAttributes', 'responseContent' => 'getResponseContent' @@ -217,6 +222,7 @@ public function getResponseContentAllowableValues() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['responseContent'] = isset($data['responseContent']) ? $data['responseContent'] : null; @@ -277,6 +283,30 @@ public function setProfileId($profileId) return $this; } + /** + * Gets evaluableCampaignIds + * + * @return int[]|null + */ + public function getEvaluableCampaignIds() + { + return $this->container['evaluableCampaignIds']; + } + + /** + * Sets evaluableCampaignIds + * + * @param int[]|null $evaluableCampaignIds When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. + * + * @return $this + */ + public function setEvaluableCampaignIds($evaluableCampaignIds) + { + $this->container['evaluableCampaignIds'] = $evaluableCampaignIds; + + return $this; + } + /** * Gets type * @@ -290,7 +320,7 @@ public function getType() /** * Sets type * - * @param string $type A string representing the event. Must not be a reserved event name. + * @param string $type A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/events#creating-a-custom-event) of type `event` in the Campaign Manager. * * @return $this */ @@ -319,7 +349,7 @@ public function getAttributes() /** * Sets attributes * - * @param object|null $attributes Arbitrary additional JSON data associated with the event. + * @param object|null $attributes Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-custom-attributes). * * @return $this */ diff --git a/lib/Model/IntegrationProfileEntity.php b/lib/Model/IntegrationProfileEntity.php index 84e86efa..e7c9d544 100644 --- a/lib/Model/IntegrationProfileEntity.php +++ b/lib/Model/IntegrationProfileEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/IntegrationRequest.php b/lib/Model/IntegrationRequest.php index c95cc205..2a36a917 100644 --- a/lib/Model/IntegrationRequest.php +++ b/lib/Model/IntegrationRequest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -282,7 +282,7 @@ public function getResponseContent() /** * Sets responseContent * - * @param string[]|null $responseContent Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. **Note:** `ruleFailureReasons` is always part of the response when the [Application type](https://docs.talon.one/docs/product/applications/overview#application-types) is `sandbox`. + * @param string[]|null $responseContent Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. * * @return $this */ diff --git a/lib/Model/IntegrationState.php b/lib/Model/IntegrationState.php index db994c4b..9a323b6f 100644 --- a/lib/Model/IntegrationState.php +++ b/lib/Model/IntegrationState.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/IntegrationStateV2.php b/lib/Model/IntegrationStateV2.php index 0dfb7657..741a63ab 100644 --- a/lib/Model/IntegrationStateV2.php +++ b/lib/Model/IntegrationStateV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -36,7 +36,7 @@ * IntegrationStateV2 Class Doc Comment * * @category Class - * @description Contains all entities that might interest Talon.One integrations. This is the response type returned by the V2 PUT customer_session endpoint + * @description Contains all entities that might interest Talon.One integrations. * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -63,7 +63,7 @@ class IntegrationStateV2 implements ModelInterface, ArrayAccess 'event' => '\TalonOne\Client\Model\Event', 'loyalty' => '\TalonOne\Client\Model\Loyalty', 'referral' => '\TalonOne\Client\Model\InventoryReferral', - 'coupons' => '\TalonOne\Client\Model\Coupon[]', + 'coupons' => '\TalonOne\Client\Model\IntegrationCoupon[]', 'triggeredCampaigns' => '\TalonOne\Client\Model\Campaign[]', 'effects' => '\TalonOne\Client\Model\Effect[]', 'ruleFailureReasons' => '\TalonOne\Client\Model\RuleFailureReason[]', @@ -415,7 +415,7 @@ public function setReferral($referral) /** * Gets coupons * - * @return \TalonOne\Client\Model\Coupon[]|null + * @return \TalonOne\Client\Model\IntegrationCoupon[]|null */ public function getCoupons() { @@ -425,7 +425,7 @@ public function getCoupons() /** * Sets coupons * - * @param \TalonOne\Client\Model\Coupon[]|null $coupons coupons + * @param \TalonOne\Client\Model\IntegrationCoupon[]|null $coupons coupons * * @return $this */ @@ -473,7 +473,7 @@ public function getEffects() /** * Sets effects * - * @param \TalonOne\Client\Model\Effect[] $effects effects + * @param \TalonOne\Client\Model\Effect[] $effects The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). * * @return $this */ diff --git a/lib/Model/InventoryCoupon.php b/lib/Model/InventoryCoupon.php index 24c780d4..5dbd7d1e 100644 --- a/lib/Model/InventoryCoupon.php +++ b/lib/Model/InventoryCoupon.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -64,18 +64,21 @@ class InventoryCoupon implements ModelInterface, ArrayAccess 'value' => 'string', 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'usageCounter' => 'int', 'discountCounter' => 'float', 'discountRemainder' => 'float', + 'reservationCounter' => 'float', 'attributes' => 'object', 'referralId' => 'int', 'recipientIntegrationId' => 'string', 'importId' => 'int', 'reservation' => 'bool', 'batchId' => 'string', + 'isReservationMandatory' => 'bool', 'profileRedemptionCount' => 'int', 'state' => 'string' ]; @@ -92,18 +95,21 @@ class InventoryCoupon implements ModelInterface, ArrayAccess 'value' => null, 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'limits' => null, 'usageCounter' => null, 'discountCounter' => null, 'discountRemainder' => null, + 'reservationCounter' => null, 'attributes' => null, 'referralId' => null, 'recipientIntegrationId' => null, 'importId' => null, 'reservation' => null, 'batchId' => null, + 'isReservationMandatory' => null, 'profileRedemptionCount' => null, 'state' => null ]; @@ -141,18 +147,21 @@ public static function openAPIFormats() 'value' => 'value', 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'limits' => 'limits', 'usageCounter' => 'usageCounter', 'discountCounter' => 'discountCounter', 'discountRemainder' => 'discountRemainder', + 'reservationCounter' => 'reservationCounter', 'attributes' => 'attributes', 'referralId' => 'referralId', 'recipientIntegrationId' => 'recipientIntegrationId', 'importId' => 'importId', 'reservation' => 'reservation', 'batchId' => 'batchId', + 'isReservationMandatory' => 'isReservationMandatory', 'profileRedemptionCount' => 'profileRedemptionCount', 'state' => 'state' ]; @@ -169,18 +178,21 @@ public static function openAPIFormats() 'value' => 'setValue', 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'limits' => 'setLimits', 'usageCounter' => 'setUsageCounter', 'discountCounter' => 'setDiscountCounter', 'discountRemainder' => 'setDiscountRemainder', + 'reservationCounter' => 'setReservationCounter', 'attributes' => 'setAttributes', 'referralId' => 'setReferralId', 'recipientIntegrationId' => 'setRecipientIntegrationId', 'importId' => 'setImportId', 'reservation' => 'setReservation', 'batchId' => 'setBatchId', + 'isReservationMandatory' => 'setIsReservationMandatory', 'profileRedemptionCount' => 'setProfileRedemptionCount', 'state' => 'setState' ]; @@ -197,18 +209,21 @@ public static function openAPIFormats() 'value' => 'getValue', 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'limits' => 'getLimits', 'usageCounter' => 'getUsageCounter', 'discountCounter' => 'getDiscountCounter', 'discountRemainder' => 'getDiscountRemainder', + 'reservationCounter' => 'getReservationCounter', 'attributes' => 'getAttributes', 'referralId' => 'getReferralId', 'recipientIntegrationId' => 'getRecipientIntegrationId', 'importId' => 'getImportId', 'reservation' => 'getReservation', 'batchId' => 'getBatchId', + 'isReservationMandatory' => 'getIsReservationMandatory', 'profileRedemptionCount' => 'getProfileRedemptionCount', 'state' => 'getState' ]; @@ -279,18 +294,21 @@ public function __construct(array $data = null) $this->container['value'] = isset($data['value']) ? $data['value'] : null; $this->container['usageLimit'] = isset($data['usageLimit']) ? $data['usageLimit'] : null; $this->container['discountLimit'] = isset($data['discountLimit']) ? $data['discountLimit'] : null; + $this->container['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['usageCounter'] = isset($data['usageCounter']) ? $data['usageCounter'] : null; $this->container['discountCounter'] = isset($data['discountCounter']) ? $data['discountCounter'] : null; $this->container['discountRemainder'] = isset($data['discountRemainder']) ? $data['discountRemainder'] : null; + $this->container['reservationCounter'] = isset($data['reservationCounter']) ? $data['reservationCounter'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; $this->container['referralId'] = isset($data['referralId']) ? $data['referralId'] : null; $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; $this->container['importId'] = isset($data['importId']) ? $data['importId'] : null; $this->container['reservation'] = isset($data['reservation']) ? $data['reservation'] : true; $this->container['batchId'] = isset($data['batchId']) ? $data['batchId'] : null; + $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; $this->container['profileRedemptionCount'] = isset($data['profileRedemptionCount']) ? $data['profileRedemptionCount'] : null; $this->container['state'] = isset($data['state']) ? $data['state'] : null; } @@ -339,6 +357,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if ($this->container['usageCounter'] === null) { $invalidProperties[] = "'usageCounter' can't be null"; } @@ -380,7 +406,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -404,7 +430,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -513,7 +539,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -532,6 +558,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling InventoryCoupon., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling InventoryCoupon., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -569,7 +627,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ @@ -617,7 +675,7 @@ public function getUsageCounter() /** * Sets usageCounter * - * @param int $usageCounter The number of times this coupon has been successfully used. + * @param int $usageCounter The number of times the coupon has been successfully redeemed. * * @return $this */ @@ -676,6 +734,30 @@ public function setDiscountRemainder($discountRemainder) return $this; } + /** + * Gets reservationCounter + * + * @return float|null + */ + public function getReservationCounter() + { + return $this->container['reservationCounter']; + } + + /** + * Sets reservationCounter + * + * @param float|null $reservationCounter The number of times this coupon has been reserved. + * + * @return $this + */ + public function setReservationCounter($reservationCounter) + { + $this->container['reservationCounter'] = $reservationCounter; + + return $this; + } + /** * Gets attributes * @@ -789,7 +871,7 @@ public function getReservation() /** * Sets reservation * - * @param bool|null $reservation Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation endpoint](/integration-api/#operation/createCouponReservation). - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons endpoint](/management-api/#operation/createCoupons) or [Create coupons for multiple recipients endpoint](/management-api/#operation/createCouponsForMultipleRecipients). + * @param bool|null $reservation Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. * * @return $this */ @@ -824,6 +906,30 @@ public function setBatchId($batchId) return $this; } + /** + * Gets isReservationMandatory + * + * @return bool|null + */ + public function getIsReservationMandatory() + { + return $this->container['isReservationMandatory']; + } + + /** + * Sets isReservationMandatory + * + * @param bool|null $isReservationMandatory Whether the reservation effect actually created a new reservation. + * + * @return $this + */ + public function setIsReservationMandatory($isReservationMandatory) + { + $this->container['isReservationMandatory'] = $isReservationMandatory; + + return $this; + } + /** * Gets profileRedemptionCount * diff --git a/lib/Model/InventoryReferral.php b/lib/Model/InventoryReferral.php index 7a4a441e..daa02f29 100644 --- a/lib/Model/InventoryReferral.php +++ b/lib/Model/InventoryReferral.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -336,7 +336,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -360,7 +360,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -408,7 +408,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/ItemAttribute.php b/lib/Model/ItemAttribute.php index d9338358..5a74965f 100644 --- a/lib/Model/ItemAttribute.php +++ b/lib/Model/ItemAttribute.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LedgerEntry.php b/lib/Model/LedgerEntry.php index 986794de..368fadbd 100644 --- a/lib/Model/LedgerEntry.php +++ b/lib/Model/LedgerEntry.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -299,7 +299,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -323,7 +323,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -491,7 +491,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime $expiryDate Expiry date of the points. + * @param \DateTime $expiryDate Expiration date of the points. * * @return $this */ diff --git a/lib/Model/LedgerInfo.php b/lib/Model/LedgerInfo.php index ac9e9c5f..63071308 100644 --- a/lib/Model/LedgerInfo.php +++ b/lib/Model/LedgerInfo.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -63,9 +63,9 @@ class LedgerInfo implements ModelInterface, ArrayAccess 'expiredBalance' => 'float', 'spentBalance' => 'float', 'tentativeCurrentBalance' => 'float', + 'tentativePendingBalance' => 'float', 'currentTier' => '\TalonOne\Client\Model\Tier', - 'pointsToNextTier' => 'float', - 'projection' => '\TalonOne\Client\Model\LoyaltyProjection' + 'pointsToNextTier' => 'float' ]; /** @@ -79,9 +79,9 @@ class LedgerInfo implements ModelInterface, ArrayAccess 'expiredBalance' => null, 'spentBalance' => null, 'tentativeCurrentBalance' => null, + 'tentativePendingBalance' => null, 'currentTier' => null, - 'pointsToNextTier' => null, - 'projection' => null + 'pointsToNextTier' => null ]; /** @@ -116,9 +116,9 @@ public static function openAPIFormats() 'expiredBalance' => 'expiredBalance', 'spentBalance' => 'spentBalance', 'tentativeCurrentBalance' => 'tentativeCurrentBalance', + 'tentativePendingBalance' => 'tentativePendingBalance', 'currentTier' => 'currentTier', - 'pointsToNextTier' => 'pointsToNextTier', - 'projection' => 'projection' + 'pointsToNextTier' => 'pointsToNextTier' ]; /** @@ -132,9 +132,9 @@ public static function openAPIFormats() 'expiredBalance' => 'setExpiredBalance', 'spentBalance' => 'setSpentBalance', 'tentativeCurrentBalance' => 'setTentativeCurrentBalance', + 'tentativePendingBalance' => 'setTentativePendingBalance', 'currentTier' => 'setCurrentTier', - 'pointsToNextTier' => 'setPointsToNextTier', - 'projection' => 'setProjection' + 'pointsToNextTier' => 'setPointsToNextTier' ]; /** @@ -148,9 +148,9 @@ public static function openAPIFormats() 'expiredBalance' => 'getExpiredBalance', 'spentBalance' => 'getSpentBalance', 'tentativeCurrentBalance' => 'getTentativeCurrentBalance', + 'tentativePendingBalance' => 'getTentativePendingBalance', 'currentTier' => 'getCurrentTier', - 'pointsToNextTier' => 'getPointsToNextTier', - 'projection' => 'getProjection' + 'pointsToNextTier' => 'getPointsToNextTier' ]; /** @@ -218,9 +218,9 @@ public function __construct(array $data = 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; + $this->container['tentativePendingBalance'] = isset($data['tentativePendingBalance']) ? $data['tentativePendingBalance'] : null; $this->container['currentTier'] = isset($data['currentTier']) ? $data['currentTier'] : null; $this->container['pointsToNextTier'] = isset($data['pointsToNextTier']) ? $data['pointsToNextTier'] : null; - $this->container['projection'] = isset($data['projection']) ? $data['projection'] : null; } /** @@ -323,7 +323,7 @@ public function getExpiredBalance() /** * Sets expiredBalance * - * @param float $expiredBalance Sum of expired points. + * @param float $expiredBalance **DEPRECATED** Value is shown as 0. * * @return $this */ @@ -347,7 +347,7 @@ public function getSpentBalance() /** * Sets spentBalance * - * @param float $spentBalance Sum of spent points. + * @param float $spentBalance **DEPRECATED** Value is shown as 0. * * @return $this */ @@ -371,7 +371,7 @@ public function getTentativeCurrentBalance() /** * Sets tentativeCurrentBalance * - * @param float $tentativeCurrentBalance Sum of currently active points, including points added and deducted in open sessions. + * @param float $tentativeCurrentBalance Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied. * * @return $this */ @@ -383,73 +383,73 @@ public function setTentativeCurrentBalance($tentativeCurrentBalance) } /** - * Gets currentTier + * Gets tentativePendingBalance * - * @return \TalonOne\Client\Model\Tier|null + * @return float|null */ - public function getCurrentTier() + public function getTentativePendingBalance() { - return $this->container['currentTier']; + return $this->container['tentativePendingBalance']; } /** - * Sets currentTier + * Sets tentativePendingBalance * - * @param \TalonOne\Client\Model\Tier|null $currentTier currentTier + * @param float|null $tentativePendingBalance Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied. * * @return $this */ - public function setCurrentTier($currentTier) + public function setTentativePendingBalance($tentativePendingBalance) { - $this->container['currentTier'] = $currentTier; + $this->container['tentativePendingBalance'] = $tentativePendingBalance; return $this; } /** - * Gets pointsToNextTier + * Gets currentTier * - * @return float|null + * @return \TalonOne\Client\Model\Tier|null */ - public function getPointsToNextTier() + public function getCurrentTier() { - return $this->container['pointsToNextTier']; + return $this->container['currentTier']; } /** - * Sets pointsToNextTier + * Sets currentTier * - * @param float|null $pointsToNextTier Points required to move up a tier. + * @param \TalonOne\Client\Model\Tier|null $currentTier currentTier * * @return $this */ - public function setPointsToNextTier($pointsToNextTier) + public function setCurrentTier($currentTier) { - $this->container['pointsToNextTier'] = $pointsToNextTier; + $this->container['currentTier'] = $currentTier; return $this; } /** - * Gets projection + * Gets pointsToNextTier * - * @return \TalonOne\Client\Model\LoyaltyProjection|null + * @return float|null */ - public function getProjection() + public function getPointsToNextTier() { - return $this->container['projection']; + return $this->container['pointsToNextTier']; } /** - * Sets projection + * Sets pointsToNextTier * - * @param \TalonOne\Client\Model\LoyaltyProjection|null $projection projection + * @param float|null $pointsToNextTier Points required to move up a tier. * * @return $this */ - public function setProjection($projection) + public function setPointsToNextTier($pointsToNextTier) { - $this->container['projection'] = $projection; + $this->container['pointsToNextTier'] = $pointsToNextTier; return $this; } diff --git a/lib/Model/LedgerTransactionLogEntryIntegrationAPI.php b/lib/Model/LedgerTransactionLogEntryIntegrationAPI.php index 6666516f..6149f3b5 100644 --- a/lib/Model/LedgerTransactionLogEntryIntegrationAPI.php +++ b/lib/Model/LedgerTransactionLogEntryIntegrationAPI.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -277,10 +277,7 @@ public function listInvalidProperties() if ($this->container['programId'] === null) { $invalidProperties[] = "'programId' can't be null"; } - if ($this->container['customerSessionId'] === null) { - $invalidProperties[] = "'customerSessionId' can't be null"; - } - if ((mb_strlen($this->container['customerSessionId']) > 255)) { + if (!is_null($this->container['customerSessionId']) && (mb_strlen($this->container['customerSessionId']) > 255)) { $invalidProperties[] = "invalid value for 'customerSessionId', the character length must be smaller than or equal to 255."; } @@ -357,7 +354,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created Date and time the loyalty card transaction occurred. + * @param \DateTime $created Date and time the loyalty transaction occurred. * * @return $this */ @@ -395,7 +392,7 @@ public function setProgramId($programId) /** * Gets customerSessionId * - * @return string + * @return string|null */ public function getCustomerSessionId() { @@ -405,13 +402,13 @@ public function getCustomerSessionId() /** * Sets customerSessionId * - * @param string $customerSessionId ID of the customer session where the transaction occurred. + * @param string|null $customerSessionId ID of the customer session where the transaction occurred. * * @return $this */ public function setCustomerSessionId($customerSessionId) { - if ((mb_strlen($customerSessionId) > 255)) { + if (!is_null($customerSessionId) && (mb_strlen($customerSessionId) > 255)) { throw new \InvalidArgumentException('invalid length for $customerSessionId when calling LedgerTransactionLogEntryIntegrationAPI., must be smaller than or equal to 255.'); } @@ -433,7 +430,7 @@ public function getType() /** * Sets type * - * @param string $type Type of transaction. Possible values are: - `addition`: Points were added. - `subtraction`: Points were subtracted. + * @param string $type Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. * * @return $this */ @@ -498,7 +495,7 @@ public function getStartDate() /** * Sets startDate * - * @param string $startDate Date when points become active. Possible values are: - `immediate`: Points are active immediately. - `timestamp value`: Points become active from the given date. + * @param string $startDate When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time. * * @return $this */ diff --git a/lib/Model/LibraryAttribute.php b/lib/Model/LibraryAttribute.php index e8e9d596..d5f5bf20 100644 --- a/lib/Model/LibraryAttribute.php +++ b/lib/Model/LibraryAttribute.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LimitConfig.php b/lib/Model/LimitConfig.php index 2e27ccfa..4dfd27c7 100644 --- a/lib/Model/LimitConfig.php +++ b/lib/Model/LimitConfig.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LimitCounter.php b/lib/Model/LimitCounter.php index 5e8c8181..f6805868 100644 --- a/lib/Model/LimitCounter.php +++ b/lib/Model/LimitCounter.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -69,7 +69,7 @@ class LimitCounter implements ModelInterface, ArrayAccess 'couponValue' => 'string', 'referralId' => 'int', 'referralValue' => 'string', - 'identifier' => 'int', + 'identifier' => 'string', 'period' => 'string', 'limit' => 'float', 'counter' => 'float' @@ -499,7 +499,7 @@ public function getCouponId() /** * Sets couponId * - * @param int|null $couponId The coupon ID for which this limit counter is used. + * @param int|null $couponId The internal coupon ID for which this limit counter is used. * * @return $this */ @@ -585,7 +585,7 @@ public function setReferralValue($referralValue) /** * Gets identifier * - * @return int|null + * @return string|null */ public function getIdentifier() { @@ -595,7 +595,7 @@ public function getIdentifier() /** * Sets identifier * - * @param int|null $identifier The arbitrary identifier for which this limit counter is used. + * @param string|null $identifier The arbitrary identifier for which this limit counter is used. * * @return $this */ diff --git a/lib/Model/LoginParams.php b/lib/Model/LoginParams.php index e2574216..2232a61c 100644 --- a/lib/Model/LoginParams.php +++ b/lib/Model/LoginParams.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Loyalty.php b/lib/Model/Loyalty.php index 0fbe2248..f4b22a04 100644 --- a/lib/Model/Loyalty.php +++ b/lib/Model/Loyalty.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyBalance.php b/lib/Model/LoyaltyBalance.php index 2114acad..a3e0316e 100644 --- a/lib/Model/LoyaltyBalance.php +++ b/lib/Model/LoyaltyBalance.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyBalances.php b/lib/Model/LoyaltyBalances.php index 1b7ce81d..fb2a29cd 100644 --- a/lib/Model/LoyaltyBalances.php +++ b/lib/Model/LoyaltyBalances.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyCard.php b/lib/Model/LoyaltyCard.php index 1c3a1e84..5b28cc45 100644 --- a/lib/Model/LoyaltyCard.php +++ b/lib/Model/LoyaltyCard.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -67,7 +67,9 @@ class LoyaltyCard implements ModelInterface, ArrayAccess 'profiles' => '\TalonOne\Client\Model\LoyaltyCardProfileRegistration[]', 'ledger' => '\TalonOne\Client\Model\LedgerInfo', 'subledgers' => 'map[string,\TalonOne\Client\Model\LedgerInfo]', - 'modified' => '\DateTime' + 'modified' => '\DateTime', + 'oldCardIdentifier' => 'string', + 'newCardIdentifier' => 'string' ]; /** @@ -85,7 +87,9 @@ class LoyaltyCard implements ModelInterface, ArrayAccess 'profiles' => null, 'ledger' => null, 'subledgers' => null, - 'modified' => 'date-time' + 'modified' => 'date-time', + 'oldCardIdentifier' => null, + 'newCardIdentifier' => null ]; /** @@ -124,7 +128,9 @@ public static function openAPIFormats() 'profiles' => 'profiles', 'ledger' => 'ledger', 'subledgers' => 'subledgers', - 'modified' => 'modified' + 'modified' => 'modified', + 'oldCardIdentifier' => 'oldCardIdentifier', + 'newCardIdentifier' => 'newCardIdentifier' ]; /** @@ -142,7 +148,9 @@ public static function openAPIFormats() 'profiles' => 'setProfiles', 'ledger' => 'setLedger', 'subledgers' => 'setSubledgers', - 'modified' => 'setModified' + 'modified' => 'setModified', + 'oldCardIdentifier' => 'setOldCardIdentifier', + 'newCardIdentifier' => 'setNewCardIdentifier' ]; /** @@ -160,7 +168,9 @@ public static function openAPIFormats() 'profiles' => 'getProfiles', 'ledger' => 'getLedger', 'subledgers' => 'getSubledgers', - 'modified' => 'getModified' + 'modified' => 'getModified', + 'oldCardIdentifier' => 'getOldCardIdentifier', + 'newCardIdentifier' => 'getNewCardIdentifier' ]; /** @@ -233,6 +243,8 @@ public function __construct(array $data = null) $this->container['ledger'] = isset($data['ledger']) ? $data['ledger'] : null; $this->container['subledgers'] = isset($data['subledgers']) ? $data['subledgers'] : null; $this->container['modified'] = isset($data['modified']) ? $data['modified'] : null; + $this->container['oldCardIdentifier'] = isset($data['oldCardIdentifier']) ? $data['oldCardIdentifier'] : null; + $this->container['newCardIdentifier'] = isset($data['newCardIdentifier']) ? $data['newCardIdentifier'] : null; } /** @@ -259,6 +271,10 @@ public function listInvalidProperties() if ($this->container['identifier'] === null) { $invalidProperties[] = "'identifier' can't be null"; } + if ((mb_strlen($this->container['identifier']) > 108)) { + $invalidProperties[] = "invalid value for 'identifier', the character length must be smaller than or equal to 108."; + } + if ($this->container['usersPerCardLimit'] === null) { $invalidProperties[] = "'usersPerCardLimit' can't be null"; } @@ -266,6 +282,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'usersPerCardLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['oldCardIdentifier']) && (mb_strlen($this->container['oldCardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'oldCardIdentifier', the character length must be smaller than or equal to 108."; + } + + if (!is_null($this->container['newCardIdentifier']) && (mb_strlen($this->container['newCardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'newCardIdentifier', the character length must be smaller than or equal to 108."; + } + return $invalidProperties; } @@ -294,7 +318,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -318,7 +342,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -366,7 +390,7 @@ public function getStatus() /** * Sets status * - * @param string $status Status of the loyalty card. Can be one of: ['active', 'disabled'] + * @param string $status Status of the loyalty card. Can be one of: ['active', 'inactive'] * * @return $this */ @@ -396,6 +420,10 @@ public function getIdentifier() */ public function setIdentifier($identifier) { + if ((mb_strlen($identifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $identifier when calling LoyaltyCard., must be smaller than or equal to 108.'); + } + $this->container['identifier'] = $identifier; return $this; @@ -414,7 +442,7 @@ public function getUsersPerCardLimit() /** * Sets usersPerCardLimit * - * @param int $usersPerCardLimit The max amount of user profiles a card can be shared with. 0 means unlimited. + * @param int $usersPerCardLimit The max amount of customer profiles that can be linked to the card. 0 means unlimited. * * @return $this */ @@ -443,7 +471,7 @@ public function getProfiles() /** * Sets profiles * - * @param \TalonOne\Client\Model\LoyaltyCardProfileRegistration[]|null $profiles Integration IDs of the customers associated with the card. + * @param \TalonOne\Client\Model\LoyaltyCardProfileRegistration[]|null $profiles Integration IDs of the customers profiles linked to the card. * * @return $this */ @@ -525,6 +553,62 @@ public function setModified($modified) return $this; } + + /** + * Gets oldCardIdentifier + * + * @return string|null + */ + public function getOldCardIdentifier() + { + return $this->container['oldCardIdentifier']; + } + + /** + * Sets oldCardIdentifier + * + * @param string|null $oldCardIdentifier The alphanumeric identifier of the loyalty card. + * + * @return $this + */ + public function setOldCardIdentifier($oldCardIdentifier) + { + if (!is_null($oldCardIdentifier) && (mb_strlen($oldCardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $oldCardIdentifier when calling LoyaltyCard., must be smaller than or equal to 108.'); + } + + $this->container['oldCardIdentifier'] = $oldCardIdentifier; + + return $this; + } + + /** + * Gets newCardIdentifier + * + * @return string|null + */ + public function getNewCardIdentifier() + { + return $this->container['newCardIdentifier']; + } + + /** + * Sets newCardIdentifier + * + * @param string|null $newCardIdentifier The alphanumeric identifier of the loyalty card. + * + * @return $this + */ + public function setNewCardIdentifier($newCardIdentifier) + { + if (!is_null($newCardIdentifier) && (mb_strlen($newCardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $newCardIdentifier when calling LoyaltyCard., must be smaller than or equal to 108.'); + } + + $this->container['newCardIdentifier'] = $newCardIdentifier; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoyaltyCardProfileRegistration.php b/lib/Model/LoyaltyCardProfileRegistration.php index 3691e0ba..df19a564 100644 --- a/lib/Model/LoyaltyCardProfileRegistration.php +++ b/lib/Model/LoyaltyCardProfileRegistration.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -233,7 +233,7 @@ public function getIntegrationId() /** * Sets integrationId * - * @param string $integrationId Integration ID of the customer associated with the card. + * @param string $integrationId Integration ID of the customer profile linked to the card. * * @return $this */ diff --git a/lib/Model/LoyaltyCardRegistration.php b/lib/Model/LoyaltyCardRegistration.php index f9bc3700..5795d643 100644 --- a/lib/Model/LoyaltyCardRegistration.php +++ b/lib/Model/LoyaltyCardRegistration.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyDashboardData.php b/lib/Model/LoyaltyDashboardData.php index 9b6dc719..3020cac6 100644 --- a/lib/Model/LoyaltyDashboardData.php +++ b/lib/Model/LoyaltyDashboardData.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyDashboardPointsBreakdown.php b/lib/Model/LoyaltyDashboardPointsBreakdown.php index dbf3bfb4..1179f959 100644 --- a/lib/Model/LoyaltyDashboardPointsBreakdown.php +++ b/lib/Model/LoyaltyDashboardPointsBreakdown.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyLedger.php b/lib/Model/LoyaltyLedger.php index d2b9ae38..79cc157e 100644 --- a/lib/Model/LoyaltyLedger.php +++ b/lib/Model/LoyaltyLedger.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyLedgerEntry.php b/lib/Model/LoyaltyLedgerEntry.php index 7b0e650b..e6b6b896 100644 --- a/lib/Model/LoyaltyLedgerEntry.php +++ b/lib/Model/LoyaltyLedgerEntry.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -70,7 +70,8 @@ class LoyaltyLedgerEntry implements ModelInterface, ArrayAccess 'expiryDate' => '\DateTime', 'name' => 'string', 'subLedgerID' => 'string', - 'userID' => 'int' + 'userID' => 'int', + 'archived' => 'bool' ]; /** @@ -91,7 +92,8 @@ class LoyaltyLedgerEntry implements ModelInterface, ArrayAccess 'expiryDate' => 'date-time', 'name' => null, 'subLedgerID' => null, - 'userID' => null + 'userID' => null, + 'archived' => null ]; /** @@ -133,7 +135,8 @@ public static function openAPIFormats() 'expiryDate' => 'expiryDate', 'name' => 'name', 'subLedgerID' => 'subLedgerID', - 'userID' => 'userID' + 'userID' => 'userID', + 'archived' => 'archived' ]; /** @@ -154,7 +157,8 @@ public static function openAPIFormats() 'expiryDate' => 'setExpiryDate', 'name' => 'setName', 'subLedgerID' => 'setSubLedgerID', - 'userID' => 'setUserID' + 'userID' => 'setUserID', + 'archived' => 'setArchived' ]; /** @@ -175,7 +179,8 @@ public static function openAPIFormats() 'expiryDate' => 'getExpiryDate', 'name' => 'getName', 'subLedgerID' => 'getSubLedgerID', - 'userID' => 'getUserID' + 'userID' => 'getUserID', + 'archived' => 'getArchived' ]; /** @@ -251,6 +256,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['subLedgerID'] = isset($data['subLedgerID']) ? $data['subLedgerID'] : null; $this->container['userID'] = isset($data['userID']) ? $data['userID'] : null; + $this->container['archived'] = isset($data['archived']) ? $data['archived'] : null; } /** @@ -452,7 +458,7 @@ public function getType() /** * Sets type * - * @param string $type The type of the ledger transaction. Possible values are addition, subtraction, expire or expiring (for expiring points ledgers) + * @param string $type The type of the ledger transaction. Possible values are: - `addition` - `subtraction` - `expire` - `expiring` (for expiring points ledgers) * * @return $this */ @@ -606,6 +612,30 @@ public function setUserID($userID) return $this; } + + /** + * Gets archived + * + * @return bool|null + */ + public function getArchived() + { + return $this->container['archived']; + } + + /** + * Sets archived + * + * @param bool|null $archived Indicates if the entry belongs to the archived session. + * + * @return $this + */ + public function setArchived($archived) + { + $this->container['archived'] = $archived; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoyaltyLedgerTransactions.php b/lib/Model/LoyaltyLedgerTransactions.php index 44590a24..1b0abe46 100644 --- a/lib/Model/LoyaltyLedgerTransactions.php +++ b/lib/Model/LoyaltyLedgerTransactions.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyMembership.php b/lib/Model/LoyaltyMembership.php index 2fbbaa01..6b097d95 100644 --- a/lib/Model/LoyaltyMembership.php +++ b/lib/Model/LoyaltyMembership.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyProgram.php b/lib/Model/LoyaltyProgram.php index 31b9ad97..abc80392 100644 --- a/lib/Model/LoyaltyProgram.php +++ b/lib/Model/LoyaltyProgram.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -67,6 +67,7 @@ class LoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => 'string', 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', + 'sandbox' => 'bool', 'accountID' => 'int', 'name' => 'string', 'tiers' => '\TalonOne\Client\Model\LoyaltyTier[]', @@ -89,6 +90,7 @@ class LoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => null, 'allowSubledger' => null, 'usersPerCardLimit' => null, + 'sandbox' => null, 'accountID' => null, 'name' => null, 'tiers' => null, @@ -132,6 +134,7 @@ public static function openAPIFormats() 'defaultPending' => 'defaultPending', 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', + 'sandbox' => 'sandbox', 'accountID' => 'accountID', 'name' => 'name', 'tiers' => 'tiers', @@ -154,6 +157,7 @@ public static function openAPIFormats() 'defaultPending' => 'setDefaultPending', 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', + 'sandbox' => 'setSandbox', 'accountID' => 'setAccountID', 'name' => 'setName', 'tiers' => 'setTiers', @@ -176,6 +180,7 @@ public static function openAPIFormats() 'defaultPending' => 'getDefaultPending', 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', + 'sandbox' => 'getSandbox', 'accountID' => 'getAccountID', 'name' => 'getName', 'tiers' => 'getTiers', @@ -252,6 +257,7 @@ public function __construct(array $data = null) $this->container['defaultPending'] = isset($data['defaultPending']) ? $data['defaultPending'] : null; $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['accountID'] = isset($data['accountID']) ? $data['accountID'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['tiers'] = isset($data['tiers']) ? $data['tiers'] : null; @@ -296,6 +302,9 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'usersPerCardLimit', must be bigger than or equal to 0."; } + if ($this->container['sandbox'] === null) { + $invalidProperties[] = "'sandbox' can't be null"; + } if ($this->container['accountID'] === null) { $invalidProperties[] = "'accountID' can't be null"; } @@ -340,7 +349,7 @@ public function getId() /** * Sets id * - * @param int $id The ID of loyalty program. Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id The ID of loyalty program. Internal ID of this entity. * * @return $this */ @@ -364,7 +373,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -460,7 +469,7 @@ public function getDefaultValidity() /** * Sets defaultValidity * - * @param string $defaultValidity Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. + * @param string $defaultValidity The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -484,7 +493,7 @@ public function getDefaultPending() /** * Sets defaultPending * - * @param string $defaultPending Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. + * @param string $defaultPending The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -548,6 +557,30 @@ public function setUsersPerCardLimit($usersPerCardLimit) return $this; } + /** + * Gets sandbox + * + * @return bool + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool $sandbox Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } + /** * Gets accountID * diff --git a/lib/Model/LoyaltyProgramBalance.php b/lib/Model/LoyaltyProgramBalance.php index 6928d93f..49405f4f 100644 --- a/lib/Model/LoyaltyProgramBalance.php +++ b/lib/Model/LoyaltyProgramBalance.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -62,7 +62,8 @@ class LoyaltyProgramBalance implements ModelInterface, ArrayAccess 'pendingBalance' => 'float', 'expiredBalance' => 'float', 'spentBalance' => 'float', - 'tentativeCurrentBalance' => 'float' + 'tentativeCurrentBalance' => 'float', + 'tentativePendingBalance' => 'float' ]; /** @@ -75,7 +76,8 @@ class LoyaltyProgramBalance implements ModelInterface, ArrayAccess 'pendingBalance' => null, 'expiredBalance' => null, 'spentBalance' => null, - 'tentativeCurrentBalance' => null + 'tentativeCurrentBalance' => null, + 'tentativePendingBalance' => null ]; /** @@ -109,7 +111,8 @@ public static function openAPIFormats() 'pendingBalance' => 'pendingBalance', 'expiredBalance' => 'expiredBalance', 'spentBalance' => 'spentBalance', - 'tentativeCurrentBalance' => 'tentativeCurrentBalance' + 'tentativeCurrentBalance' => 'tentativeCurrentBalance', + 'tentativePendingBalance' => 'tentativePendingBalance' ]; /** @@ -122,7 +125,8 @@ public static function openAPIFormats() 'pendingBalance' => 'setPendingBalance', 'expiredBalance' => 'setExpiredBalance', 'spentBalance' => 'setSpentBalance', - 'tentativeCurrentBalance' => 'setTentativeCurrentBalance' + 'tentativeCurrentBalance' => 'setTentativeCurrentBalance', + 'tentativePendingBalance' => 'setTentativePendingBalance' ]; /** @@ -135,7 +139,8 @@ public static function openAPIFormats() 'pendingBalance' => 'getPendingBalance', 'expiredBalance' => 'getExpiredBalance', 'spentBalance' => 'getSpentBalance', - 'tentativeCurrentBalance' => 'getTentativeCurrentBalance' + 'tentativeCurrentBalance' => 'getTentativeCurrentBalance', + 'tentativePendingBalance' => 'getTentativePendingBalance' ]; /** @@ -203,6 +208,7 @@ public function __construct(array $data = 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; + $this->container['tentativePendingBalance'] = isset($data['tentativePendingBalance']) ? $data['tentativePendingBalance'] : null; } /** @@ -305,7 +311,7 @@ public function getExpiredBalance() /** * Sets expiredBalance * - * @param float $expiredBalance Sum of expired points. + * @param float $expiredBalance **DEPRECATED** Value is shown as 0. * * @return $this */ @@ -329,7 +335,7 @@ public function getSpentBalance() /** * Sets spentBalance * - * @param float $spentBalance Sum of spent points. + * @param float $spentBalance **DEPRECATED** Value is shown as 0. * * @return $this */ @@ -353,7 +359,7 @@ public function getTentativeCurrentBalance() /** * Sets tentativeCurrentBalance * - * @param float $tentativeCurrentBalance Sum of currently active points, including points added and deducted in open sessions. + * @param float $tentativeCurrentBalance Sum of the tentative active points (including additions and deductions) inside the currently open session. The `currentBalance` is updated to this value when you close the session, and the effects are applied. * * @return $this */ @@ -363,6 +369,30 @@ public function setTentativeCurrentBalance($tentativeCurrentBalance) return $this; } + + /** + * Gets tentativePendingBalance + * + * @return float|null + */ + public function getTentativePendingBalance() + { + return $this->container['tentativePendingBalance']; + } + + /** + * Sets tentativePendingBalance + * + * @param float|null $tentativePendingBalance Sum of pending points (including additions and deductions) inside the currently open session. The `pendingBalance` is updated to this value when you close the session, and the effects are applied. + * + * @return $this + */ + public function setTentativePendingBalance($tentativePendingBalance) + { + $this->container['tentativePendingBalance'] = $tentativePendingBalance; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/LoyaltyProgramEntity.php b/lib/Model/LoyaltyProgramEntity.php index 991de007..40d44d02 100644 --- a/lib/Model/LoyaltyProgramEntity.php +++ b/lib/Model/LoyaltyProgramEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyProgramLedgers.php b/lib/Model/LoyaltyProgramLedgers.php index f981ce5d..8a372443 100644 --- a/lib/Model/LoyaltyProgramLedgers.php +++ b/lib/Model/LoyaltyProgramLedgers.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyProgramTransaction.php b/lib/Model/LoyaltyProgramTransaction.php new file mode 100644 index 00000000..2058b257 --- /dev/null +++ b/lib/Model/LoyaltyProgramTransaction.php @@ -0,0 +1,902 @@ + 'int', + 'programId' => 'int', + 'created' => '\DateTime', + 'type' => 'string', + 'amount' => 'float', + 'name' => 'string', + 'startDate' => 'string', + 'expiryDate' => 'string', + 'customerProfileId' => 'string', + 'cardIdentifier' => 'string', + 'subledgerId' => 'string', + 'customerSessionId' => 'string', + 'importId' => 'int', + 'userId' => 'int', + 'userEmail' => 'string', + 'rulesetId' => 'int', + 'ruleName' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'programId' => null, + 'created' => 'date-time', + 'type' => null, + 'amount' => null, + 'name' => null, + 'startDate' => null, + 'expiryDate' => null, + 'customerProfileId' => null, + 'cardIdentifier' => null, + 'subledgerId' => null, + 'customerSessionId' => null, + 'importId' => null, + 'userId' => null, + 'userEmail' => null, + 'rulesetId' => null, + 'ruleName' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'programId' => 'programId', + 'created' => 'created', + 'type' => 'type', + 'amount' => 'amount', + 'name' => 'name', + 'startDate' => 'startDate', + 'expiryDate' => 'expiryDate', + 'customerProfileId' => 'customerProfileId', + 'cardIdentifier' => 'cardIdentifier', + 'subledgerId' => 'subledgerId', + 'customerSessionId' => 'customerSessionId', + 'importId' => 'importId', + 'userId' => 'userId', + 'userEmail' => 'userEmail', + 'rulesetId' => 'rulesetId', + 'ruleName' => 'ruleName' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'programId' => 'setProgramId', + 'created' => 'setCreated', + 'type' => 'setType', + 'amount' => 'setAmount', + 'name' => 'setName', + 'startDate' => 'setStartDate', + 'expiryDate' => 'setExpiryDate', + 'customerProfileId' => 'setCustomerProfileId', + 'cardIdentifier' => 'setCardIdentifier', + 'subledgerId' => 'setSubledgerId', + 'customerSessionId' => 'setCustomerSessionId', + 'importId' => 'setImportId', + 'userId' => 'setUserId', + 'userEmail' => 'setUserEmail', + 'rulesetId' => 'setRulesetId', + 'ruleName' => 'setRuleName' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'programId' => 'getProgramId', + 'created' => 'getCreated', + 'type' => 'getType', + 'amount' => 'getAmount', + 'name' => 'getName', + 'startDate' => 'getStartDate', + 'expiryDate' => 'getExpiryDate', + 'customerProfileId' => 'getCustomerProfileId', + 'cardIdentifier' => 'getCardIdentifier', + 'subledgerId' => 'getSubledgerId', + 'customerSessionId' => 'getCustomerSessionId', + 'importId' => 'getImportId', + 'userId' => 'getUserId', + 'userEmail' => 'getUserEmail', + 'rulesetId' => 'getRulesetId', + 'ruleName' => 'getRuleName' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const TYPE_ADDITION = 'addition'; + const TYPE_SUBTRACTION = 'subtraction'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_ADDITION, + self::TYPE_SUBTRACTION, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['programId'] = isset($data['programId']) ? $data['programId'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; + $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; + $this->container['customerProfileId'] = isset($data['customerProfileId']) ? $data['customerProfileId'] : null; + $this->container['cardIdentifier'] = isset($data['cardIdentifier']) ? $data['cardIdentifier'] : null; + $this->container['subledgerId'] = isset($data['subledgerId']) ? $data['subledgerId'] : null; + $this->container['customerSessionId'] = isset($data['customerSessionId']) ? $data['customerSessionId'] : null; + $this->container['importId'] = isset($data['importId']) ? $data['importId'] : null; + $this->container['userId'] = isset($data['userId']) ? $data['userId'] : null; + $this->container['userEmail'] = isset($data['userEmail']) ? $data['userEmail'] : null; + $this->container['rulesetId'] = isset($data['rulesetId']) ? $data['rulesetId'] : null; + $this->container['ruleName'] = isset($data['ruleName']) ? $data['ruleName'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['programId'] === null) { + $invalidProperties[] = "'programId' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ((mb_strlen($this->container['type']) > 255)) { + $invalidProperties[] = "invalid value for 'type', the character length must be smaller than or equal to 255."; + } + + if ($this->container['amount'] === null) { + $invalidProperties[] = "'amount' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 255)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 255."; + } + + if ($this->container['startDate'] === null) { + $invalidProperties[] = "'startDate' can't be null"; + } + if ((mb_strlen($this->container['startDate']) > 64)) { + $invalidProperties[] = "invalid value for 'startDate', the character length must be smaller than or equal to 64."; + } + + if ($this->container['expiryDate'] === null) { + $invalidProperties[] = "'expiryDate' can't be null"; + } + if (!is_null($this->container['customerProfileId']) && (mb_strlen($this->container['customerProfileId']) > 255)) { + $invalidProperties[] = "invalid value for 'customerProfileId', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['cardIdentifier']) && (mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; + } + + if ($this->container['subledgerId'] === null) { + $invalidProperties[] = "'subledgerId' can't be null"; + } + if ((mb_strlen($this->container['subledgerId']) > 64)) { + $invalidProperties[] = "invalid value for 'subledgerId', the character length must be smaller than or equal to 64."; + } + + if (!is_null($this->container['customerSessionId']) && (mb_strlen($this->container['customerSessionId']) > 255)) { + $invalidProperties[] = "invalid value for 'customerSessionId', the character length must be smaller than or equal to 255."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id ID of the loyalty ledger transaction. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets programId + * + * @return int + */ + public function getProgramId() + { + return $this->container['programId']; + } + + /** + * Sets programId + * + * @param int $programId ID of the loyalty program. + * + * @return $this + */ + public function setProgramId($programId) + { + $this->container['programId'] = $programId; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created Date and time the loyalty transaction occurred. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + if ((mb_strlen($type) > 255)) { + throw new \InvalidArgumentException('invalid length for $type when calling LoyaltyProgramTransaction., must be smaller than or equal to 255.'); + } + + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets amount + * + * @return float + */ + public function getAmount() + { + return $this->container['amount']; + } + + /** + * Sets amount + * + * @param float $amount Amount of loyalty points added or deducted in the transaction. + * + * @return $this + */ + public function setAmount($amount) + { + $this->container['amount'] = $amount; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name or reason for the loyalty ledger transaction. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 255)) { + throw new \InvalidArgumentException('invalid length for $name when calling LoyaltyProgramTransaction., must be smaller than or equal to 255.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets startDate + * + * @return string + */ + public function getStartDate() + { + return $this->container['startDate']; + } + + /** + * Sets startDate + * + * @param string $startDate When points become active. Possible values: - `immediate`: Points are immediately active. - a timestamp value: Points become active at a given date and time. + * + * @return $this + */ + public function setStartDate($startDate) + { + if ((mb_strlen($startDate) > 64)) { + throw new \InvalidArgumentException('invalid length for $startDate when calling LoyaltyProgramTransaction., must be smaller than or equal to 64.'); + } + + $this->container['startDate'] = $startDate; + + return $this; + } + + /** + * Gets expiryDate + * + * @return string + */ + public function getExpiryDate() + { + return $this->container['expiryDate']; + } + + /** + * Sets expiryDate + * + * @param string $expiryDate When points expire. Possible values: - `unlimited`: Points have no expiration date. - a timestamp value: Points expire at a given date and time. + * + * @return $this + */ + public function setExpiryDate($expiryDate) + { + $this->container['expiryDate'] = $expiryDate; + + return $this; + } + + /** + * Gets customerProfileId + * + * @return string|null + */ + public function getCustomerProfileId() + { + return $this->container['customerProfileId']; + } + + /** + * Sets customerProfileId + * + * @param string|null $customerProfileId Customer profile integration ID used in the loyalty program. + * + * @return $this + */ + public function setCustomerProfileId($customerProfileId) + { + if (!is_null($customerProfileId) && (mb_strlen($customerProfileId) > 255)) { + throw new \InvalidArgumentException('invalid length for $customerProfileId when calling LoyaltyProgramTransaction., must be smaller than or equal to 255.'); + } + + $this->container['customerProfileId'] = $customerProfileId; + + return $this; + } + + /** + * Gets cardIdentifier + * + * @return string|null + */ + public function getCardIdentifier() + { + return $this->container['cardIdentifier']; + } + + /** + * Sets cardIdentifier + * + * @param string|null $cardIdentifier The alphanumeric identifier of the loyalty card. + * + * @return $this + */ + public function setCardIdentifier($cardIdentifier) + { + if (!is_null($cardIdentifier) && (mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling LoyaltyProgramTransaction., must be smaller than or equal to 108.'); + } + + $this->container['cardIdentifier'] = $cardIdentifier; + + return $this; + } + + /** + * Gets subledgerId + * + * @return string + */ + public function getSubledgerId() + { + return $this->container['subledgerId']; + } + + /** + * Sets subledgerId + * + * @param string $subledgerId ID of the subledger. + * + * @return $this + */ + public function setSubledgerId($subledgerId) + { + if ((mb_strlen($subledgerId) > 64)) { + throw new \InvalidArgumentException('invalid length for $subledgerId when calling LoyaltyProgramTransaction., must be smaller than or equal to 64.'); + } + + $this->container['subledgerId'] = $subledgerId; + + return $this; + } + + /** + * Gets customerSessionId + * + * @return string|null + */ + public function getCustomerSessionId() + { + return $this->container['customerSessionId']; + } + + /** + * Sets customerSessionId + * + * @param string|null $customerSessionId ID of the customer session where the transaction occurred. + * + * @return $this + */ + public function setCustomerSessionId($customerSessionId) + { + if (!is_null($customerSessionId) && (mb_strlen($customerSessionId) > 255)) { + throw new \InvalidArgumentException('invalid length for $customerSessionId when calling LoyaltyProgramTransaction., must be smaller than or equal to 255.'); + } + + $this->container['customerSessionId'] = $customerSessionId; + + return $this; + } + + /** + * Gets importId + * + * @return int|null + */ + public function getImportId() + { + return $this->container['importId']; + } + + /** + * Sets importId + * + * @param int|null $importId ID of the import where the transaction occurred. + * + * @return $this + */ + public function setImportId($importId) + { + $this->container['importId'] = $importId; + + return $this; + } + + /** + * Gets userId + * + * @return int|null + */ + public function getUserId() + { + return $this->container['userId']; + } + + /** + * Sets userId + * + * @param int|null $userId ID of the user who manually added or deducted points. Applies only for manual transactions. + * + * @return $this + */ + public function setUserId($userId) + { + $this->container['userId'] = $userId; + + return $this; + } + + /** + * Gets userEmail + * + * @return string|null + */ + public function getUserEmail() + { + return $this->container['userEmail']; + } + + /** + * Sets userEmail + * + * @param string|null $userEmail The email of the user who manually added or deducted points. Applies only for manual transactions. + * + * @return $this + */ + public function setUserEmail($userEmail) + { + $this->container['userEmail'] = $userEmail; + + return $this; + } + + /** + * Gets rulesetId + * + * @return int|null + */ + public function getRulesetId() + { + return $this->container['rulesetId']; + } + + /** + * Sets rulesetId + * + * @param int|null $rulesetId ID of the ruleset containing the rule that triggered the effect. Applies only for transactions that resulted from a customer session. + * + * @return $this + */ + public function setRulesetId($rulesetId) + { + $this->container['rulesetId'] = $rulesetId; + + return $this; + } + + /** + * Gets ruleName + * + * @return string|null + */ + public function getRuleName() + { + return $this->container['ruleName']; + } + + /** + * Sets ruleName + * + * @param string|null $ruleName Name of the rule that triggered the effect. Applies only for transactions that resulted from a customer session. + * + * @return $this + */ + public function setRuleName($ruleName) + { + $this->container['ruleName'] = $ruleName; + + 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/LoyaltyStatistics.php b/lib/Model/LoyaltyStatistics.php index a3cd3261..c58c0c3f 100644 --- a/lib/Model/LoyaltyStatistics.php +++ b/lib/Model/LoyaltyStatistics.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltySubLedger.php b/lib/Model/LoyaltySubLedger.php index cd4b1195..889329e4 100644 --- a/lib/Model/LoyaltySubLedger.php +++ b/lib/Model/LoyaltySubLedger.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/LoyaltyTier.php b/lib/Model/LoyaltyTier.php index 03788440..fd2ee90c 100644 --- a/lib/Model/LoyaltyTier.php +++ b/lib/Model/LoyaltyTier.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -265,7 +265,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -289,7 +289,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/ManagementKey.php b/lib/Model/ManagementKey.php index 556e2899..723c7aed 100644 --- a/lib/Model/ManagementKey.php +++ b/lib/Model/ManagementKey.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -61,6 +61,7 @@ class ManagementKey implements ModelInterface, ArrayAccess 'name' => 'string', 'expiryDate' => '\DateTime', 'endpoints' => '\TalonOne\Client\Model\Endpoint[]', + 'allowedApplicationIds' => 'int[]', 'id' => 'int', 'createdBy' => 'int', 'accountID' => 'int', @@ -76,6 +77,7 @@ class ManagementKey implements ModelInterface, ArrayAccess 'name' => null, 'expiryDate' => 'date-time', 'endpoints' => null, + 'allowedApplicationIds' => null, 'id' => null, 'createdBy' => null, 'accountID' => null, @@ -112,6 +114,7 @@ public static function openAPIFormats() 'name' => 'name', 'expiryDate' => 'expiryDate', 'endpoints' => 'endpoints', + 'allowedApplicationIds' => 'allowedApplicationIds', 'id' => 'id', 'createdBy' => 'createdBy', 'accountID' => 'accountID', @@ -127,6 +130,7 @@ public static function openAPIFormats() 'name' => 'setName', 'expiryDate' => 'setExpiryDate', 'endpoints' => 'setEndpoints', + 'allowedApplicationIds' => 'setAllowedApplicationIds', 'id' => 'setId', 'createdBy' => 'setCreatedBy', 'accountID' => 'setAccountID', @@ -142,6 +146,7 @@ public static function openAPIFormats() 'name' => 'getName', 'expiryDate' => 'getExpiryDate', 'endpoints' => 'getEndpoints', + 'allowedApplicationIds' => 'getAllowedApplicationIds', 'id' => 'getId', 'createdBy' => 'getCreatedBy', 'accountID' => 'getAccountID', @@ -211,6 +216,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['endpoints'] = isset($data['endpoints']) ? $data['endpoints'] : null; + $this->container['allowedApplicationIds'] = isset($data['allowedApplicationIds']) ? $data['allowedApplicationIds'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; $this->container['accountID'] = isset($data['accountID']) ? $data['accountID'] : null; @@ -334,6 +340,30 @@ public function setEndpoints($endpoints) return $this; } + /** + * Gets allowedApplicationIds + * + * @return int[]|null + */ + public function getAllowedApplicationIds() + { + return $this->container['allowedApplicationIds']; + } + + /** + * Sets allowedApplicationIds + * + * @param int[]|null $allowedApplicationIds A list of Application IDs that you can access with the management key. An empty or missing list means the management key can be used for all Applications in the account. + * + * @return $this + */ + public function setAllowedApplicationIds($allowedApplicationIds) + { + $this->container['allowedApplicationIds'] = $allowedApplicationIds; + + return $this; + } + /** * Gets id * diff --git a/lib/Model/ManagerConfig.php b/lib/Model/ManagerConfig.php index 200eebff..77fbd4ba 100644 --- a/lib/Model/ManagerConfig.php +++ b/lib/Model/ManagerConfig.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Meta.php b/lib/Model/Meta.php index f3004b2e..80708f19 100644 --- a/lib/Model/Meta.php +++ b/lib/Model/Meta.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ModelInterface.php b/lib/Model/ModelInterface.php index 2a2b0669..5be2e6c4 100644 --- a/lib/Model/ModelInterface.php +++ b/lib/Model/ModelInterface.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ModelReturn.php b/lib/Model/ModelReturn.php index 81e8d49f..dc51578f 100644 --- a/lib/Model/ModelReturn.php +++ b/lib/Model/ModelReturn.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -310,7 +310,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -334,7 +334,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/MultiApplicationEntity.php b/lib/Model/MultiApplicationEntity.php index cee1ea18..7c9fe1dd 100644 --- a/lib/Model/MultiApplicationEntity.php +++ b/lib/Model/MultiApplicationEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -220,7 +220,7 @@ public function getApplicationIds() /** * Sets applicationIds * - * @param int[] $applicationIds The IDs of the applications that are related to this entity. + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. * * @return $this */ diff --git a/lib/Model/MultipleAttribute.php b/lib/Model/MultipleAttribute.php index 7299e3a1..c23e0b9d 100644 --- a/lib/Model/MultipleAttribute.php +++ b/lib/Model/MultipleAttribute.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/MultipleAudiences.php b/lib/Model/MultipleAudiences.php index 88f30f9c..f155d480 100644 --- a/lib/Model/MultipleAudiences.php +++ b/lib/Model/MultipleAudiences.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/MultipleAudiencesItem.php b/lib/Model/MultipleAudiencesItem.php index ba917c8a..0c5a9064 100644 --- a/lib/Model/MultipleAudiencesItem.php +++ b/lib/Model/MultipleAudiencesItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -294,7 +294,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -318,7 +318,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/MultipleCustomerProfileIntegrationRequest.php b/lib/Model/MultipleCustomerProfileIntegrationRequest.php index 5b3bec53..4c94c3b5 100644 --- a/lib/Model/MultipleCustomerProfileIntegrationRequest.php +++ b/lib/Model/MultipleCustomerProfileIntegrationRequest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/MultipleCustomerProfileIntegrationRequestItem.php b/lib/Model/MultipleCustomerProfileIntegrationRequestItem.php index 1a9a774e..9c8aafe0 100644 --- a/lib/Model/MultipleCustomerProfileIntegrationRequestItem.php +++ b/lib/Model/MultipleCustomerProfileIntegrationRequestItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -255,7 +255,7 @@ public function getIntegrationId() /** * Sets integrationId * - * @param string $integrationId The identifier of this profile, set by your integration layer. It must be unique within the account. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](/integration-api/#operation/updateCustomerSessionV2). + * @param string $integrationId The identifier of this profile, set by your integration layer. It must be unique within the account. To get the `integrationId` of the profile from a `sessionId`, use the [Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2). * * @return $this */ diff --git a/lib/Model/MultipleCustomerProfileIntegrationResponseV2.php b/lib/Model/MultipleCustomerProfileIntegrationResponseV2.php index 57ac0d47..e983df6a 100644 --- a/lib/Model/MultipleCustomerProfileIntegrationResponseV2.php +++ b/lib/Model/MultipleCustomerProfileIntegrationResponseV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,7 +57,7 @@ class MultipleCustomerProfileIntegrationResponseV2 implements ModelInterface, Ar * @var string[] */ protected static $openAPITypes = [ - 'integrationStates' => '\TalonOne\Client\Model\IntegrationStateV2[]' + 'integrationStates' => '\TalonOne\Client\Model\CustomerProfileUpdateV2Response[]' ]; /** @@ -207,7 +207,7 @@ public function valid() /** * Gets integrationStates * - * @return \TalonOne\Client\Model\IntegrationStateV2[]|null + * @return \TalonOne\Client\Model\CustomerProfileUpdateV2Response[]|null */ public function getIntegrationStates() { @@ -217,7 +217,7 @@ public function getIntegrationStates() /** * Sets integrationStates * - * @param \TalonOne\Client\Model\IntegrationStateV2[]|null $integrationStates integrationStates + * @param \TalonOne\Client\Model\CustomerProfileUpdateV2Response[]|null $integrationStates integrationStates * * @return $this */ diff --git a/lib/Model/MultipleNewAttribute.php b/lib/Model/MultipleNewAttribute.php index 7712d1be..e6d4c73e 100644 --- a/lib/Model/MultipleNewAttribute.php +++ b/lib/Model/MultipleNewAttribute.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/MultipleNewAudiences.php b/lib/Model/MultipleNewAudiences.php index ba25f136..1f3df033 100644 --- a/lib/Model/MultipleNewAudiences.php +++ b/lib/Model/MultipleNewAudiences.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/MutableEntity.php b/lib/Model/MutableEntity.php index 0dff8385..dd8e984d 100644 --- a/lib/Model/MutableEntity.php +++ b/lib/Model/MutableEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -220,7 +220,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/NewAccount.php b/lib/Model/NewAccount.php index 34da8139..3b42eaa1 100644 --- a/lib/Model/NewAccount.php +++ b/lib/Model/NewAccount.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewAccountSignUp.php b/lib/Model/NewAccountSignUp.php index 44e31a27..22447da3 100644 --- a/lib/Model/NewAccountSignUp.php +++ b/lib/Model/NewAccountSignUp.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewAdditionalCost.php b/lib/Model/NewAdditionalCost.php index 68aa6317..e74c7c27 100644 --- a/lib/Model/NewAdditionalCost.php +++ b/lib/Model/NewAdditionalCost.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -284,7 +284,7 @@ public function getName() /** * Sets name * - * @param string $name The additional cost name that will be used in API requests and Talang. E.g. if `name == \"shipping\"` then you would set the shipping additional cost by including an `additionalCosts.shipping` property in your request payload. + * @param string $name The internal name used in API requests. * * @return $this */ @@ -390,7 +390,7 @@ public function getType() /** * Sets type * - * @param string|null $type The type of additional cost. The following options can be chosen: - `session`: Additional cost will be added per session, - `item`: Additional cost will be added per item, - `both`: Additional cost will be added per item and session. + * @param string|null $type The type of additional cost. Possible value: - `session`: Additional cost will be added per session. - `item`: Additional cost will be added per item. - `both`: Additional cost will be added per item and session. * * @return $this */ diff --git a/lib/Model/NewApplication.php b/lib/Model/NewApplication.php index 577f2d56..b4e73c41 100644 --- a/lib/Model/NewApplication.php +++ b/lib/Model/NewApplication.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -779,7 +779,7 @@ public function getEnableFlattenedCartItems() /** * Sets enableFlattenedCartItems * - * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). + * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). * * @return $this */ diff --git a/lib/Model/NewApplicationAPIKey.php b/lib/Model/NewApplicationAPIKey.php index 7f06ebb9..b8cad400 100644 --- a/lib/Model/NewApplicationAPIKey.php +++ b/lib/Model/NewApplicationAPIKey.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewAttribute.php b/lib/Model/NewAttribute.php index 7af5470c..d97d3e0c 100644 --- a/lib/Model/NewAttribute.php +++ b/lib/Model/NewAttribute.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewAudience.php b/lib/Model/NewAudience.php index de4386f4..19745ea3 100644 --- a/lib/Model/NewAudience.php +++ b/lib/Model/NewAudience.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -63,7 +63,8 @@ class NewAudience implements ModelInterface, ArrayAccess 'description' => 'string', 'integration' => 'string', 'integrationId' => 'string', - 'createdIn3rdParty' => 'bool' + 'createdIn3rdParty' => 'bool', + 'lastUpdate' => '\DateTime' ]; /** @@ -77,7 +78,8 @@ class NewAudience implements ModelInterface, ArrayAccess 'description' => null, 'integration' => null, 'integrationId' => null, - 'createdIn3rdParty' => null + 'createdIn3rdParty' => null, + 'lastUpdate' => 'date-time' ]; /** @@ -112,7 +114,8 @@ public static function openAPIFormats() 'description' => 'description', 'integration' => 'integration', 'integrationId' => 'integrationId', - 'createdIn3rdParty' => 'createdIn3rdParty' + 'createdIn3rdParty' => 'createdIn3rdParty', + 'lastUpdate' => 'lastUpdate' ]; /** @@ -126,7 +129,8 @@ public static function openAPIFormats() 'description' => 'setDescription', 'integration' => 'setIntegration', 'integrationId' => 'setIntegrationId', - 'createdIn3rdParty' => 'setCreatedIn3rdParty' + 'createdIn3rdParty' => 'setCreatedIn3rdParty', + 'lastUpdate' => 'setLastUpdate' ]; /** @@ -140,7 +144,8 @@ public static function openAPIFormats() 'description' => 'getDescription', 'integration' => 'getIntegration', 'integrationId' => 'getIntegrationId', - 'createdIn3rdParty' => 'getCreatedIn3rdParty' + 'createdIn3rdParty' => 'getCreatedIn3rdParty', + 'lastUpdate' => 'getLastUpdate' ]; /** @@ -209,6 +214,7 @@ public function __construct(array $data = null) $this->container['integration'] = isset($data['integration']) ? $data['integration'] : null; $this->container['integrationId'] = isset($data['integrationId']) ? $data['integrationId'] : null; $this->container['createdIn3rdParty'] = isset($data['createdIn3rdParty']) ? $data['createdIn3rdParty'] : null; + $this->container['lastUpdate'] = isset($data['lastUpdate']) ? $data['lastUpdate'] : null; } /** @@ -405,6 +411,30 @@ public function setCreatedIn3rdParty($createdIn3rdParty) return $this; } + + /** + * Gets lastUpdate + * + * @return \DateTime|null + */ + public function getLastUpdate() + { + return $this->container['lastUpdate']; + } + + /** + * Sets lastUpdate + * + * @param \DateTime|null $lastUpdate The last time that the audience memberships changed. + * + * @return $this + */ + public function setLastUpdate($lastUpdate) + { + $this->container['lastUpdate'] = $lastUpdate; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewBaseNotification.php b/lib/Model/NewBaseNotification.php new file mode 100644 index 00000000..2a65e37b --- /dev/null +++ b/lib/Model/NewBaseNotification.php @@ -0,0 +1,344 @@ + 'object', + 'webhook' => '\TalonOne\Client\Model\NewNotificationWebhook' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'policy' => null, + 'webhook' => 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 = [ + 'policy' => 'policy', + 'webhook' => 'webhook' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'policy' => 'setPolicy', + 'webhook' => 'setWebhook' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'policy' => 'getPolicy', + 'webhook' => 'getWebhook' + ]; + + /** + * 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['policy'] = isset($data['policy']) ? $data['policy'] : null; + $this->container['webhook'] = isset($data['webhook']) ? $data['webhook'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['policy'] === null) { + $invalidProperties[] = "'policy' can't be null"; + } + if ($this->container['webhook'] === null) { + $invalidProperties[] = "'webhook' 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 policy + * + * @return object + */ + public function getPolicy() + { + return $this->container['policy']; + } + + /** + * Sets policy + * + * @param object $policy policy + * + * @return $this + */ + public function setPolicy($policy) + { + $this->container['policy'] = $policy; + + return $this; + } + + /** + * Gets webhook + * + * @return \TalonOne\Client\Model\NewNotificationWebhook + */ + public function getWebhook() + { + return $this->container['webhook']; + } + + /** + * Sets webhook + * + * @param \TalonOne\Client\Model\NewNotificationWebhook $webhook webhook + * + * @return $this + */ + public function setWebhook($webhook) + { + $this->container['webhook'] = $webhook; + + 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/NewCampaign.php b/lib/Model/NewCampaign.php index dc85f930..83858a14 100644 --- a/lib/Model/NewCampaign.php +++ b/lib/Model/NewCampaign.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -225,6 +225,7 @@ public function getModelName() const FEATURES_REFERRALS = 'referrals'; const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; @@ -254,6 +255,7 @@ public function getFeaturesAllowableValues() self::FEATURES_REFERRALS, self::FEATURES_LOYALTY, self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, ]; } @@ -510,7 +512,7 @@ public function getActiveRulesetId() /** * Sets activeRulesetId * - * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api/#operation/getRulesets) this campaign applies on customer session evaluation. + * @param int|null $activeRulesetId [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. * * @return $this */ @@ -639,7 +641,7 @@ public function getLimits() /** * Sets limits * - * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/) for this campaign. + * @param \TalonOne\Client\Model\LimitConfig[] $limits The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. * * @return $this */ @@ -663,7 +665,7 @@ public function getCampaignGroups() /** * Sets campaignGroups * - * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this campaign belongs to. + * @param int[]|null $campaignGroups The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. * * @return $this */ diff --git a/lib/Model/NewCampaignCollection.php b/lib/Model/NewCampaignCollection.php index 43059aed..ce1b7324 100644 --- a/lib/Model/NewCampaignCollection.php +++ b/lib/Model/NewCampaignCollection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCampaignGroup.php b/lib/Model/NewCampaignGroup.php index 0a63e0b7..0d8d8df9 100644 --- a/lib/Model/NewCampaignGroup.php +++ b/lib/Model/NewCampaignGroup.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCampaignSet.php b/lib/Model/NewCampaignSet.php index 5d362937..da2c4bf7 100644 --- a/lib/Model/NewCampaignSet.php +++ b/lib/Model/NewCampaignSet.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCampaignSetV2.php b/lib/Model/NewCampaignSetV2.php index dd2db1bb..53ec56a2 100644 --- a/lib/Model/NewCampaignSetV2.php +++ b/lib/Model/NewCampaignSetV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCampaignTemplate.php b/lib/Model/NewCampaignTemplate.php index fa9f761f..cbe70c57 100644 --- a/lib/Model/NewCampaignTemplate.php +++ b/lib/Model/NewCampaignTemplate.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -230,6 +230,7 @@ public function getModelName() const FEATURES_REFERRALS = 'referrals'; const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; @@ -259,6 +260,7 @@ public function getFeaturesAllowableValues() self::FEATURES_REFERRALS, self::FEATURES_LOYALTY, self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, ]; } @@ -432,7 +434,7 @@ public function getCampaignAttributes() /** * Sets campaignAttributes * - * @param object|null $campaignAttributes The Campaign Attributes that Campaigns created from this template will have by default. + * @param object|null $campaignAttributes The campaign attributes that campaigns created from this template will have by default. * * @return $this */ @@ -456,7 +458,7 @@ public function getCouponAttributes() /** * Sets couponAttributes * - * @param object|null $couponAttributes The Campaign Attributes that Coupons created from this template will have by default. + * @param object|null $couponAttributes The campaign attributes that coupons created from this template will have by default. * * @return $this */ @@ -642,7 +644,7 @@ public function getTemplateParams() /** * Sets templateParams * - * @param \TalonOne\Client\Model\CampaignTemplateParams[]|null $templateParams Template parameters are fields which can be used to replace values in a rule. + * @param \TalonOne\Client\Model\CampaignTemplateParams[]|null $templateParams Fields which can be used to replace values in a rule. * * @return $this */ @@ -690,7 +692,7 @@ public function getDefaultCampaignGroupId() /** * Sets defaultCampaignGroupId * - * @param int|null $defaultCampaignGroupId The default campaignGroupId. + * @param int|null $defaultCampaignGroupId The default campaign group ID. * * @return $this */ diff --git a/lib/Model/NewCatalog.php b/lib/Model/NewCatalog.php index 5231a95f..14462ed2 100644 --- a/lib/Model/NewCatalog.php +++ b/lib/Model/NewCatalog.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCollection.php b/lib/Model/NewCollection.php index 1cccec78..56c99180 100644 --- a/lib/Model/NewCollection.php +++ b/lib/Model/NewCollection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCouponCreationJob.php b/lib/Model/NewCouponCreationJob.php index 430301bb..73564a7a 100644 --- a/lib/Model/NewCouponCreationJob.php +++ b/lib/Model/NewCouponCreationJob.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,6 +60,7 @@ class NewCouponCreationJob implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'numberOfCoupons' => 'int', @@ -75,6 +76,7 @@ class NewCouponCreationJob implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'numberOfCoupons' => null, @@ -111,6 +113,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'numberOfCoupons' => 'numberOfCoupons', @@ -126,6 +129,7 @@ public static function openAPIFormats() protected static $setters = [ 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'numberOfCoupons' => 'setNumberOfCoupons', @@ -141,6 +145,7 @@ public static function openAPIFormats() protected static $getters = [ 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'numberOfCoupons' => 'getNumberOfCoupons', @@ -210,6 +215,7 @@ 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['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['numberOfCoupons'] = isset($data['numberOfCoupons']) ? $data['numberOfCoupons'] : null; @@ -245,6 +251,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if ($this->container['numberOfCoupons'] === null) { $invalidProperties[] = "'numberOfCoupons' can't be null"; } @@ -252,6 +266,10 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'numberOfCoupons', must be smaller than or equal to 5000000."; } + if (($this->container['numberOfCoupons'] < 1)) { + $invalidProperties[] = "invalid value for 'numberOfCoupons', must be bigger than or equal to 1."; + } + if ($this->container['attributes'] === null) { $invalidProperties[] = "'attributes' can't be null"; } @@ -315,7 +333,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -334,6 +352,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling NewCouponCreationJob., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling NewCouponCreationJob., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -371,7 +421,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ @@ -395,7 +445,7 @@ public function getNumberOfCoupons() /** * Sets numberOfCoupons * - * @param int $numberOfCoupons The number of new coupon codes to generate for the campaign. Must be between 20,001 and 5,000,000. + * @param int $numberOfCoupons The number of new coupon codes to generate for the campaign. * * @return $this */ @@ -405,6 +455,9 @@ public function setNumberOfCoupons($numberOfCoupons) if (($numberOfCoupons > 5000000)) { throw new \InvalidArgumentException('invalid value for $numberOfCoupons when calling NewCouponCreationJob., must be smaller than or equal to 5000000.'); } + if (($numberOfCoupons < 1)) { + throw new \InvalidArgumentException('invalid value for $numberOfCoupons when calling NewCouponCreationJob., must be bigger than or equal to 1.'); + } $this->container['numberOfCoupons'] = $numberOfCoupons; diff --git a/lib/Model/NewCoupons.php b/lib/Model/NewCoupons.php index fcf12e71..fa25d8cf 100644 --- a/lib/Model/NewCoupons.php +++ b/lib/Model/NewCoupons.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,6 +60,7 @@ class NewCoupons implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', @@ -68,7 +69,8 @@ class NewCoupons implements ModelInterface, ArrayAccess 'attributes' => 'object', 'recipientIntegrationId' => 'string', 'validCharacters' => 'string[]', - 'couponPattern' => 'string' + 'couponPattern' => 'string', + 'isReservationMandatory' => 'bool' ]; /** @@ -79,6 +81,7 @@ class NewCoupons implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'limits' => null, @@ -87,7 +90,8 @@ class NewCoupons implements ModelInterface, ArrayAccess 'attributes' => null, 'recipientIntegrationId' => null, 'validCharacters' => null, - 'couponPattern' => null + 'couponPattern' => null, + 'isReservationMandatory' => null ]; /** @@ -119,6 +123,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'limits' => 'limits', @@ -127,7 +132,8 @@ public static function openAPIFormats() 'attributes' => 'attributes', 'recipientIntegrationId' => 'recipientIntegrationId', 'validCharacters' => 'validCharacters', - 'couponPattern' => 'couponPattern' + 'couponPattern' => 'couponPattern', + 'isReservationMandatory' => 'isReservationMandatory' ]; /** @@ -138,6 +144,7 @@ public static function openAPIFormats() protected static $setters = [ 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'limits' => 'setLimits', @@ -146,7 +153,8 @@ public static function openAPIFormats() 'attributes' => 'setAttributes', 'recipientIntegrationId' => 'setRecipientIntegrationId', 'validCharacters' => 'setValidCharacters', - 'couponPattern' => 'setCouponPattern' + 'couponPattern' => 'setCouponPattern', + 'isReservationMandatory' => 'setIsReservationMandatory' ]; /** @@ -157,6 +165,7 @@ public static function openAPIFormats() protected static $getters = [ 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'limits' => 'getLimits', @@ -165,7 +174,8 @@ public static function openAPIFormats() 'attributes' => 'getAttributes', 'recipientIntegrationId' => 'getRecipientIntegrationId', 'validCharacters' => 'getValidCharacters', - 'couponPattern' => 'getCouponPattern' + 'couponPattern' => 'getCouponPattern', + 'isReservationMandatory' => 'getIsReservationMandatory' ]; /** @@ -230,6 +240,7 @@ 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['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; @@ -239,6 +250,7 @@ public function __construct(array $data = 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; + $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; } /** @@ -269,6 +281,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if ($this->container['numberOfCoupons'] === null) { $invalidProperties[] = "'numberOfCoupons' can't be null"; } @@ -344,7 +364,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -363,6 +383,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling NewCoupons., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling NewCoupons., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -400,7 +452,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ @@ -472,7 +524,7 @@ public function getUniquePrefix() /** * Sets uniquePrefix * - * @param string|null $uniquePrefix **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously endpoint](https://docs.talon.one/management-api/#operation/createCouponsAsync). + * @param string|null $uniquePrefix **DEPRECATED** To create more than 20,000 coupons in one request, use [Create coupons asynchronously](https://docs.talon.one/management-api#operation/createCouponsAsync) endpoint. * * @return $this */ @@ -589,6 +641,30 @@ public function setCouponPattern($couponPattern) return $this; } + + /** + * Gets isReservationMandatory + * + * @return bool|null + */ + public function getIsReservationMandatory() + { + return $this->container['isReservationMandatory']; + } + + /** + * Sets isReservationMandatory + * + * @param bool|null $isReservationMandatory Whether the reservation effect actually created a new reservation. + * + * @return $this + */ + public function setIsReservationMandatory($isReservationMandatory) + { + $this->container['isReservationMandatory'] = $isReservationMandatory; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewCouponsForMultipleRecipients.php b/lib/Model/NewCouponsForMultipleRecipients.php index 0f11e0f1..a67332eb 100644 --- a/lib/Model/NewCouponsForMultipleRecipients.php +++ b/lib/Model/NewCouponsForMultipleRecipients.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,6 +60,7 @@ class NewCouponsForMultipleRecipients implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'attributes' => 'object', @@ -76,6 +77,7 @@ class NewCouponsForMultipleRecipients implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'attributes' => null, @@ -113,6 +115,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'attributes' => 'attributes', @@ -129,6 +132,7 @@ public static function openAPIFormats() protected static $setters = [ 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'attributes' => 'setAttributes', @@ -145,6 +149,7 @@ public static function openAPIFormats() protected static $getters = [ 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'attributes' => 'getAttributes', @@ -215,6 +220,7 @@ 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['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : 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; @@ -251,6 +257,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if ($this->container['recipientsIntegrationIds'] === null) { $invalidProperties[] = "'recipientsIntegrationIds' can't be null"; } @@ -322,7 +336,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -341,6 +355,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling NewCouponsForMultipleRecipients., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling NewCouponsForMultipleRecipients., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -378,7 +424,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/NewCustomEffect.php b/lib/Model/NewCustomEffect.php index 925fcf94..50924134 100644 --- a/lib/Model/NewCustomEffect.php +++ b/lib/Model/NewCustomEffect.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,6 +59,7 @@ class NewCustomEffect implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'applicationIds' => 'int[]', + 'isPerItem' => 'bool', 'name' => 'string', 'title' => 'string', 'payload' => 'string', @@ -74,6 +75,7 @@ class NewCustomEffect implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'applicationIds' => null, + 'isPerItem' => null, 'name' => null, 'title' => null, 'payload' => null, @@ -110,6 +112,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'applicationIds' => 'applicationIds', + 'isPerItem' => 'isPerItem', 'name' => 'name', 'title' => 'title', 'payload' => 'payload', @@ -125,6 +128,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'applicationIds' => 'setApplicationIds', + 'isPerItem' => 'setIsPerItem', 'name' => 'setName', 'title' => 'setTitle', 'payload' => 'setPayload', @@ -140,6 +144,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'applicationIds' => 'getApplicationIds', + 'isPerItem' => 'getIsPerItem', 'name' => 'getName', 'title' => 'getTitle', 'payload' => 'getPayload', @@ -209,6 +214,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['applicationIds'] = isset($data['applicationIds']) ? $data['applicationIds'] : null; + $this->container['isPerItem'] = isset($data['isPerItem']) ? $data['isPerItem'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['title'] = isset($data['title']) ? $data['title'] : null; $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; @@ -277,7 +283,7 @@ public function getApplicationIds() /** * Sets applicationIds * - * @param int[] $applicationIds The IDs of the applications that are related to this entity. + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. * * @return $this */ @@ -288,6 +294,30 @@ public function setApplicationIds($applicationIds) return $this; } + /** + * Gets isPerItem + * + * @return bool|null + */ + public function getIsPerItem() + { + return $this->container['isPerItem']; + } + + /** + * Sets isPerItem + * + * @param bool|null $isPerItem Indicates if this effect is per item or not. + * + * @return $this + */ + public function setIsPerItem($isPerItem) + { + $this->container['isPerItem'] = $isPerItem; + + return $this; + } + /** * Gets name * diff --git a/lib/Model/NewCustomerProfile.php b/lib/Model/NewCustomerProfile.php index ad196d45..a596daf6 100644 --- a/lib/Model/NewCustomerProfile.php +++ b/lib/Model/NewCustomerProfile.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewCustomerSession.php b/lib/Model/NewCustomerSession.php index 0827b3c2..61436e27 100644 --- a/lib/Model/NewCustomerSession.php +++ b/lib/Model/NewCustomerSession.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -375,7 +375,7 @@ public function getState() /** * Sets state * - * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). + * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. `closed` → `cancelled` or `partially_returned` 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). * * @return $this */ @@ -432,7 +432,7 @@ public function getIdentifiers() /** * Sets identifiers * - * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). + * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). * * @return $this */ diff --git a/lib/Model/NewCustomerSessionV2.php b/lib/Model/NewCustomerSessionV2.php index a931058c..45f33b6d 100644 --- a/lib/Model/NewCustomerSessionV2.php +++ b/lib/Model/NewCustomerSessionV2.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -36,7 +36,7 @@ * NewCustomerSessionV2 Class Doc Comment * * @category Class - * @description + * @description The representation of the customer session. * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -59,6 +59,7 @@ class NewCustomerSessionV2 implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'profileId' => 'string', + 'evaluableCampaignIds' => 'int[]', 'couponCodes' => 'string[]', 'referralCode' => 'string', 'loyaltyCards' => 'string[]', @@ -76,6 +77,7 @@ class NewCustomerSessionV2 implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'profileId' => null, + 'evaluableCampaignIds' => null, 'couponCodes' => null, 'referralCode' => null, 'loyaltyCards' => null, @@ -114,6 +116,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'profileId' => 'profileId', + 'evaluableCampaignIds' => 'evaluableCampaignIds', 'couponCodes' => 'couponCodes', 'referralCode' => 'referralCode', 'loyaltyCards' => 'loyaltyCards', @@ -131,6 +134,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'profileId' => 'setProfileId', + 'evaluableCampaignIds' => 'setEvaluableCampaignIds', 'couponCodes' => 'setCouponCodes', 'referralCode' => 'setReferralCode', 'loyaltyCards' => 'setLoyaltyCards', @@ -148,6 +152,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'profileId' => 'getProfileId', + 'evaluableCampaignIds' => 'getEvaluableCampaignIds', 'couponCodes' => 'getCouponCodes', 'referralCode' => 'getReferralCode', 'loyaltyCards' => 'getLoyaltyCards', @@ -238,6 +243,7 @@ public function getStateAllowableValues() public function __construct(array $data = null) { $this->container['profileId'] = isset($data['profileId']) ? $data['profileId'] : null; + $this->container['evaluableCampaignIds'] = isset($data['evaluableCampaignIds']) ? $data['evaluableCampaignIds'] : null; $this->container['couponCodes'] = isset($data['couponCodes']) ? $data['couponCodes'] : null; $this->container['referralCode'] = isset($data['referralCode']) ? $data['referralCode'] : null; $this->container['loyaltyCards'] = isset($data['loyaltyCards']) ? $data['loyaltyCards'] : null; @@ -308,6 +314,30 @@ public function setProfileId($profileId) return $this; } + /** + * Gets evaluableCampaignIds + * + * @return int[]|null + */ + public function getEvaluableCampaignIds() + { + return $this->container['evaluableCampaignIds']; + } + + /** + * Sets evaluableCampaignIds + * + * @param int[]|null $evaluableCampaignIds When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. + * + * @return $this + */ + public function setEvaluableCampaignIds($evaluableCampaignIds) + { + $this->container['evaluableCampaignIds'] = $evaluableCampaignIds; + + return $this; + } + /** * Gets couponCodes * @@ -397,7 +427,7 @@ public function getState() /** * Sets state * - * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](/docs/dev/concepts/entities#customer-session). + * @param string|null $state Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities#customer-session). * * @return $this */ @@ -454,7 +484,7 @@ public function getAdditionalCosts() /** * Sets additionalCosts * - * @param map[string,\TalonOne\Client\Model\AdditionalCost]|null $additionalCosts Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs/). + * @param map[string,\TalonOne\Client\Model\AdditionalCost]|null $additionalCosts Use this property to set a value for the additional costs of this session, such as a shipping cost. They must be created in the Campaign Manager before you set them with this property. See [Managing additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs). * * @return $this */ @@ -478,7 +508,7 @@ public function getIdentifiers() /** * Sets identifiers * - * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers/). **Important**: If you [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign, ensure the session contains an identifier by the time you close it. + * @param string[]|null $identifiers Session custom identifiers that you can set limits on or use inside your rules. For example, you can use IP addresses as identifiers to potentially identify devices and limit discounts abuse in case of customers creating multiple accounts. See the [tutorial](https://docs.talon.one/docs/dev/tutorials/using-identifiers). **Important**: Ensure the session contains an identifier by the time you close it if: - You [create a unique identifier budget](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets/#budget-types) for your campaign. - Your campaign has [coupons](https://docs.talon.one/docs/product/campaigns/coupons/coupon-page-overview). * * @return $this */ diff --git a/lib/Model/NewEvent.php b/lib/Model/NewEvent.php index 1a12cbbd..2e053e46 100644 --- a/lib/Model/NewEvent.php +++ b/lib/Model/NewEvent.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewEventType.php b/lib/Model/NewEventType.php index 586c94d1..c59908e3 100644 --- a/lib/Model/NewEventType.php +++ b/lib/Model/NewEventType.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -244,7 +244,7 @@ public function getTitle() /** * Sets title * - * @param string $title The human-friendly display name for this event type. Use a short, past-tense, description of the event. + * @param string $title The human-friendly name for this event type. * * @return $this */ @@ -273,7 +273,7 @@ public function getName() /** * Sets name * - * @param string $name The machine-friendly canonical name for this event type. This will be used in URLs, and cannot be changed after an event type has been created. + * @param string $name The integration name for this event type. This will be used in URLs and cannot be changed after an event type has been created. * * @return $this */ @@ -302,7 +302,7 @@ public function getDescription() /** * Sets description * - * @param string|null $description An explanation of when the event type is triggered. Write this with a campaign manager in mind. For example: > The \"Payment Accepted\" event is triggered after successful processing of a payment by our payment gateway. + * @param string|null $description A description of what the event represents. * * @return $this */ diff --git a/lib/Model/NewGiveawaysPool.php b/lib/Model/NewGiveawaysPool.php index 96e3ca3c..a2a0109a 100644 --- a/lib/Model/NewGiveawaysPool.php +++ b/lib/Model/NewGiveawaysPool.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,7 +59,8 @@ class NewGiveawaysPool implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'name' => 'string', 'description' => 'string', - 'subscribedApplicationsIds' => 'int[]' + 'subscribedApplicationsIds' => 'int[]', + 'sandbox' => 'bool' ]; /** @@ -70,7 +71,8 @@ class NewGiveawaysPool implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'name' => null, 'description' => null, - 'subscribedApplicationsIds' => null + 'subscribedApplicationsIds' => null, + 'sandbox' => null ]; /** @@ -102,7 +104,8 @@ public static function openAPIFormats() protected static $attributeMap = [ 'name' => 'name', 'description' => 'description', - 'subscribedApplicationsIds' => 'subscribedApplicationsIds' + 'subscribedApplicationsIds' => 'subscribedApplicationsIds', + 'sandbox' => 'sandbox' ]; /** @@ -113,7 +116,8 @@ public static function openAPIFormats() protected static $setters = [ 'name' => 'setName', 'description' => 'setDescription', - 'subscribedApplicationsIds' => 'setSubscribedApplicationsIds' + 'subscribedApplicationsIds' => 'setSubscribedApplicationsIds', + 'sandbox' => 'setSandbox' ]; /** @@ -124,7 +128,8 @@ public static function openAPIFormats() protected static $getters = [ 'name' => 'getName', 'description' => 'getDescription', - 'subscribedApplicationsIds' => 'getSubscribedApplicationsIds' + 'subscribedApplicationsIds' => 'getSubscribedApplicationsIds', + 'sandbox' => 'getSandbox' ]; /** @@ -190,6 +195,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['subscribedApplicationsIds'] = isset($data['subscribedApplicationsIds']) ? $data['subscribedApplicationsIds'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; } /** @@ -204,6 +210,9 @@ public function listInvalidProperties() if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } + if ($this->container['sandbox'] === null) { + $invalidProperties[] = "'sandbox' can't be null"; + } return $invalidProperties; } @@ -290,6 +299,30 @@ public function setSubscribedApplicationsIds($subscribedApplicationsIds) return $this; } + + /** + * Gets sandbox + * + * @return bool + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool $sandbox Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/NewInternalAudience.php b/lib/Model/NewInternalAudience.php index 9f293144..345dbb2a 100644 --- a/lib/Model/NewInternalAudience.php +++ b/lib/Model/NewInternalAudience.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewInvitation.php b/lib/Model/NewInvitation.php index e4f4a7f9..92c560db 100644 --- a/lib/Model/NewInvitation.php +++ b/lib/Model/NewInvitation.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -290,7 +290,7 @@ public function getAcl() /** * Sets acl * - * @param string $acl The `Access Control List` json defining the role of the user. This represents the actual access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` + * @param string $acl The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` * * @return $this */ diff --git a/lib/Model/NewInviteEmail.php b/lib/Model/NewInviteEmail.php index 31f63364..9db31121 100644 --- a/lib/Model/NewInviteEmail.php +++ b/lib/Model/NewInviteEmail.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewLoyaltyProgram.php b/lib/Model/NewLoyaltyProgram.php index 02859388..05afe24f 100644 --- a/lib/Model/NewLoyaltyProgram.php +++ b/lib/Model/NewLoyaltyProgram.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -65,6 +65,7 @@ class NewLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => 'string', 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', + 'sandbox' => 'bool', 'name' => 'string', 'tiers' => '\TalonOne\Client\Model\NewLoyaltyTier[]', 'timezone' => 'string', @@ -84,6 +85,7 @@ class NewLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => null, 'allowSubledger' => null, 'usersPerCardLimit' => null, + 'sandbox' => null, 'name' => null, 'tiers' => null, 'timezone' => null, @@ -124,6 +126,7 @@ public static function openAPIFormats() 'defaultPending' => 'defaultPending', 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', + 'sandbox' => 'sandbox', 'name' => 'name', 'tiers' => 'tiers', 'timezone' => 'timezone', @@ -143,6 +146,7 @@ public static function openAPIFormats() 'defaultPending' => 'setDefaultPending', 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', + 'sandbox' => 'setSandbox', 'name' => 'setName', 'tiers' => 'setTiers', 'timezone' => 'setTimezone', @@ -162,6 +166,7 @@ public static function openAPIFormats() 'defaultPending' => 'getDefaultPending', 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', + 'sandbox' => 'getSandbox', 'name' => 'getName', 'tiers' => 'getTiers', 'timezone' => 'getTimezone', @@ -235,6 +240,7 @@ public function __construct(array $data = null) $this->container['defaultPending'] = isset($data['defaultPending']) ? $data['defaultPending'] : null; $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['tiers'] = isset($data['tiers']) ? $data['tiers'] : null; $this->container['timezone'] = isset($data['timezone']) ? $data['timezone'] : null; @@ -266,6 +272,9 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'usersPerCardLimit', must be bigger than or equal to 0."; } + if ($this->container['sandbox'] === null) { + $invalidProperties[] = "'sandbox' can't be null"; + } if ($this->container['name'] === null) { $invalidProperties[] = "'name' can't be null"; } @@ -379,7 +388,7 @@ public function getDefaultValidity() /** * Sets defaultValidity * - * @param string $defaultValidity Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. + * @param string $defaultValidity The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -403,7 +412,7 @@ public function getDefaultPending() /** * Sets defaultPending * - * @param string $defaultPending Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. + * @param string $defaultPending The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -467,6 +476,30 @@ public function setUsersPerCardLimit($usersPerCardLimit) return $this; } + /** + * Gets sandbox + * + * @return bool + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool $sandbox Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } + /** * Gets name * diff --git a/lib/Model/NewLoyaltyTier.php b/lib/Model/NewLoyaltyTier.php index a10f821e..23828bca 100644 --- a/lib/Model/NewLoyaltyTier.php +++ b/lib/Model/NewLoyaltyTier.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewManagementKey.php b/lib/Model/NewManagementKey.php index e72d253b..54e72aea 100644 --- a/lib/Model/NewManagementKey.php +++ b/lib/Model/NewManagementKey.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -61,6 +61,7 @@ class NewManagementKey implements ModelInterface, ArrayAccess 'name' => 'string', 'expiryDate' => '\DateTime', 'endpoints' => '\TalonOne\Client\Model\Endpoint[]', + 'allowedApplicationIds' => 'int[]', 'id' => 'int', 'createdBy' => 'int', 'accountID' => 'int', @@ -77,6 +78,7 @@ class NewManagementKey implements ModelInterface, ArrayAccess 'name' => null, 'expiryDate' => 'date-time', 'endpoints' => null, + 'allowedApplicationIds' => null, 'id' => null, 'createdBy' => null, 'accountID' => null, @@ -114,6 +116,7 @@ public static function openAPIFormats() 'name' => 'name', 'expiryDate' => 'expiryDate', 'endpoints' => 'endpoints', + 'allowedApplicationIds' => 'allowedApplicationIds', 'id' => 'id', 'createdBy' => 'createdBy', 'accountID' => 'accountID', @@ -130,6 +133,7 @@ public static function openAPIFormats() 'name' => 'setName', 'expiryDate' => 'setExpiryDate', 'endpoints' => 'setEndpoints', + 'allowedApplicationIds' => 'setAllowedApplicationIds', 'id' => 'setId', 'createdBy' => 'setCreatedBy', 'accountID' => 'setAccountID', @@ -146,6 +150,7 @@ public static function openAPIFormats() 'name' => 'getName', 'expiryDate' => 'getExpiryDate', 'endpoints' => 'getEndpoints', + 'allowedApplicationIds' => 'getAllowedApplicationIds', 'id' => 'getId', 'createdBy' => 'getCreatedBy', 'accountID' => 'getAccountID', @@ -216,6 +221,7 @@ public function __construct(array $data = null) $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['endpoints'] = isset($data['endpoints']) ? $data['endpoints'] : null; + $this->container['allowedApplicationIds'] = isset($data['allowedApplicationIds']) ? $data['allowedApplicationIds'] : null; $this->container['id'] = isset($data['id']) ? $data['id'] : null; $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; $this->container['accountID'] = isset($data['accountID']) ? $data['accountID'] : null; @@ -343,6 +349,30 @@ public function setEndpoints($endpoints) return $this; } + /** + * Gets allowedApplicationIds + * + * @return int[]|null + */ + public function getAllowedApplicationIds() + { + return $this->container['allowedApplicationIds']; + } + + /** + * Sets allowedApplicationIds + * + * @param int[]|null $allowedApplicationIds A list of Application IDs that you can access with the management key. An empty or missing list means the management key can be used for all Applications in the account. + * + * @return $this + */ + public function setAllowedApplicationIds($allowedApplicationIds) + { + $this->container['allowedApplicationIds'] = $allowedApplicationIds; + + return $this; + } + /** * Gets id * diff --git a/lib/Model/NewMultipleAudiencesItem.php b/lib/Model/NewMultipleAudiencesItem.php index 8c7aafbc..499b27c4 100644 --- a/lib/Model/NewMultipleAudiencesItem.php +++ b/lib/Model/NewMultipleAudiencesItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewNotificationWebhook.php b/lib/Model/NewNotificationWebhook.php index 5797f26f..5c9f62a7 100644 --- a/lib/Model/NewNotificationWebhook.php +++ b/lib/Model/NewNotificationWebhook.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -229,7 +229,7 @@ public function getUrl() /** * Sets url * - * @param string $url API url for this notification webhook. + * @param string $url API URL for the given webhook-based notification. * * @return $this */ @@ -253,7 +253,7 @@ public function getHeaders() /** * Sets headers * - * @param string[] $headers List of API HTTP headers for this notification webhook. + * @param string[] $headers List of API HTTP headers for the given webhook-based notification. * * @return $this */ diff --git a/lib/Model/NewOutgoingIntegrationWebhook.php b/lib/Model/NewOutgoingIntegrationWebhook.php new file mode 100644 index 00000000..cc4df9ae --- /dev/null +++ b/lib/Model/NewOutgoingIntegrationWebhook.php @@ -0,0 +1,343 @@ + 'string', + 'applicationIds' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'title' => null, + 'applicationIds' => 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 = [ + 'title' => 'title', + 'applicationIds' => 'applicationIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'title' => 'setTitle', + 'applicationIds' => 'setApplicationIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'title' => 'getTitle', + 'applicationIds' => 'getApplicationIds' + ]; + + /** + * 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['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['applicationIds'] = isset($data['applicationIds']) ? $data['applicationIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ($this->container['applicationIds'] === null) { + $invalidProperties[] = "'applicationIds' 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 title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title Webhook title. + * + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets applicationIds + * + * @return int[] + */ + public function getApplicationIds() + { + return $this->container['applicationIds']; + } + + /** + * Sets applicationIds + * + * @param int[] $applicationIds IDs of the Applications to which a webhook must be linked. + * + * @return $this + */ + public function setApplicationIds($applicationIds) + { + $this->container['applicationIds'] = $applicationIds; + + 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/NewPassword.php b/lib/Model/NewPassword.php index 375dfc6c..8ccc8540 100644 --- a/lib/Model/NewPassword.php +++ b/lib/Model/NewPassword.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewPasswordEmail.php b/lib/Model/NewPasswordEmail.php index 3ae2e2ad..4100733c 100644 --- a/lib/Model/NewPasswordEmail.php +++ b/lib/Model/NewPasswordEmail.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewPicklist.php b/lib/Model/NewPicklist.php new file mode 100644 index 00000000..91dff0d3 --- /dev/null +++ b/lib/Model/NewPicklist.php @@ -0,0 +1,379 @@ + 'string', + 'values' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'type' => null, + 'values' => 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 = [ + 'type' => 'type', + 'values' => 'values' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'values' => 'setValues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'values' => 'getValues' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const TYPE_STRING = 'string'; + const TYPE_BOOLEAN = 'boolean'; + const TYPE_NUMBER = 'number'; + const TYPE_TIME = 'time'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_STRING, + self::TYPE_BOOLEAN, + self::TYPE_NUMBER, + self::TYPE_TIME, + ]; + } + + + /** + * 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['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['values'] = isset($data['values']) ? $data['values'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['values'] === null) { + $invalidProperties[] = "'values' 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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets values + * + * @return string[] + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[] $values The list of allowed values provided by this picklist. + * + * @return $this + */ + public function setValues($values) + { + $this->container['values'] = $values; + + 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/NewReferral.php b/lib/Model/NewReferral.php index f853059d..b73571bc 100644 --- a/lib/Model/NewReferral.php +++ b/lib/Model/NewReferral.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -296,7 +296,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/NewReferralsForMultipleAdvocates.php b/lib/Model/NewReferralsForMultipleAdvocates.php index 468447af..5f5270fe 100644 --- a/lib/Model/NewReferralsForMultipleAdvocates.php +++ b/lib/Model/NewReferralsForMultipleAdvocates.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -309,7 +309,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ @@ -413,7 +413,7 @@ public function getAttributes() /** * Sets attributes * - * @param object|null $attributes Arbitrary properties associated with this item. + * @param object|null $attributes Arbitrary properties associated with this referral code. * * @return $this */ diff --git a/lib/Model/NewReturn.php b/lib/Model/NewReturn.php index 5c2c1abd..21da00f8 100644 --- a/lib/Model/NewReturn.php +++ b/lib/Model/NewReturn.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewRole.php b/lib/Model/NewRole.php index fea206a4..d49ca20b 100644 --- a/lib/Model/NewRole.php +++ b/lib/Model/NewRole.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -293,7 +293,7 @@ public function getAcl() /** * Sets acl * - * @param string $acl Role Policy this should be a stringified blob of json. + * @param string $acl The `Access Control List` json defining the role of the user. This represents the access control on the user level. * * @return $this */ diff --git a/lib/Model/NewRuleset.php b/lib/Model/NewRuleset.php index 3b1c4047..8efdf44b 100644 --- a/lib/Model/NewRuleset.php +++ b/lib/Model/NewRuleset.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -58,6 +58,7 @@ class NewRuleset implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'rules' => '\TalonOne\Client\Model\Rule[]', + 'strikethroughRules' => '\TalonOne\Client\Model\Rule[]', 'bindings' => '\TalonOne\Client\Model\Binding[]', 'rbVersion' => 'string', 'activate' => 'bool' @@ -70,6 +71,7 @@ class NewRuleset implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'rules' => null, + 'strikethroughRules' => null, 'bindings' => null, 'rbVersion' => null, 'activate' => null @@ -103,6 +105,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'rules' => 'rules', + 'strikethroughRules' => 'strikethroughRules', 'bindings' => 'bindings', 'rbVersion' => 'rbVersion', 'activate' => 'activate' @@ -115,6 +118,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'rules' => 'setRules', + 'strikethroughRules' => 'setStrikethroughRules', 'bindings' => 'setBindings', 'rbVersion' => 'setRbVersion', 'activate' => 'setActivate' @@ -127,6 +131,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'rules' => 'getRules', + 'strikethroughRules' => 'getStrikethroughRules', 'bindings' => 'getBindings', 'rbVersion' => 'getRbVersion', 'activate' => 'getActivate' @@ -193,6 +198,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['rules'] = isset($data['rules']) ? $data['rules'] : null; + $this->container['strikethroughRules'] = isset($data['strikethroughRules']) ? $data['strikethroughRules'] : null; $this->container['bindings'] = isset($data['bindings']) ? $data['bindings'] : null; $this->container['rbVersion'] = isset($data['rbVersion']) ? $data['rbVersion'] : null; $this->container['activate'] = isset($data['activate']) ? $data['activate'] : null; @@ -252,6 +258,30 @@ public function setRules($rules) return $this; } + /** + * Gets strikethroughRules + * + * @return \TalonOne\Client\Model\Rule[]|null + */ + public function getStrikethroughRules() + { + return $this->container['strikethroughRules']; + } + + /** + * Sets strikethroughRules + * + * @param \TalonOne\Client\Model\Rule[]|null $strikethroughRules Set of rules to apply for strikethrough. + * + * @return $this + */ + public function setStrikethroughRules($strikethroughRules) + { + $this->container['strikethroughRules'] = $strikethroughRules; + + return $this; + } + /** * Gets bindings * diff --git a/lib/Model/NewSamlConnection.php b/lib/Model/NewSamlConnection.php index 0b65436a..9768d92c 100644 --- a/lib/Model/NewSamlConnection.php +++ b/lib/Model/NewSamlConnection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewTemplateDef.php b/lib/Model/NewTemplateDef.php index 7c9d1e37..e78ae5f3 100644 --- a/lib/Model/NewTemplateDef.php +++ b/lib/Model/NewTemplateDef.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewUser.php b/lib/Model/NewUser.php index f57c91ea..b644bd86 100644 --- a/lib/Model/NewUser.php +++ b/lib/Model/NewUser.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NewWebhook.php b/lib/Model/NewWebhook.php index b7e4f4ed..2edc2efa 100644 --- a/lib/Model/NewWebhook.php +++ b/lib/Model/NewWebhook.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -314,7 +314,7 @@ public function getApplicationIds() /** * Sets applicationIds * - * @param int[] $applicationIds The IDs of the applications that are related to this entity. + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. * * @return $this */ @@ -338,7 +338,7 @@ public function getTitle() /** * Sets title * - * @param string $title Friendly title for this webhook. + * @param string $title Name or title for this webhook. * * @return $this */ @@ -400,7 +400,7 @@ public function getUrl() /** * Sets url * - * @param string $url API url (supports templating using parameters) for this webhook. + * @param string $url API URL (supports templating using parameters) for this webhook. * * @return $this */ @@ -496,7 +496,7 @@ public function getEnabled() /** * Sets enabled * - * @param bool $enabled Enables or disables webhook from showing in rule builder. + * @param bool $enabled Enables or disables webhook from showing in the Rule Builder. * * @return $this */ diff --git a/lib/Model/Notification.php b/lib/Model/Notification.php index 112db0af..88694050 100644 --- a/lib/Model/Notification.php +++ b/lib/Model/Notification.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/NotificationWebhook.php b/lib/Model/NotificationWebhook.php index fbac5727..47f20b2d 100644 --- a/lib/Model/NotificationWebhook.php +++ b/lib/Model/NotificationWebhook.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -266,7 +266,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -290,7 +290,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -314,7 +314,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ @@ -362,7 +362,7 @@ public function getUrl() /** * Sets url * - * @param string $url API url for this notification webhook. + * @param string $url API URL for the given webhook-based notification. * * @return $this */ @@ -386,7 +386,7 @@ public function getHeaders() /** * Sets headers * - * @param string[] $headers List of API HTTP headers for this notification webhook. + * @param string[] $headers List of API HTTP headers for the given webhook-based notification. * * @return $this */ diff --git a/lib/Model/OutgoingIntegrationBrazePolicy.php b/lib/Model/OutgoingIntegrationBrazePolicy.php new file mode 100644 index 00000000..635c7c1a --- /dev/null +++ b/lib/Model/OutgoingIntegrationBrazePolicy.php @@ -0,0 +1,343 @@ + 'string', + 'apiKey' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'baseUrl' => null, + 'apiKey' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'baseUrl' => 'baseUrl', + 'apiKey' => 'apiKey' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'baseUrl' => 'setBaseUrl', + 'apiKey' => 'setApiKey' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'baseUrl' => 'getBaseUrl', + 'apiKey' => 'getApiKey' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['baseUrl'] = isset($data['baseUrl']) ? $data['baseUrl'] : null; + $this->container['apiKey'] = isset($data['apiKey']) ? $data['apiKey'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['baseUrl'] === null) { + $invalidProperties[] = "'baseUrl' can't be null"; + } + if ($this->container['apiKey'] === null) { + $invalidProperties[] = "'apiKey' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets baseUrl + * + * @return string + */ + public function getBaseUrl() + { + return $this->container['baseUrl']; + } + + /** + * Sets baseUrl + * + * @param string $baseUrl The base URL of your Braze deployment. + * + * @return $this + */ + public function setBaseUrl($baseUrl) + { + $this->container['baseUrl'] = $baseUrl; + + return $this; + } + + /** + * Gets apiKey + * + * @return string + */ + public function getApiKey() + { + return $this->container['apiKey']; + } + + /** + * Sets apiKey + * + * @param string $apiKey The API key of your Braze deployment. + * + * @return $this + */ + public function setApiKey($apiKey) + { + $this->container['apiKey'] = $apiKey; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/LoyaltyProjectionData.php b/lib/Model/OutgoingIntegrationConfiguration.php similarity index 63% rename from lib/Model/LoyaltyProjectionData.php rename to lib/Model/OutgoingIntegrationConfiguration.php index b077c7e5..aafa9b2d 100644 --- a/lib/Model/LoyaltyProjectionData.php +++ b/lib/Model/OutgoingIntegrationConfiguration.php @@ -1,6 +1,6 @@ '\DateTime', - 'expiringPoints' => 'float', - 'activatingPoints' => 'float', - 'projectedBalance' => 'float' + 'id' => 'int', + 'accountId' => 'int', + 'typeId' => 'int', + 'policy' => 'object' ]; /** @@ -69,10 +69,10 @@ class LoyaltyProjectionData implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ - 'date' => 'date-time', - 'expiringPoints' => null, - 'activatingPoints' => null, - 'projectedBalance' => null + 'id' => null, + 'accountId' => null, + 'typeId' => null, + 'policy' => null ]; /** @@ -102,10 +102,10 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ - 'date' => 'date', - 'expiringPoints' => 'expiringPoints', - 'activatingPoints' => 'activatingPoints', - 'projectedBalance' => 'projectedBalance' + 'id' => 'id', + 'accountId' => 'accountId', + 'typeId' => 'typeId', + 'policy' => 'policy' ]; /** @@ -114,10 +114,10 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ - 'date' => 'setDate', - 'expiringPoints' => 'setExpiringPoints', - 'activatingPoints' => 'setActivatingPoints', - 'projectedBalance' => 'setProjectedBalance' + 'id' => 'setId', + 'accountId' => 'setAccountId', + 'typeId' => 'setTypeId', + 'policy' => 'setPolicy' ]; /** @@ -126,10 +126,10 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ - 'date' => 'getDate', - 'expiringPoints' => 'getExpiringPoints', - 'activatingPoints' => 'getActivatingPoints', - 'projectedBalance' => 'getProjectedBalance' + 'id' => 'getId', + 'accountId' => 'getAccountId', + 'typeId' => 'getTypeId', + 'policy' => 'getPolicy' ]; /** @@ -192,10 +192,10 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->container['date'] = isset($data['date']) ? $data['date'] : null; - $this->container['expiringPoints'] = isset($data['expiringPoints']) ? $data['expiringPoints'] : null; - $this->container['activatingPoints'] = isset($data['activatingPoints']) ? $data['activatingPoints'] : null; - $this->container['projectedBalance'] = isset($data['projectedBalance']) ? $data['projectedBalance'] : null; + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; + $this->container['typeId'] = isset($data['typeId']) ? $data['typeId'] : null; + $this->container['policy'] = isset($data['policy']) ? $data['policy'] : null; } /** @@ -207,17 +207,17 @@ public function listInvalidProperties() { $invalidProperties = []; - if ($this->container['date'] === null) { - $invalidProperties[] = "'date' can't be null"; + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; } - if ($this->container['expiringPoints'] === null) { - $invalidProperties[] = "'expiringPoints' can't be null"; + if ($this->container['accountId'] === null) { + $invalidProperties[] = "'accountId' can't be null"; } - if ($this->container['activatingPoints'] === null) { - $invalidProperties[] = "'activatingPoints' can't be null"; + if ($this->container['typeId'] === null) { + $invalidProperties[] = "'typeId' can't be null"; } - if ($this->container['projectedBalance'] === null) { - $invalidProperties[] = "'projectedBalance' can't be null"; + if ($this->container['policy'] === null) { + $invalidProperties[] = "'policy' can't be null"; } return $invalidProperties; } @@ -235,97 +235,97 @@ public function valid() /** - * Gets date + * Gets id * - * @return \DateTime + * @return int */ - public function getDate() + public function getId() { - return $this->container['date']; + return $this->container['id']; } /** - * Sets date + * Sets id * - * @param \DateTime $date Specific date of projection. + * @param int $id Unique ID for this entity. * * @return $this */ - public function setDate($date) + public function setId($id) { - $this->container['date'] = $date; + $this->container['id'] = $id; return $this; } /** - * Gets expiringPoints + * Gets accountId * - * @return float + * @return int */ - public function getExpiringPoints() + public function getAccountId() { - return $this->container['expiringPoints']; + return $this->container['accountId']; } /** - * Sets expiringPoints + * Sets accountId * - * @param float $expiringPoints Points that will be expired by the specified date. + * @param int $accountId The ID of the account to which this configuration belongs. * * @return $this */ - public function setExpiringPoints($expiringPoints) + public function setAccountId($accountId) { - $this->container['expiringPoints'] = $expiringPoints; + $this->container['accountId'] = $accountId; return $this; } /** - * Gets activatingPoints + * Gets typeId * - * @return float + * @return int */ - public function getActivatingPoints() + public function getTypeId() { - return $this->container['activatingPoints']; + return $this->container['typeId']; } /** - * Sets activatingPoints + * Sets typeId * - * @param float $activatingPoints Points that will be active by the specified date. + * @param int $typeId The outgoing integration type ID. * * @return $this */ - public function setActivatingPoints($activatingPoints) + public function setTypeId($typeId) { - $this->container['activatingPoints'] = $activatingPoints; + $this->container['typeId'] = $typeId; return $this; } /** - * Gets projectedBalance + * Gets policy * - * @return float + * @return object */ - public function getProjectedBalance() + public function getPolicy() { - return $this->container['projectedBalance']; + return $this->container['policy']; } /** - * Sets projectedBalance + * Sets policy * - * @param float $projectedBalance Current balance plus projected active points, minus expiring points. + * @param object $policy policy * * @return $this */ - public function setProjectedBalance($projectedBalance) + public function setPolicy($policy) { - $this->container['projectedBalance'] = $projectedBalance; + $this->container['policy'] = $policy; return $this; } diff --git a/lib/Model/OutgoingIntegrationType.php b/lib/Model/OutgoingIntegrationType.php new file mode 100644 index 00000000..c3cc8118 --- /dev/null +++ b/lib/Model/OutgoingIntegrationType.php @@ -0,0 +1,493 @@ + 'int', + 'name' => 'string', + 'description' => 'string', + 'category' => 'string', + 'documentationLink' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'name' => null, + 'description' => null, + 'category' => null, + 'documentationLink' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'name' => 'name', + 'description' => 'description', + 'category' => 'category', + 'documentationLink' => 'documentationLink' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'name' => 'setName', + 'description' => 'setDescription', + 'category' => 'setCategory', + 'documentationLink' => 'setDocumentationLink' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'name' => 'getName', + 'description' => 'getDescription', + 'category' => 'getCategory', + 'documentationLink' => 'getDocumentationLink' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['category'] = isset($data['category']) ? $data['category'] : null; + $this->container['documentationLink'] = isset($data['documentationLink']) ? $data['documentationLink'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ((mb_strlen($this->container['name']) > 64)) { + $invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 64."; + } + + if ((mb_strlen($this->container['name']) < 1)) { + $invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 1."; + } + + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) > 1000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1000."; + } + + if (!is_null($this->container['description']) && (mb_strlen($this->container['description']) < 1)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; + } + + if (!is_null($this->container['category']) && (mb_strlen($this->container['category']) > 64)) { + $invalidProperties[] = "invalid value for 'category', the character length must be smaller than or equal to 64."; + } + + if (!is_null($this->container['category']) && (mb_strlen($this->container['category']) < 1)) { + $invalidProperties[] = "invalid value for 'category', the character length must be bigger than or equal to 1."; + } + + if (!is_null($this->container['documentationLink']) && (mb_strlen($this->container['documentationLink']) > 255)) { + $invalidProperties[] = "invalid value for 'documentationLink', the character length must be smaller than or equal to 255."; + } + + if (!is_null($this->container['documentationLink']) && (mb_strlen($this->container['documentationLink']) < 1)) { + $invalidProperties[] = "invalid value for 'documentationLink', the character length must be bigger than or equal to 1."; + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique ID for this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the outgoing integration. + * + * @return $this + */ + public function setName($name) + { + if ((mb_strlen($name) > 64)) { + throw new \InvalidArgumentException('invalid length for $name when calling OutgoingIntegrationType., must be smaller than or equal to 64.'); + } + if ((mb_strlen($name) < 1)) { + throw new \InvalidArgumentException('invalid length for $name when calling OutgoingIntegrationType., must be bigger than or equal to 1.'); + } + + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Description of the outgoing integration. + * + * @return $this + */ + public function setDescription($description) + { + if (!is_null($description) && (mb_strlen($description) > 1000)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationType., must be smaller than or equal to 1000.'); + } + if (!is_null($description) && (mb_strlen($description) < 1)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationType., must be bigger than or equal to 1.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets category + * + * @return string|null + */ + public function getCategory() + { + return $this->container['category']; + } + + /** + * Sets category + * + * @param string|null $category Category of the outgoing integration. + * + * @return $this + */ + public function setCategory($category) + { + if (!is_null($category) && (mb_strlen($category) > 64)) { + throw new \InvalidArgumentException('invalid length for $category when calling OutgoingIntegrationType., must be smaller than or equal to 64.'); + } + if (!is_null($category) && (mb_strlen($category) < 1)) { + throw new \InvalidArgumentException('invalid length for $category when calling OutgoingIntegrationType., must be bigger than or equal to 1.'); + } + + $this->container['category'] = $category; + + return $this; + } + + /** + * Gets documentationLink + * + * @return string|null + */ + public function getDocumentationLink() + { + return $this->container['documentationLink']; + } + + /** + * Sets documentationLink + * + * @param string|null $documentationLink Http link to the outgoing integration's documentation. + * + * @return $this + */ + public function setDocumentationLink($documentationLink) + { + if (!is_null($documentationLink) && (mb_strlen($documentationLink) > 255)) { + throw new \InvalidArgumentException('invalid length for $documentationLink when calling OutgoingIntegrationType., must be smaller than or equal to 255.'); + } + if (!is_null($documentationLink) && (mb_strlen($documentationLink) < 1)) { + throw new \InvalidArgumentException('invalid length for $documentationLink when calling OutgoingIntegrationType., must be bigger than or equal to 1.'); + } + + $this->container['documentationLink'] = $documentationLink; + + 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/OutgoingIntegrationTypes.php b/lib/Model/OutgoingIntegrationTypes.php new file mode 100644 index 00000000..48b7d47e --- /dev/null +++ b/lib/Model/OutgoingIntegrationTypes.php @@ -0,0 +1,307 @@ + '\TalonOne\Client\Model\OutgoingIntegrationType[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \TalonOne\Client\Model\OutgoingIntegrationType[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\OutgoingIntegrationType[]|null $data List of outgoing integrations. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/OutgoingIntegrationWebhookTemplate.php b/lib/Model/OutgoingIntegrationWebhookTemplate.php new file mode 100644 index 00000000..87190f9e --- /dev/null +++ b/lib/Model/OutgoingIntegrationWebhookTemplate.php @@ -0,0 +1,543 @@ + 'int', + 'integrationType' => 'int', + 'title' => 'string', + 'description' => 'string', + 'payload' => 'string', + 'method' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'integrationType' => null, + 'title' => null, + 'description' => null, + 'payload' => null, + 'method' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'integrationType' => 'integrationType', + 'title' => 'title', + 'description' => 'description', + 'payload' => 'payload', + 'method' => 'method' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'integrationType' => 'setIntegrationType', + 'title' => 'setTitle', + 'description' => 'setDescription', + 'payload' => 'setPayload', + 'method' => 'setMethod' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'integrationType' => 'getIntegrationType', + 'title' => 'getTitle', + 'description' => 'getDescription', + 'payload' => 'getPayload', + 'method' => 'getMethod' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const METHOD_POST = 'POST'; + const METHOD_PUT = 'PUT'; + const METHOD_GET = 'GET'; + const METHOD_DELETE = 'DELETE'; + const METHOD_PATCH = 'PATCH'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getMethodAllowableValues() + { + return [ + self::METHOD_POST, + self::METHOD_PUT, + self::METHOD_GET, + self::METHOD_DELETE, + self::METHOD_PATCH, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['integrationType'] = isset($data['integrationType']) ? $data['integrationType'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; + $this->container['method'] = isset($data['method']) ? $data['method'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['integrationType'] === null) { + $invalidProperties[] = "'integrationType' can't be null"; + } + if ($this->container['title'] === null) { + $invalidProperties[] = "'title' can't be null"; + } + if ((mb_strlen($this->container['title']) > 255)) { + $invalidProperties[] = "invalid value for 'title', the character length must be smaller than or equal to 255."; + } + + if ((mb_strlen($this->container['title']) < 1)) { + $invalidProperties[] = "invalid value for 'title', the character length must be bigger than or equal to 1."; + } + + if ($this->container['description'] === null) { + $invalidProperties[] = "'description' can't be null"; + } + if ((mb_strlen($this->container['description']) > 1000)) { + $invalidProperties[] = "invalid value for 'description', the character length must be smaller than or equal to 1000."; + } + + if ((mb_strlen($this->container['description']) < 1)) { + $invalidProperties[] = "invalid value for 'description', the character length must be bigger than or equal to 1."; + } + + if ($this->container['payload'] === null) { + $invalidProperties[] = "'payload' can't be null"; + } + if ($this->container['method'] === null) { + $invalidProperties[] = "'method' can't be null"; + } + $allowedValues = $this->getMethodAllowableValues(); + if (!is_null($this->container['method']) && !in_array($this->container['method'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'method', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Unique Id for this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets integrationType + * + * @return int + */ + public function getIntegrationType() + { + return $this->container['integrationType']; + } + + /** + * Sets integrationType + * + * @param int $integrationType Unique Id of outgoing integration type. + * + * @return $this + */ + public function setIntegrationType($integrationType) + { + $this->container['integrationType'] = $integrationType; + + return $this; + } + + /** + * Gets title + * + * @return string + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string $title Title of the webhook template. + * + * @return $this + */ + public function setTitle($title) + { + if ((mb_strlen($title) > 255)) { + throw new \InvalidArgumentException('invalid length for $title when calling OutgoingIntegrationWebhookTemplate., must be smaller than or equal to 255.'); + } + if ((mb_strlen($title) < 1)) { + throw new \InvalidArgumentException('invalid length for $title when calling OutgoingIntegrationWebhookTemplate., must be bigger than or equal to 1.'); + } + + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets description + * + * @return string + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string $description General description for the specific outgoing integration webhook template. + * + * @return $this + */ + public function setDescription($description) + { + if ((mb_strlen($description) > 1000)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationWebhookTemplate., must be smaller than or equal to 1000.'); + } + if ((mb_strlen($description) < 1)) { + throw new \InvalidArgumentException('invalid length for $description when calling OutgoingIntegrationWebhookTemplate., must be bigger than or equal to 1.'); + } + + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets payload + * + * @return string + */ + public function getPayload() + { + return $this->container['payload']; + } + + /** + * Sets payload + * + * @param string $payload API payload (supports templating using parameters) for this webhook template. + * + * @return $this + */ + public function setPayload($payload) + { + $this->container['payload'] = $payload; + + return $this; + } + + /** + * Gets method + * + * @return string + */ + public function getMethod() + { + return $this->container['method']; + } + + /** + * Sets method + * + * @param string $method API method for this webhook. + * + * @return $this + */ + public function setMethod($method) + { + $allowedValues = $this->getMethodAllowableValues(); + if (!in_array($method, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'method', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['method'] = $method; + + return $this; + } + /** + * 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/OutgoingIntegrationWebhookTemplates.php b/lib/Model/OutgoingIntegrationWebhookTemplates.php new file mode 100644 index 00000000..e6d8c4e4 --- /dev/null +++ b/lib/Model/OutgoingIntegrationWebhookTemplates.php @@ -0,0 +1,307 @@ + '\TalonOne\Client\Model\OutgoingIntegrationWebhookTemplate[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'data' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'data' => 'data' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'data' => 'setData' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'data' => 'getData' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['data'] = isset($data['data']) ? $data['data'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets data + * + * @return \TalonOne\Client\Model\OutgoingIntegrationWebhookTemplate[]|null + */ + public function getData() + { + return $this->container['data']; + } + + /** + * Sets data + * + * @param \TalonOne\Client\Model\OutgoingIntegrationWebhookTemplate[]|null $data The list of webhook templates for a given outgoing integration type. + * + * @return $this + */ + public function setData($data) + { + $this->container['data'] = $data; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/PatchItemCatalogAction.php b/lib/Model/PatchItemCatalogAction.php index 039ec9ca..8412874a 100644 --- a/lib/Model/PatchItemCatalogAction.php +++ b/lib/Model/PatchItemCatalogAction.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/PatchManyItemsCatalogAction.php b/lib/Model/PatchManyItemsCatalogAction.php index 74570034..e18a3997 100644 --- a/lib/Model/PatchManyItemsCatalogAction.php +++ b/lib/Model/PatchManyItemsCatalogAction.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Picklist.php b/lib/Model/Picklist.php new file mode 100644 index 00000000..8b5a9140 --- /dev/null +++ b/lib/Model/Picklist.php @@ -0,0 +1,569 @@ + 'int', + 'created' => '\DateTime', + 'type' => 'string', + 'values' => 'string[]', + 'modifiedBy' => 'int', + 'createdBy' => 'int', + 'accountId' => 'int', + 'imported' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'created' => 'date-time', + 'type' => null, + 'values' => null, + 'modifiedBy' => null, + 'createdBy' => null, + 'accountId' => null, + 'imported' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'created' => 'created', + 'type' => 'type', + 'values' => 'values', + 'modifiedBy' => 'modifiedBy', + 'createdBy' => 'createdBy', + 'accountId' => 'accountId', + 'imported' => 'imported' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'created' => 'setCreated', + 'type' => 'setType', + 'values' => 'setValues', + 'modifiedBy' => 'setModifiedBy', + 'createdBy' => 'setCreatedBy', + 'accountId' => 'setAccountId', + 'imported' => 'setImported' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'created' => 'getCreated', + 'type' => 'getType', + 'values' => 'getValues', + 'modifiedBy' => 'getModifiedBy', + 'createdBy' => 'getCreatedBy', + 'accountId' => 'getAccountId', + 'imported' => 'getImported' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const TYPE_STRING = 'string'; + const TYPE_BOOLEAN = 'boolean'; + const TYPE_NUMBER = 'number'; + const TYPE_TIME = 'time'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_STRING, + self::TYPE_BOOLEAN, + self::TYPE_NUMBER, + self::TYPE_TIME, + ]; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['created'] = isset($data['created']) ? $data['created'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['values'] = isset($data['values']) ? $data['values'] : null; + $this->container['modifiedBy'] = isset($data['modifiedBy']) ? $data['modifiedBy'] : null; + $this->container['createdBy'] = isset($data['createdBy']) ? $data['createdBy'] : null; + $this->container['accountId'] = isset($data['accountId']) ? $data['accountId'] : null; + $this->container['imported'] = isset($data['imported']) ? $data['imported'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['created'] === null) { + $invalidProperties[] = "'created' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['values'] === null) { + $invalidProperties[] = "'values' can't be null"; + } + if ($this->container['createdBy'] === null) { + $invalidProperties[] = "'createdBy' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id Internal ID of this entity. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets created + * + * @return \DateTime + */ + public function getCreated() + { + return $this->container['created']; + } + + /** + * Sets created + * + * @param \DateTime $created The time this entity was created. + * + * @return $this + */ + public function setCreated($created) + { + $this->container['created'] = $created; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets values + * + * @return string[] + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[] $values The list of allowed values provided by this picklist. + * + * @return $this + */ + public function setValues($values) + { + $this->container['values'] = $values; + + return $this; + } + + /** + * Gets modifiedBy + * + * @return int|null + */ + public function getModifiedBy() + { + return $this->container['modifiedBy']; + } + + /** + * Sets modifiedBy + * + * @param int|null $modifiedBy ID of the user who last updated this effect if available. + * + * @return $this + */ + public function setModifiedBy($modifiedBy) + { + $this->container['modifiedBy'] = $modifiedBy; + + return $this; + } + + /** + * Gets createdBy + * + * @return int + */ + public function getCreatedBy() + { + return $this->container['createdBy']; + } + + /** + * Sets createdBy + * + * @param int $createdBy ID of the user who created this effect. + * + * @return $this + */ + public function setCreatedBy($createdBy) + { + $this->container['createdBy'] = $createdBy; + + return $this; + } + + /** + * Gets accountId + * + * @return int|null + */ + public function getAccountId() + { + return $this->container['accountId']; + } + + /** + * Sets accountId + * + * @param int|null $accountId The ID of the account that owns this entity. + * + * @return $this + */ + public function setAccountId($accountId) + { + $this->container['accountId'] = $accountId; + + return $this; + } + + /** + * Gets imported + * + * @return bool|null + */ + public function getImported() + { + return $this->container['imported']; + } + + /** + * Sets imported + * + * @param bool|null $imported Imported flag shows that a picklist is imported by a CSV file or not + * + * @return $this + */ + public function setImported($imported) + { + $this->container['imported'] = $imported; + + 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/PriorityPosition.php b/lib/Model/PriorityPosition.php new file mode 100644 index 00000000..5779a195 --- /dev/null +++ b/lib/Model/PriorityPosition.php @@ -0,0 +1,378 @@ + 'string', + 'position' => 'int' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'set' => null, + 'position' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'set' => 'set', + 'position' => 'position' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'set' => 'setSet', + 'position' => 'setPosition' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'set' => 'getSet', + 'position' => 'getPosition' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const SET_UNIVERSAL = 'universal'; + const SET_STACKABLE = 'stackable'; + const SET_EXCLUSIVE = 'exclusive'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getSetAllowableValues() + { + return [ + self::SET_UNIVERSAL, + self::SET_STACKABLE, + self::SET_EXCLUSIVE, + ]; + } + + + /** + * 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['set'] = isset($data['set']) ? $data['set'] : 'universal'; + $this->container['position'] = isset($data['position']) ? $data['position'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['set'] === null) { + $invalidProperties[] = "'set' can't be null"; + } + $allowedValues = $this->getSetAllowableValues(); + if (!is_null($this->container['set']) && !in_array($this->container['set'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'set', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['position'] === null) { + $invalidProperties[] = "'position' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets set + * + * @return string + */ + public function getSet() + { + return $this->container['set']; + } + + /** + * Sets set + * + * @param string $set The name of the priority set where the campaign is located. + * + * @return $this + */ + public function setSet($set) + { + $allowedValues = $this->getSetAllowableValues(); + if (!in_array($set, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'set', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['set'] = $set; + + return $this; + } + + /** + * Gets position + * + * @return int + */ + public function getPosition() + { + return $this->container['position']; + } + + /** + * Sets position + * + * @param int $position The position of the campaign in the priority order starting from 1. + * + * @return $this + */ + public function setPosition($position) + { + $this->container['position'] = $position; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/ProfileAudiencesChanges.php b/lib/Model/ProfileAudiencesChanges.php index 7cffae64..cb8460a2 100644 --- a/lib/Model/ProfileAudiencesChanges.php +++ b/lib/Model/ProfileAudiencesChanges.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RedeemReferralEffectProps.php b/lib/Model/RedeemReferralEffectProps.php index d14ae1f1..67f4fe1f 100644 --- a/lib/Model/RedeemReferralEffectProps.php +++ b/lib/Model/RedeemReferralEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Referral.php b/lib/Model/Referral.php index e4fd01fe..9d1f37d6 100644 --- a/lib/Model/Referral.php +++ b/lib/Model/Referral.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -327,7 +327,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -351,7 +351,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -399,7 +399,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/ReferralConstraints.php b/lib/Model/ReferralConstraints.php index 0340a67e..d08db92e 100644 --- a/lib/Model/ReferralConstraints.php +++ b/lib/Model/ReferralConstraints.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -261,7 +261,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/ReferralCreatedEffectProps.php b/lib/Model/ReferralCreatedEffectProps.php index 5e7ae634..2b4111e6 100644 --- a/lib/Model/ReferralCreatedEffectProps.php +++ b/lib/Model/ReferralCreatedEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ReferralRejectionReason.php b/lib/Model/ReferralRejectionReason.php index 15de5670..3b7bed28 100644 --- a/lib/Model/ReferralRejectionReason.php +++ b/lib/Model/ReferralRejectionReason.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -180,6 +180,7 @@ public function getModelName() const REASON_REFERRAL_START_DATE_IN_FUTURE = 'ReferralStartDateInFuture'; const REASON_REFERRAL_REJECTED_BY_CONDITION = 'ReferralRejectedByCondition'; const REASON_EFFECT_COULD_NOT_BE_APPLIED = 'EffectCouldNotBeApplied'; + const REASON_REFERRAL_PART_OF_NOT_TRIGGERED_CAMPAIGN = 'ReferralPartOfNotTriggeredCampaign'; @@ -202,6 +203,7 @@ public function getReasonAllowableValues() self::REASON_REFERRAL_START_DATE_IN_FUTURE, self::REASON_REFERRAL_REJECTED_BY_CONDITION, self::REASON_EFFECT_COULD_NOT_BE_APPLIED, + self::REASON_REFERRAL_PART_OF_NOT_TRIGGERED_CAMPAIGN, ]; } diff --git a/lib/Model/RejectCouponEffectProps.php b/lib/Model/RejectCouponEffectProps.php index 9a38d6aa..04edadf8 100644 --- a/lib/Model/RejectCouponEffectProps.php +++ b/lib/Model/RejectCouponEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RejectReferralEffectProps.php b/lib/Model/RejectReferralEffectProps.php index 43da7d6f..c4036e97 100644 --- a/lib/Model/RejectReferralEffectProps.php +++ b/lib/Model/RejectReferralEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RemoveItemCatalogAction.php b/lib/Model/RemoveItemCatalogAction.php index 2810d911..08431571 100644 --- a/lib/Model/RemoveItemCatalogAction.php +++ b/lib/Model/RemoveItemCatalogAction.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RemoveManyItemsCatalogAction.php b/lib/Model/RemoveManyItemsCatalogAction.php index 810c2bdf..172b38bf 100644 --- a/lib/Model/RemoveManyItemsCatalogAction.php +++ b/lib/Model/RemoveManyItemsCatalogAction.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ReopenSessionResponse.php b/lib/Model/ReopenSessionResponse.php new file mode 100644 index 00000000..6f2351f4 --- /dev/null +++ b/lib/Model/ReopenSessionResponse.php @@ -0,0 +1,311 @@ + '\TalonOne\Client\Model\Effect[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'effects' => 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 = [ + 'effects' => 'effects' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'effects' => 'setEffects' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'effects' => 'getEffects' + ]; + + /** + * 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['effects'] = isset($data['effects']) ? $data['effects'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['effects'] === null) { + $invalidProperties[] = "'effects' can't be null"; + } + 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 effects + * + * @return \TalonOne\Client\Model\Effect[] + */ + public function getEffects() + { + return $this->container['effects']; + } + + /** + * Sets effects + * + * @param \TalonOne\Client\Model\Effect[] $effects The effects generated by the rules in your running campaigns. See [API effects](https://docs.talon.one/docs/dev/integration-api/api-effects). + * + * @return $this + */ + public function setEffects($effects) + { + $this->container['effects'] = $effects; + + return $this; + } + /** + * 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/ReserveCouponEffectProps.php b/lib/Model/ReserveCouponEffectProps.php new file mode 100644 index 00000000..90613c48 --- /dev/null +++ b/lib/Model/ReserveCouponEffectProps.php @@ -0,0 +1,377 @@ + 'string', + 'profileIntegrationId' => 'string', + 'isNewReservation' => 'bool' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'couponValue' => null, + 'profileIntegrationId' => null, + 'isNewReservation' => 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 = [ + 'couponValue' => 'couponValue', + 'profileIntegrationId' => 'profileIntegrationId', + 'isNewReservation' => 'isNewReservation' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'couponValue' => 'setCouponValue', + 'profileIntegrationId' => 'setProfileIntegrationId', + 'isNewReservation' => 'setIsNewReservation' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'couponValue' => 'getCouponValue', + 'profileIntegrationId' => 'getProfileIntegrationId', + 'isNewReservation' => 'getIsNewReservation' + ]; + + /** + * 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['couponValue'] = isset($data['couponValue']) ? $data['couponValue'] : null; + $this->container['profileIntegrationId'] = isset($data['profileIntegrationId']) ? $data['profileIntegrationId'] : null; + $this->container['isNewReservation'] = isset($data['isNewReservation']) ? $data['isNewReservation'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['couponValue'] === null) { + $invalidProperties[] = "'couponValue' can't be null"; + } + if ($this->container['profileIntegrationId'] === null) { + $invalidProperties[] = "'profileIntegrationId' can't be null"; + } + if ($this->container['isNewReservation'] === null) { + $invalidProperties[] = "'isNewReservation' 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 couponValue + * + * @return string + */ + public function getCouponValue() + { + return $this->container['couponValue']; + } + + /** + * Sets couponValue + * + * @param string $couponValue The value of the coupon currently on scope. + * + * @return $this + */ + public function setCouponValue($couponValue) + { + $this->container['couponValue'] = $couponValue; + + return $this; + } + + /** + * Gets profileIntegrationId + * + * @return string + */ + public function getProfileIntegrationId() + { + return $this->container['profileIntegrationId']; + } + + /** + * Sets profileIntegrationId + * + * @param string $profileIntegrationId The ID of this customer profile in the third-party integration. + * + * @return $this + */ + public function setProfileIntegrationId($profileIntegrationId) + { + $this->container['profileIntegrationId'] = $profileIntegrationId; + + return $this; + } + + /** + * Gets isNewReservation + * + * @return bool + */ + public function getIsNewReservation() + { + return $this->container['isNewReservation']; + } + + /** + * Sets isNewReservation + * + * @param bool $isNewReservation Indicates whether this is a new coupon reservation or not. + * + * @return $this + */ + public function setIsNewReservation($isNewReservation) + { + $this->container['isNewReservation'] = $isNewReservation; + + 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/ReturnIntegrationRequest.php b/lib/Model/ReturnIntegrationRequest.php index 0016a5a9..ff156a77 100644 --- a/lib/Model/ReturnIntegrationRequest.php +++ b/lib/Model/ReturnIntegrationRequest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -278,7 +278,7 @@ public function getResponseContent() /** * Sets responseContent * - * @param string[]|null $responseContent Optional list of extra data that you want to get in the response. Use this property to get as much data as you need in one request instead of sending extra requests to other endpoints. **Note:** `ruleFailureReasons` is always part of the response when the [Application type](https://docs.talon.one/docs/product/applications/overview#application-types) is `sandbox`. + * @param string[]|null $responseContent Extends the response with the chosen data entities. Use this property to get as much data as you need in one _Update customer session_ request instead of sending extra requests to other endpoints. * * @return $this */ diff --git a/lib/Model/ReturnedCartItem.php b/lib/Model/ReturnedCartItem.php index d1270273..02499ec9 100644 --- a/lib/Model/ReturnedCartItem.php +++ b/lib/Model/ReturnedCartItem.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -250,7 +250,7 @@ public function getQuantity() /** * Sets quantity * - * @param int|null $quantity Number of cart items to return. It is only available when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. If cart item flattening is disabled, the cart item can only be returned in its entirety. + * @param int|null $quantity Number of cart items to return. It is only available when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. If cart item flattening is disabled, the cart item can only be returned in its entirety. * * @return $this */ diff --git a/lib/Model/Role.php b/lib/Model/Role.php index 988ae3aa..f3acf79d 100644 --- a/lib/Model/Role.php +++ b/lib/Model/Role.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -284,7 +284,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -308,7 +308,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -332,7 +332,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ @@ -380,7 +380,7 @@ public function getCampaignGroupID() /** * Sets campaignGroupID * - * @param int|null $campaignGroupID The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/managing-campaign-groups/) this role was created for. + * @param int|null $campaignGroupID The ID of the [Campaign Group](https://docs.talon.one/docs/product/account/managing-campaign-groups) this role was created for. * * @return $this */ @@ -476,7 +476,7 @@ public function getAcl() /** * Sets acl * - * @param object $acl Role ACL Policy. + * @param object $acl The `Access Control List` json defining the role of the user. This represents the access control on the user level. * * @return $this */ diff --git a/lib/Model/RoleAssign.php b/lib/Model/RoleAssign.php index ced74fde..def3e06e 100644 --- a/lib/Model/RoleAssign.php +++ b/lib/Model/RoleAssign.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RoleMembership.php b/lib/Model/RoleMembership.php index 69be9cc8..f6fd0a45 100644 --- a/lib/Model/RoleMembership.php +++ b/lib/Model/RoleMembership.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RoleV2.php b/lib/Model/RoleV2.php new file mode 100644 index 00000000..565cb1e7 --- /dev/null +++ b/lib/Model/RoleV2.php @@ -0,0 +1,427 @@ + 'string', + 'description' => 'string', + 'isAdmin' => 'bool', + 'permissions' => '\TalonOne\Client\Model\RoleV2Permissions', + 'members' => 'int[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'description' => null, + 'isAdmin' => null, + 'permissions' => null, + 'members' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'description' => 'description', + 'isAdmin' => 'isAdmin', + 'permissions' => 'permissions', + 'members' => 'members' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'description' => 'setDescription', + 'isAdmin' => 'setIsAdmin', + 'permissions' => 'setPermissions', + 'members' => 'setMembers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'description' => 'getDescription', + 'isAdmin' => 'getIsAdmin', + 'permissions' => 'getPermissions', + 'members' => 'getMembers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['isAdmin'] = isset($data['isAdmin']) ? $data['isAdmin'] : null; + $this->container['permissions'] = isset($data['permissions']) ? $data['permissions'] : null; + $this->container['members'] = isset($data['members']) ? $data['members'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string|null + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string|null $name Name of the role. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description Description of the role. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets isAdmin + * + * @return bool|null + */ + public function getIsAdmin() + { + return $this->container['isAdmin']; + } + + /** + * Sets isAdmin + * + * @param bool|null $isAdmin Indicates whether the role grants admin permissions. + * + * @return $this + */ + public function setIsAdmin($isAdmin) + { + $this->container['isAdmin'] = $isAdmin; + + return $this; + } + + /** + * Gets permissions + * + * @return \TalonOne\Client\Model\RoleV2Permissions|null + */ + public function getPermissions() + { + return $this->container['permissions']; + } + + /** + * Sets permissions + * + * @param \TalonOne\Client\Model\RoleV2Permissions|null $permissions permissions + * + * @return $this + */ + public function setPermissions($permissions) + { + $this->container['permissions'] = $permissions; + + return $this; + } + + /** + * Gets members + * + * @return int[]|null + */ + public function getMembers() + { + return $this->container['members']; + } + + /** + * Sets members + * + * @param int[]|null $members An array of user identifiers. + * + * @return $this + */ + public function setMembers($members) + { + $this->container['members'] = $members; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/RoleV2ApplicationDetails.php b/lib/Model/RoleV2ApplicationDetails.php new file mode 100644 index 00000000..e6c5a1db --- /dev/null +++ b/lib/Model/RoleV2ApplicationDetails.php @@ -0,0 +1,367 @@ + 'string', + 'campaign' => 'string', + 'draftCampaign' => 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'application' => null, + 'campaign' => null, + 'draftCampaign' => 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 = [ + 'application' => 'application', + 'campaign' => 'campaign', + 'draftCampaign' => 'draftCampaign' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'application' => 'setApplication', + 'campaign' => 'setCampaign', + 'draftCampaign' => 'setDraftCampaign' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'application' => 'getApplication', + 'campaign' => 'getCampaign', + 'draftCampaign' => 'getDraftCampaign' + ]; + + /** + * 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['application'] = isset($data['application']) ? $data['application'] : null; + $this->container['campaign'] = isset($data['campaign']) ? $data['campaign'] : null; + $this->container['draftCampaign'] = isset($data['draftCampaign']) ? $data['draftCampaign'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets application + * + * @return string|null + */ + public function getApplication() + { + return $this->container['application']; + } + + /** + * Sets application + * + * @param string|null $application Name of the Application-level permission set. + * + * @return $this + */ + public function setApplication($application) + { + $this->container['application'] = $application; + + return $this; + } + + /** + * Gets campaign + * + * @return string|null + */ + public function getCampaign() + { + return $this->container['campaign']; + } + + /** + * Sets campaign + * + * @param string|null $campaign Name of the campaign-level permission set. + * + * @return $this + */ + public function setCampaign($campaign) + { + $this->container['campaign'] = $campaign; + + return $this; + } + + /** + * Gets draftCampaign + * + * @return string|null + */ + public function getDraftCampaign() + { + return $this->container['draftCampaign']; + } + + /** + * Sets draftCampaign + * + * @param string|null $draftCampaign Name of the draft campaign-level permission set. + * + * @return $this + */ + public function setDraftCampaign($draftCampaign) + { + $this->container['draftCampaign'] = $draftCampaign; + + 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/RoleV2PermissionSet.php b/lib/Model/RoleV2PermissionSet.php new file mode 100644 index 00000000..0a3449ae --- /dev/null +++ b/lib/Model/RoleV2PermissionSet.php @@ -0,0 +1,343 @@ + 'string', + 'operationIds' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'operationIds' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'operationIds' => 'operationIds' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'operationIds' => 'setOperationIds' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'operationIds' => 'getOperationIds' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['operationIds'] = isset($data['operationIds']) ? $data['operationIds'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['operationIds'] === null) { + $invalidProperties[] = "'operationIds' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name Name of the permission set. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets operationIds + * + * @return string[] + */ + public function getOperationIds() + { + return $this->container['operationIds']; + } + + /** + * Sets operationIds + * + * @param string[] $operationIds operationIds + * + * @return $this + */ + public function setOperationIds($operationIds) + { + $this->container['operationIds'] = $operationIds; + + 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/RoleV2Permissions.php b/lib/Model/RoleV2Permissions.php new file mode 100644 index 00000000..97be8016 --- /dev/null +++ b/lib/Model/RoleV2Permissions.php @@ -0,0 +1,337 @@ + '\TalonOne\Client\Model\RoleV2PermissionSet[]', + 'roles' => '\TalonOne\Client\Model\RoleV2PermissionsRoles' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'permissionSets' => null, + 'roles' => 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 = [ + 'permissionSets' => 'permissionSets', + 'roles' => 'roles' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'permissionSets' => 'setPermissionSets', + 'roles' => 'setRoles' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'permissionSets' => 'getPermissionSets', + 'roles' => 'getRoles' + ]; + + /** + * 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['permissionSets'] = isset($data['permissionSets']) ? $data['permissionSets'] : null; + $this->container['roles'] = isset($data['roles']) ? $data['roles'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets permissionSets + * + * @return \TalonOne\Client\Model\RoleV2PermissionSet[]|null + */ + public function getPermissionSets() + { + return $this->container['permissionSets']; + } + + /** + * Sets permissionSets + * + * @param \TalonOne\Client\Model\RoleV2PermissionSet[]|null $permissionSets List of grouped operation IDs to use as a reference in the roles section. Each group of operation IDs has a name. + * + * @return $this + */ + public function setPermissionSets($permissionSets) + { + $this->container['permissionSets'] = $permissionSets; + + return $this; + } + + /** + * Gets roles + * + * @return \TalonOne\Client\Model\RoleV2PermissionsRoles|null + */ + public function getRoles() + { + return $this->container['roles']; + } + + /** + * Sets roles + * + * @param \TalonOne\Client\Model\RoleV2PermissionsRoles|null $roles roles + * + * @return $this + */ + public function setRoles($roles) + { + $this->container['roles'] = $roles; + + 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/RoleV2PermissionsRoles.php b/lib/Model/RoleV2PermissionsRoles.php new file mode 100644 index 00000000..94b0e3ad --- /dev/null +++ b/lib/Model/RoleV2PermissionsRoles.php @@ -0,0 +1,367 @@ + 'map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]', + 'loyaltyPrograms' => 'map[string,string]', + 'campaignAccessGroups' => 'map[string,string]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applications' => null, + 'loyaltyPrograms' => null, + 'campaignAccessGroups' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applications' => 'applications', + 'loyaltyPrograms' => 'loyaltyPrograms', + 'campaignAccessGroups' => 'campaignAccessGroups' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applications' => 'setApplications', + 'loyaltyPrograms' => 'setLoyaltyPrograms', + 'campaignAccessGroups' => 'setCampaignAccessGroups' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applications' => 'getApplications', + 'loyaltyPrograms' => 'getLoyaltyPrograms', + 'campaignAccessGroups' => 'getCampaignAccessGroups' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applications'] = isset($data['applications']) ? $data['applications'] : null; + $this->container['loyaltyPrograms'] = isset($data['loyaltyPrograms']) ? $data['loyaltyPrograms'] : null; + $this->container['campaignAccessGroups'] = isset($data['campaignAccessGroups']) ? $data['campaignAccessGroups'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applications + * + * @return map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]|null + */ + public function getApplications() + { + return $this->container['applications']; + } + + /** + * Sets applications + * + * @param map[string,\TalonOne\Client\Model\RoleV2ApplicationDetails]|null $applications applications + * + * @return $this + */ + public function setApplications($applications) + { + $this->container['applications'] = $applications; + + return $this; + } + + /** + * Gets loyaltyPrograms + * + * @return map[string,string]|null + */ + public function getLoyaltyPrograms() + { + return $this->container['loyaltyPrograms']; + } + + /** + * Sets loyaltyPrograms + * + * @param map[string,string]|null $loyaltyPrograms loyaltyPrograms + * + * @return $this + */ + public function setLoyaltyPrograms($loyaltyPrograms) + { + $this->container['loyaltyPrograms'] = $loyaltyPrograms; + + return $this; + } + + /** + * Gets campaignAccessGroups + * + * @return map[string,string]|null + */ + public function getCampaignAccessGroups() + { + return $this->container['campaignAccessGroups']; + } + + /** + * Sets campaignAccessGroups + * + * @param map[string,string]|null $campaignAccessGroups campaignAccessGroups + * + * @return $this + */ + public function setCampaignAccessGroups($campaignAccessGroups) + { + $this->container['campaignAccessGroups'] = $campaignAccessGroups; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset) + { + 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/RollbackAddedLoyaltyPointsEffectProps.php b/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php index 562b6ddc..42a1a9f3 100644 --- a/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php +++ b/lib/Model/RollbackAddedLoyaltyPointsEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -251,6 +251,10 @@ public function listInvalidProperties() if ($this->container['transactionUUID'] === null) { $invalidProperties[] = "'transactionUUID' can't be null"; } + if (!is_null($this->container['cardIdentifier']) && (mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; + } + return $invalidProperties; } @@ -427,7 +431,7 @@ public function getCartItemSubPosition() /** * Sets cartItemSubPosition * - * @param float|null $cartItemSubPosition The sub-position is returned when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. It indicates to which item the loyalty points were rolled back, for cart items with `quantity` > 1. + * @param float|null $cartItemSubPosition The sub-position is returned when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. It indicates to which item the loyalty points were rolled back, for cart items with `quantity` > 1. * * @return $this */ @@ -451,12 +455,16 @@ public function getCardIdentifier() /** * Sets cardIdentifier * - * @param string|null $cardIdentifier The card on which these points were originally added. + * @param string|null $cardIdentifier The alphanumeric identifier of the loyalty card. * * @return $this */ public function setCardIdentifier($cardIdentifier) { + if (!is_null($cardIdentifier) && (mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling RollbackAddedLoyaltyPointsEffectProps., must be smaller than or equal to 108.'); + } + $this->container['cardIdentifier'] = $cardIdentifier; return $this; diff --git a/lib/Model/RollbackCouponEffectProps.php b/lib/Model/RollbackCouponEffectProps.php index 3dd1520d..d993854a 100644 --- a/lib/Model/RollbackCouponEffectProps.php +++ b/lib/Model/RollbackCouponEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php b/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php index 0b5309a9..ff7cd643 100644 --- a/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php +++ b/lib/Model/RollbackDeductedLoyaltyPointsEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -251,6 +251,10 @@ public function listInvalidProperties() if ($this->container['transactionUUID'] === null) { $invalidProperties[] = "'transactionUUID' can't be null"; } + if (!is_null($this->container['cardIdentifier']) && (mb_strlen($this->container['cardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'cardIdentifier', the character length must be smaller than or equal to 108."; + } + return $invalidProperties; } @@ -451,12 +455,16 @@ public function getCardIdentifier() /** * Sets cardIdentifier * - * @param string|null $cardIdentifier The card on which these points were added. + * @param string|null $cardIdentifier The alphanumeric identifier of the loyalty card. * * @return $this */ public function setCardIdentifier($cardIdentifier) { + if (!is_null($cardIdentifier) && (mb_strlen($cardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $cardIdentifier when calling RollbackDeductedLoyaltyPointsEffectProps., must be smaller than or equal to 108.'); + } + $this->container['cardIdentifier'] = $cardIdentifier; return $this; diff --git a/lib/Model/RollbackDiscountEffectProps.php b/lib/Model/RollbackDiscountEffectProps.php index a053520f..fa78948d 100644 --- a/lib/Model/RollbackDiscountEffectProps.php +++ b/lib/Model/RollbackDiscountEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/RollbackReferralEffectProps.php b/lib/Model/RollbackReferralEffectProps.php index 9dbc6ef5..affd5ad5 100644 --- a/lib/Model/RollbackReferralEffectProps.php +++ b/lib/Model/RollbackReferralEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Rule.php b/lib/Model/Rule.php index 06a2eac4..cba4338e 100644 --- a/lib/Model/Rule.php +++ b/lib/Model/Rule.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -57,6 +57,8 @@ class Rule implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPITypes = [ + 'id' => 'string', + 'parentId' => 'string', 'title' => 'string', 'description' => 'string', 'bindings' => '\TalonOne\Client\Model\Binding[]', @@ -70,6 +72,8 @@ class Rule implements ModelInterface, ArrayAccess * @var string[] */ protected static $openAPIFormats = [ + 'id' => 'uuid', + 'parentId' => 'uuid', 'title' => null, 'description' => null, 'bindings' => null, @@ -104,6 +108,8 @@ public static function openAPIFormats() * @var string[] */ protected static $attributeMap = [ + 'id' => 'id', + 'parentId' => 'parentId', 'title' => 'title', 'description' => 'description', 'bindings' => 'bindings', @@ -117,6 +123,8 @@ public static function openAPIFormats() * @var string[] */ protected static $setters = [ + 'id' => 'setId', + 'parentId' => 'setParentId', 'title' => 'setTitle', 'description' => 'setDescription', 'bindings' => 'setBindings', @@ -130,6 +138,8 @@ public static function openAPIFormats() * @var string[] */ protected static $getters = [ + 'id' => 'getId', + 'parentId' => 'getParentId', 'title' => 'getTitle', 'description' => 'getDescription', 'bindings' => 'getBindings', @@ -197,6 +207,8 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['parentId'] = isset($data['parentId']) ? $data['parentId'] : null; $this->container['title'] = isset($data['title']) ? $data['title'] : null; $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['bindings'] = isset($data['bindings']) ? $data['bindings'] : null; @@ -237,6 +249,54 @@ public function valid() } + /** + * Gets id + * + * @return string|null + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string|null $id A unique identifier for the rule. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets parentId + * + * @return string|null + */ + public function getParentId() + { + return $this->container['parentId']; + } + + /** + * Sets parentId + * + * @param string|null $parentId The ID of the rule that was copied to create this rule. + * + * @return $this + */ + public function setParentId($parentId) + { + $this->container['parentId'] = $parentId; + + return $this; + } + /** * Gets title * diff --git a/lib/Model/RuleFailureReason.php b/lib/Model/RuleFailureReason.php index bf4c1a4f..3846382b 100644 --- a/lib/Model/RuleFailureReason.php +++ b/lib/Model/RuleFailureReason.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Ruleset.php b/lib/Model/Ruleset.php index d6ef685a..c5915f35 100644 --- a/lib/Model/Ruleset.php +++ b/lib/Model/Ruleset.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -62,6 +62,7 @@ class Ruleset implements ModelInterface, ArrayAccess 'created' => '\DateTime', 'userId' => 'int', 'rules' => '\TalonOne\Client\Model\Rule[]', + 'strikethroughRules' => '\TalonOne\Client\Model\Rule[]', 'bindings' => '\TalonOne\Client\Model\Binding[]', 'rbVersion' => 'string', 'activate' => 'bool', @@ -80,6 +81,7 @@ class Ruleset implements ModelInterface, ArrayAccess 'created' => 'date-time', 'userId' => null, 'rules' => null, + 'strikethroughRules' => null, 'bindings' => null, 'rbVersion' => null, 'activate' => null, @@ -119,6 +121,7 @@ public static function openAPIFormats() 'created' => 'created', 'userId' => 'userId', 'rules' => 'rules', + 'strikethroughRules' => 'strikethroughRules', 'bindings' => 'bindings', 'rbVersion' => 'rbVersion', 'activate' => 'activate', @@ -137,6 +140,7 @@ public static function openAPIFormats() 'created' => 'setCreated', 'userId' => 'setUserId', 'rules' => 'setRules', + 'strikethroughRules' => 'setStrikethroughRules', 'bindings' => 'setBindings', 'rbVersion' => 'setRbVersion', 'activate' => 'setActivate', @@ -155,6 +159,7 @@ public static function openAPIFormats() 'created' => 'getCreated', 'userId' => 'getUserId', 'rules' => 'getRules', + 'strikethroughRules' => 'getStrikethroughRules', 'bindings' => 'getBindings', 'rbVersion' => 'getRbVersion', 'activate' => 'getActivate', @@ -227,6 +232,7 @@ public function __construct(array $data = null) $this->container['created'] = isset($data['created']) ? $data['created'] : null; $this->container['userId'] = isset($data['userId']) ? $data['userId'] : null; $this->container['rules'] = isset($data['rules']) ? $data['rules'] : null; + $this->container['strikethroughRules'] = isset($data['strikethroughRules']) ? $data['strikethroughRules'] : null; $this->container['bindings'] = isset($data['bindings']) ? $data['bindings'] : null; $this->container['rbVersion'] = isset($data['rbVersion']) ? $data['rbVersion'] : null; $this->container['activate'] = isset($data['activate']) ? $data['activate'] : null; @@ -287,7 +293,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -311,7 +317,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -335,7 +341,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ @@ -370,6 +376,30 @@ public function setRules($rules) return $this; } + /** + * Gets strikethroughRules + * + * @return \TalonOne\Client\Model\Rule[]|null + */ + public function getStrikethroughRules() + { + return $this->container['strikethroughRules']; + } + + /** + * Sets strikethroughRules + * + * @param \TalonOne\Client\Model\Rule[]|null $strikethroughRules Set of rules to apply for strikethrough. + * + * @return $this + */ + public function setStrikethroughRules($strikethroughRules) + { + $this->container['strikethroughRules'] = $strikethroughRules; + + return $this; + } + /** * Gets bindings * diff --git a/lib/Model/SamlConnection.php b/lib/Model/SamlConnection.php index 1ecda81b..43c48a67 100644 --- a/lib/Model/SamlConnection.php +++ b/lib/Model/SamlConnection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -548,7 +548,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -572,7 +572,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/SamlConnectionMetadata.php b/lib/Model/SamlConnectionMetadata.php index 621126ec..95042784 100644 --- a/lib/Model/SamlConnectionMetadata.php +++ b/lib/Model/SamlConnectionMetadata.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/SamlLoginEndpoint.php b/lib/Model/SamlLoginEndpoint.php index 6c1f09b8..bd3ddb1f 100644 --- a/lib/Model/SamlLoginEndpoint.php +++ b/lib/Model/SamlLoginEndpoint.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Session.php b/lib/Model/Session.php index fb2d5189..b73498f1 100644 --- a/lib/Model/Session.php +++ b/lib/Model/Session.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/SetDiscountEffectProps.php b/lib/Model/SetDiscountEffectProps.php index 66d20035..072dbe1a 100644 --- a/lib/Model/SetDiscountEffectProps.php +++ b/lib/Model/SetDiscountEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -242,7 +242,7 @@ public function getName() /** * Sets name * - * @param string $name The name/description of this discount. + * @param string $name The name / description of this discount * * @return $this */ diff --git a/lib/Model/SetDiscountPerAdditionalCostEffectProps.php b/lib/Model/SetDiscountPerAdditionalCostEffectProps.php index 925146f8..667385dd 100644 --- a/lib/Model/SetDiscountPerAdditionalCostEffectProps.php +++ b/lib/Model/SetDiscountPerAdditionalCostEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -254,7 +254,7 @@ public function getName() /** * Sets name * - * @param string $name The name/description of this discount. + * @param string $name The name / description of this discount * * @return $this */ diff --git a/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php b/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php index 1a959e3e..c2e38a8a 100644 --- a/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php +++ b/lib/Model/SetDiscountPerAdditionalCostPerItemEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -269,7 +269,7 @@ public function getName() /** * Sets name * - * @param string $name The name/description of this discount. + * @param string $name The name / description of this discount * * @return $this */ @@ -365,7 +365,7 @@ public function getSubPosition() /** * Sets subPosition * - * @param float|null $subPosition Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. + * @param float|null $subPosition Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. * * @return $this */ diff --git a/lib/Model/SetDiscountPerItemEffectProps.php b/lib/Model/SetDiscountPerItemEffectProps.php index e85f1546..0c67de7a 100644 --- a/lib/Model/SetDiscountPerItemEffectProps.php +++ b/lib/Model/SetDiscountPerItemEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -353,7 +353,7 @@ public function getSubPosition() /** * Sets subPosition * - * @param float|null $subPosition Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. + * @param float|null $subPosition Only used when [cart item flattening](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening) is enabled. Indicates which item the discount applies to for cart items with `quantity` > 1. * * @return $this */ @@ -497,7 +497,7 @@ public function getBundleName() /** * Sets bundleName * - * @param string|null $bundleName The name of the bundle binding. + * @param string|null $bundleName The name of the bundle definition. * * @return $this */ diff --git a/lib/Model/ShowBundleMetadataEffectProps.php b/lib/Model/ShowBundleMetadataEffectProps.php index fc025a1e..e85c77d5 100644 --- a/lib/Model/ShowBundleMetadataEffectProps.php +++ b/lib/Model/ShowBundleMetadataEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/ShowNotificationEffectProps.php b/lib/Model/ShowNotificationEffectProps.php index 8f5e365b..a34230fe 100644 --- a/lib/Model/ShowNotificationEffectProps.php +++ b/lib/Model/ShowNotificationEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/SlotDef.php b/lib/Model/SlotDef.php index ee568361..c4bb0e4f 100644 --- a/lib/Model/SlotDef.php +++ b/lib/Model/SlotDef.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/StrikethroughChangedItem.php b/lib/Model/StrikethroughChangedItem.php new file mode 100644 index 00000000..c6c43704 --- /dev/null +++ b/lib/Model/StrikethroughChangedItem.php @@ -0,0 +1,515 @@ + 'int', + 'catalogId' => 'int', + 'sku' => 'string', + 'version' => 'int', + 'price' => 'float', + 'evaluatedAt' => '\DateTime', + 'effects' => '\TalonOne\Client\Model\StrikethroughEffect[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'catalogId' => null, + 'sku' => null, + 'version' => null, + 'price' => null, + 'evaluatedAt' => 'date-time', + 'effects' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'catalogId' => 'catalogId', + 'sku' => 'sku', + 'version' => 'version', + 'price' => 'price', + 'evaluatedAt' => 'evaluatedAt', + 'effects' => 'effects' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'catalogId' => 'setCatalogId', + 'sku' => 'setSku', + 'version' => 'setVersion', + 'price' => 'setPrice', + 'evaluatedAt' => 'setEvaluatedAt', + 'effects' => 'setEffects' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'catalogId' => 'getCatalogId', + 'sku' => 'getSku', + 'version' => 'getVersion', + 'price' => 'getPrice', + 'evaluatedAt' => 'getEvaluatedAt', + 'effects' => 'getEffects' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['catalogId'] = isset($data['catalogId']) ? $data['catalogId'] : null; + $this->container['sku'] = isset($data['sku']) ? $data['sku'] : null; + $this->container['version'] = isset($data['version']) ? $data['version'] : null; + $this->container['price'] = isset($data['price']) ? $data['price'] : null; + $this->container['evaluatedAt'] = isset($data['evaluatedAt']) ? $data['evaluatedAt'] : null; + $this->container['effects'] = isset($data['effects']) ? $data['effects'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['catalogId'] === null) { + $invalidProperties[] = "'catalogId' can't be null"; + } + if ($this->container['sku'] === null) { + $invalidProperties[] = "'sku' can't be null"; + } + if ($this->container['version'] === null) { + $invalidProperties[] = "'version' can't be null"; + } + if (($this->container['version'] < 1)) { + $invalidProperties[] = "invalid value for 'version', must be bigger than or equal to 1."; + } + + if ($this->container['price'] === null) { + $invalidProperties[] = "'price' can't be null"; + } + if ($this->container['evaluatedAt'] === null) { + $invalidProperties[] = "'evaluatedAt' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The ID of the event that triggered the strikethrough labeling. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets catalogId + * + * @return int + */ + public function getCatalogId() + { + return $this->container['catalogId']; + } + + /** + * Sets catalogId + * + * @param int $catalogId The ID of the catalog that the changed item belongs to. + * + * @return $this + */ + public function setCatalogId($catalogId) + { + $this->container['catalogId'] = $catalogId; + + return $this; + } + + /** + * Gets sku + * + * @return string + */ + public function getSku() + { + return $this->container['sku']; + } + + /** + * Sets sku + * + * @param string $sku The unique SKU of the changed item. + * + * @return $this + */ + public function setSku($sku) + { + $this->container['sku'] = $sku; + + return $this; + } + + /** + * Gets version + * + * @return int + */ + public function getVersion() + { + return $this->container['version']; + } + + /** + * Sets version + * + * @param int $version The version of the changed item. + * + * @return $this + */ + public function setVersion($version) + { + + if (($version < 1)) { + throw new \InvalidArgumentException('invalid value for $version when calling StrikethroughChangedItem., must be bigger than or equal to 1.'); + } + + $this->container['version'] = $version; + + return $this; + } + + /** + * Gets price + * + * @return float + */ + public function getPrice() + { + return $this->container['price']; + } + + /** + * Sets price + * + * @param float $price The price of the changed item. + * + * @return $this + */ + public function setPrice($price) + { + $this->container['price'] = $price; + + return $this; + } + + /** + * Gets evaluatedAt + * + * @return \DateTime + */ + public function getEvaluatedAt() + { + return $this->container['evaluatedAt']; + } + + /** + * Sets evaluatedAt + * + * @param \DateTime $evaluatedAt The evaluation time of the changed item. + * + * @return $this + */ + public function setEvaluatedAt($evaluatedAt) + { + $this->container['evaluatedAt'] = $evaluatedAt; + + return $this; + } + + /** + * Gets effects + * + * @return \TalonOne\Client\Model\StrikethroughEffect[]|null + */ + public function getEffects() + { + return $this->container['effects']; + } + + /** + * Sets effects + * + * @param \TalonOne\Client\Model\StrikethroughEffect[]|null $effects effects + * + * @return $this + */ + public function setEffects($effects) + { + $this->container['effects'] = $effects; + + 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/StrikethroughCustomEffectPerItemProps.php b/lib/Model/StrikethroughCustomEffectPerItemProps.php new file mode 100644 index 00000000..52fa01ad --- /dev/null +++ b/lib/Model/StrikethroughCustomEffectPerItemProps.php @@ -0,0 +1,377 @@ + 'int', + 'name' => 'string', + 'payload' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'effectId' => null, + 'name' => null, + 'payload' => 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 = [ + 'effectId' => 'effectId', + 'name' => 'name', + 'payload' => 'payload' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'effectId' => 'setEffectId', + 'name' => 'setName', + 'payload' => 'setPayload' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'effectId' => 'getEffectId', + 'name' => 'getName', + 'payload' => 'getPayload' + ]; + + /** + * 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['effectId'] = isset($data['effectId']) ? $data['effectId'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['effectId'] === null) { + $invalidProperties[] = "'effectId' can't be null"; + } + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['payload'] === null) { + $invalidProperties[] = "'payload' 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 effectId + * + * @return int + */ + public function getEffectId() + { + return $this->container['effectId']; + } + + /** + * Sets effectId + * + * @param int $effectId ID of the effect. + * + * @return $this + */ + public function setEffectId($effectId) + { + $this->container['effectId'] = $effectId; + + return $this; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The type of the custom effect. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets payload + * + * @return object + */ + public function getPayload() + { + return $this->container['payload']; + } + + /** + * Sets payload + * + * @param object $payload The JSON payload of the custom effect. + * + * @return $this + */ + public function setPayload($payload) + { + $this->container['payload'] = $payload; + + 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/StrikethroughEffect.php b/lib/Model/StrikethroughEffect.php new file mode 100644 index 00000000..64ea20a6 --- /dev/null +++ b/lib/Model/StrikethroughEffect.php @@ -0,0 +1,476 @@ + 'int', + 'rulesetId' => 'int', + 'ruleIndex' => 'int', + 'ruleName' => 'string', + 'type' => 'string', + 'props' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'campaignId' => null, + 'rulesetId' => null, + 'ruleIndex' => null, + 'ruleName' => null, + 'type' => null, + 'props' => 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', + 'rulesetId' => 'rulesetId', + 'ruleIndex' => 'ruleIndex', + 'ruleName' => 'ruleName', + 'type' => 'type', + 'props' => 'props' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'campaignId' => 'setCampaignId', + 'rulesetId' => 'setRulesetId', + 'ruleIndex' => 'setRuleIndex', + 'ruleName' => 'setRuleName', + 'type' => 'setType', + 'props' => 'setProps' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'campaignId' => 'getCampaignId', + 'rulesetId' => 'getRulesetId', + 'ruleIndex' => 'getRuleIndex', + 'ruleName' => 'getRuleName', + 'type' => 'getType', + 'props' => 'getProps' + ]; + + /** + * 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['rulesetId'] = isset($data['rulesetId']) ? $data['rulesetId'] : null; + $this->container['ruleIndex'] = isset($data['ruleIndex']) ? $data['ruleIndex'] : null; + $this->container['ruleName'] = isset($data['ruleName']) ? $data['ruleName'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['props'] = isset($data['props']) ? $data['props'] : 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['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"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['props'] === null) { + $invalidProperties[] = "'props' 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 effect belongs to. + * + * @return $this + */ + public function setCampaignId($campaignId) + { + $this->container['campaignId'] = $campaignId; + + return $this; + } + + /** + * Gets rulesetId + * + * @return int + */ + public function getRulesetId() + { + return $this->container['rulesetId']; + } + + /** + * Sets rulesetId + * + * @param int $rulesetId The ID of the ruleset containing the rule that triggered this effect. + * + * @return $this + */ + public function setRulesetId($rulesetId) + { + $this->container['rulesetId'] = $rulesetId; + + return $this; + } + + /** + * Gets ruleIndex + * + * @return int + */ + public function getRuleIndex() + { + return $this->container['ruleIndex']; + } + + /** + * Sets ruleIndex + * + * @param int $ruleIndex The position of the rule that triggered this effect 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 triggered this effect. + * + * @return $this + */ + public function setRuleName($ruleName) + { + $this->container['ruleName'] = $ruleName; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of this effect. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets props + * + * @return object + */ + public function getProps() + { + return $this->container['props']; + } + + /** + * Sets props + * + * @param object $props props + * + * @return $this + */ + public function setProps($props) + { + $this->container['props'] = $props; + + 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/StrikethroughLabelingNotification.php b/lib/Model/StrikethroughLabelingNotification.php new file mode 100644 index 00000000..757f96ab --- /dev/null +++ b/lib/Model/StrikethroughLabelingNotification.php @@ -0,0 +1,443 @@ + 'int', + 'currentBatch' => 'int', + 'totalBatches' => 'int', + 'trigger' => '\TalonOne\Client\Model\StrikethroughTrigger', + 'changedItems' => '\TalonOne\Client\Model\StrikethroughChangedItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'applicationId' => null, + 'currentBatch' => null, + 'totalBatches' => null, + 'trigger' => null, + 'changedItems' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'applicationId' => 'applicationId', + 'currentBatch' => 'currentBatch', + 'totalBatches' => 'totalBatches', + 'trigger' => 'trigger', + 'changedItems' => 'changedItems' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'applicationId' => 'setApplicationId', + 'currentBatch' => 'setCurrentBatch', + 'totalBatches' => 'setTotalBatches', + 'trigger' => 'setTrigger', + 'changedItems' => 'setChangedItems' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'applicationId' => 'getApplicationId', + 'currentBatch' => 'getCurrentBatch', + 'totalBatches' => 'getTotalBatches', + 'trigger' => 'getTrigger', + 'changedItems' => 'getChangedItems' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['applicationId'] = isset($data['applicationId']) ? $data['applicationId'] : null; + $this->container['currentBatch'] = isset($data['currentBatch']) ? $data['currentBatch'] : null; + $this->container['totalBatches'] = isset($data['totalBatches']) ? $data['totalBatches'] : null; + $this->container['trigger'] = isset($data['trigger']) ? $data['trigger'] : null; + $this->container['changedItems'] = isset($data['changedItems']) ? $data['changedItems'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['applicationId'] === null) { + $invalidProperties[] = "'applicationId' can't be null"; + } + if ($this->container['currentBatch'] === null) { + $invalidProperties[] = "'currentBatch' can't be null"; + } + if ($this->container['totalBatches'] === null) { + $invalidProperties[] = "'totalBatches' can't be null"; + } + if ($this->container['trigger'] === null) { + $invalidProperties[] = "'trigger' can't be null"; + } + if ($this->container['changedItems'] === null) { + $invalidProperties[] = "'changedItems' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets applicationId + * + * @return int + */ + public function getApplicationId() + { + return $this->container['applicationId']; + } + + /** + * Sets applicationId + * + * @param int $applicationId The ID of the application that catalog items labels belongs to. + * + * @return $this + */ + public function setApplicationId($applicationId) + { + $this->container['applicationId'] = $applicationId; + + return $this; + } + + /** + * Gets currentBatch + * + * @return int + */ + public function getCurrentBatch() + { + return $this->container['currentBatch']; + } + + /** + * Sets currentBatch + * + * @param int $currentBatch The batch number of the notification. Notifications might be sent in different batches. + * + * @return $this + */ + public function setCurrentBatch($currentBatch) + { + $this->container['currentBatch'] = $currentBatch; + + return $this; + } + + /** + * Gets totalBatches + * + * @return int + */ + public function getTotalBatches() + { + return $this->container['totalBatches']; + } + + /** + * Sets totalBatches + * + * @param int $totalBatches The total number of batches for the notification. + * + * @return $this + */ + public function setTotalBatches($totalBatches) + { + $this->container['totalBatches'] = $totalBatches; + + return $this; + } + + /** + * Gets trigger + * + * @return \TalonOne\Client\Model\StrikethroughTrigger + */ + public function getTrigger() + { + return $this->container['trigger']; + } + + /** + * Sets trigger + * + * @param \TalonOne\Client\Model\StrikethroughTrigger $trigger trigger + * + * @return $this + */ + public function setTrigger($trigger) + { + $this->container['trigger'] = $trigger; + + return $this; + } + + /** + * Gets changedItems + * + * @return \TalonOne\Client\Model\StrikethroughChangedItem[] + */ + public function getChangedItems() + { + return $this->container['changedItems']; + } + + /** + * Sets changedItems + * + * @param \TalonOne\Client\Model\StrikethroughChangedItem[] $changedItems changedItems + * + * @return $this + */ + public function setChangedItems($changedItems) + { + $this->container['changedItems'] = $changedItems; + + 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/StrikethroughSetDiscountPerItemEffectProps.php b/lib/Model/StrikethroughSetDiscountPerItemEffectProps.php new file mode 100644 index 00000000..08210b1e --- /dev/null +++ b/lib/Model/StrikethroughSetDiscountPerItemEffectProps.php @@ -0,0 +1,344 @@ + 'string', + 'value' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'name' => null, + 'value' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'name' => 'name', + 'value' => 'value' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'name' => 'setName', + 'value' => 'setValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'name' => 'getName', + 'value' => 'getValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['value'] = isset($data['value']) ? $data['value'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['value'] === null) { + $invalidProperties[] = "'value' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name effect name. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets value + * + * @return object + */ + public function getValue() + { + return $this->container['value']; + } + + /** + * Sets value + * + * @param object $value discount value. + * + * @return $this + */ + public function setValue($value) + { + $this->container['value'] = $value; + + 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/StrikethroughTrigger.php b/lib/Model/StrikethroughTrigger.php new file mode 100644 index 00000000..393ca36d --- /dev/null +++ b/lib/Model/StrikethroughTrigger.php @@ -0,0 +1,443 @@ + 'int', + 'type' => 'string', + 'triggeredAt' => '\DateTime', + 'totalAffectedItems' => 'int', + 'payload' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'id' => null, + 'type' => null, + 'triggeredAt' => 'date-time', + 'totalAffectedItems' => 'date-time', + 'payload' => null + ]; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'id' => 'id', + 'type' => 'type', + 'triggeredAt' => 'triggeredAt', + 'totalAffectedItems' => 'totalAffectedItems', + 'payload' => 'payload' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'id' => 'setId', + 'type' => 'setType', + 'triggeredAt' => 'setTriggeredAt', + 'totalAffectedItems' => 'setTotalAffectedItems', + 'payload' => 'setPayload' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'id' => 'getId', + 'type' => 'getType', + 'triggeredAt' => 'getTriggeredAt', + 'totalAffectedItems' => 'getTotalAffectedItems', + 'payload' => 'getPayload' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->container['id'] = isset($data['id']) ? $data['id'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['triggeredAt'] = isset($data['triggeredAt']) ? $data['triggeredAt'] : null; + $this->container['totalAffectedItems'] = isset($data['totalAffectedItems']) ? $data['totalAffectedItems'] : null; + $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['triggeredAt'] === null) { + $invalidProperties[] = "'triggeredAt' can't be null"; + } + if ($this->container['totalAffectedItems'] === null) { + $invalidProperties[] = "'totalAffectedItems' can't be null"; + } + if ($this->container['payload'] === null) { + $invalidProperties[] = "'payload' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets id + * + * @return int + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param int $id The ID of the event that triggered the strikethrough labeling. + * + * @return $this + */ + public function setId($id) + { + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of event that triggered the strikethrough labeling. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets triggeredAt + * + * @return \DateTime + */ + public function getTriggeredAt() + { + return $this->container['triggeredAt']; + } + + /** + * Sets triggeredAt + * + * @param \DateTime $triggeredAt The creation time of the event that triggered the strikethrough labeling. + * + * @return $this + */ + public function setTriggeredAt($triggeredAt) + { + $this->container['triggeredAt'] = $triggeredAt; + + return $this; + } + + /** + * Gets totalAffectedItems + * + * @return int + */ + public function getTotalAffectedItems() + { + return $this->container['totalAffectedItems']; + } + + /** + * Sets totalAffectedItems + * + * @param int $totalAffectedItems The total number of items affected by the event that triggered the strikethrough labeling. + * + * @return $this + */ + public function setTotalAffectedItems($totalAffectedItems) + { + $this->container['totalAffectedItems'] = $totalAffectedItems; + + return $this; + } + + /** + * Gets payload + * + * @return object + */ + public function getPayload() + { + return $this->container['payload']; + } + + /** + * Sets payload + * + * @param object $payload The arbitrary properties associated with this trigger type. + * + * @return $this + */ + public function setPayload($payload) + { + $this->container['payload'] = $payload; + + 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/TalangAttribute.php b/lib/Model/TalangAttribute.php new file mode 100644 index 00000000..4474b25a --- /dev/null +++ b/lib/Model/TalangAttribute.php @@ -0,0 +1,657 @@ + 'string', + 'name' => 'string', + 'title' => 'string', + 'type' => 'string', + 'description' => 'string', + 'visible' => 'bool', + 'kind' => 'string', + 'campaignsCount' => 'int', + 'exampleValue' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'entity' => null, + 'name' => null, + 'title' => null, + 'type' => null, + 'description' => null, + 'visible' => null, + 'kind' => null, + 'campaignsCount' => null, + 'exampleValue' => 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 = [ + 'entity' => 'entity', + 'name' => 'name', + 'title' => 'title', + 'type' => 'type', + 'description' => 'description', + 'visible' => 'visible', + 'kind' => 'kind', + 'campaignsCount' => 'campaignsCount', + 'exampleValue' => 'exampleValue' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'entity' => 'setEntity', + 'name' => 'setName', + 'title' => 'setTitle', + 'type' => 'setType', + 'description' => 'setDescription', + 'visible' => 'setVisible', + 'kind' => 'setKind', + 'campaignsCount' => 'setCampaignsCount', + 'exampleValue' => 'setExampleValue' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'entity' => 'getEntity', + 'name' => 'getName', + 'title' => 'getTitle', + 'type' => 'getType', + 'description' => 'getDescription', + 'visible' => 'getVisible', + 'kind' => 'getKind', + 'campaignsCount' => 'getCampaignsCount', + 'exampleValue' => 'getExampleValue' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const ENTITY_ADVOCATE_PROFILE = 'AdvocateProfile'; + const ENTITY_ACCOUNT = 'Account'; + const ENTITY_APPLICATION = 'Application'; + const ENTITY_AWARDED_GIVEAWAY = 'AwardedGiveaway'; + const ENTITY_BUNDLE = 'Bundle'; + const ENTITY_CAMPAIGN = 'Campaign'; + const ENTITY_CART_ITEM = 'CartItem'; + const ENTITY_COUPON = 'Coupon'; + const ENTITY_CUSTOMER_PROFILE = 'CustomerProfile'; + const ENTITY_CUSTOMER_SESSION = 'CustomerSession'; + const ENTITY_EVENT = 'Event'; + const ENTITY_ITEM = 'Item'; + const ENTITY_LOYALTY = 'Loyalty'; + const ENTITY_PROFILE = 'Profile'; + const ENTITY_GIVEAWAY = 'Giveaway'; + const ENTITY_REFERRAL = 'Referral'; + const ENTITY_SESSION = 'Session'; + const KIND_BUILT_IN = 'built-in'; + const KIND_CUSTOM = 'custom'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getEntityAllowableValues() + { + return [ + self::ENTITY_ADVOCATE_PROFILE, + self::ENTITY_ACCOUNT, + self::ENTITY_APPLICATION, + self::ENTITY_AWARDED_GIVEAWAY, + self::ENTITY_BUNDLE, + self::ENTITY_CAMPAIGN, + self::ENTITY_CART_ITEM, + self::ENTITY_COUPON, + self::ENTITY_CUSTOMER_PROFILE, + self::ENTITY_CUSTOMER_SESSION, + self::ENTITY_EVENT, + self::ENTITY_ITEM, + self::ENTITY_LOYALTY, + self::ENTITY_PROFILE, + self::ENTITY_GIVEAWAY, + self::ENTITY_REFERRAL, + self::ENTITY_SESSION, + ]; + } + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getKindAllowableValues() + { + return [ + self::KIND_BUILT_IN, + self::KIND_CUSTOM, + ]; + } + + + /** + * 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['entity'] = isset($data['entity']) ? $data['entity'] : null; + $this->container['name'] = isset($data['name']) ? $data['name'] : null; + $this->container['title'] = isset($data['title']) ? $data['title'] : null; + $this->container['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['description'] = isset($data['description']) ? $data['description'] : null; + $this->container['visible'] = isset($data['visible']) ? $data['visible'] : true; + $this->container['kind'] = isset($data['kind']) ? $data['kind'] : null; + $this->container['campaignsCount'] = isset($data['campaignsCount']) ? $data['campaignsCount'] : null; + $this->container['exampleValue'] = isset($data['exampleValue']) ? $data['exampleValue'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + $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['name'] === null) { + $invalidProperties[] = "'name' can't be null"; + } + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + if ($this->container['visible'] === null) { + $invalidProperties[] = "'visible' can't be null"; + } + if ($this->container['kind'] === null) { + $invalidProperties[] = "'kind' can't be null"; + } + $allowedValues = $this->getKindAllowableValues(); + if (!is_null($this->container['kind']) && !in_array($this->container['kind'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'kind', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['campaignsCount'] === null) { + $invalidProperties[] = "'campaignsCount' 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 entity + * + * @return string|null + */ + public function getEntity() + { + return $this->container['entity']; + } + + /** + * Sets entity + * + * @param string|null $entity The name of the entity of the attribute. + * + * @return $this + */ + public function setEntity($entity) + { + $allowedValues = $this->getEntityAllowableValues(); + if (!is_null($entity) && !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; + } + + /** + * Gets name + * + * @return string + */ + public function getName() + { + return $this->container['name']; + } + + /** + * Sets name + * + * @param string $name The attribute name that will be used in API requests and Talang. E.g. if `name == \"region\"` then you would set the region attribute by including an `attributes.region` property in your request payload. + * + * @return $this + */ + public function setName($name) + { + $this->container['name'] = $name; + + return $this; + } + + /** + * Gets title + * + * @return string|null + */ + public function getTitle() + { + return $this->container['title']; + } + + /** + * Sets title + * + * @param string|null $title The name of the attribute that is displayed to the user in the Campaign Manager. + * + * @return $this + */ + public function setTitle($title) + { + $this->container['title'] = $title; + + return $this; + } + + /** + * Gets type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The talang type of the attribute. + * + * @return $this + */ + public function setType($type) + { + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets description + * + * @return string|null + */ + public function getDescription() + { + return $this->container['description']; + } + + /** + * Sets description + * + * @param string|null $description A description of the attribute. + * + * @return $this + */ + public function setDescription($description) + { + $this->container['description'] = $description; + + return $this; + } + + /** + * Gets visible + * + * @return bool + */ + public function getVisible() + { + return $this->container['visible']; + } + + /** + * Sets visible + * + * @param bool $visible Indicates whether the attribute is visible in the UI or not. + * + * @return $this + */ + public function setVisible($visible) + { + $this->container['visible'] = $visible; + + return $this; + } + + /** + * Gets kind + * + * @return string + */ + public function getKind() + { + return $this->container['kind']; + } + + /** + * Sets kind + * + * @param string $kind Indicate the kind of the attribute. + * + * @return $this + */ + public function setKind($kind) + { + $allowedValues = $this->getKindAllowableValues(); + if (!in_array($kind, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'kind', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['kind'] = $kind; + + return $this; + } + + /** + * Gets campaignsCount + * + * @return int + */ + public function getCampaignsCount() + { + return $this->container['campaignsCount']; + } + + /** + * Sets campaignsCount + * + * @param int $campaignsCount The number of campaigns that refer to the attribute. + * + * @return $this + */ + public function setCampaignsCount($campaignsCount) + { + $this->container['campaignsCount'] = $campaignsCount; + + return $this; + } + + /** + * Gets exampleValue + * + * @return string[]|null + */ + public function getExampleValue() + { + return $this->container['exampleValue']; + } + + /** + * Sets exampleValue + * + * @param string[]|null $exampleValue Examples of values that can be assigned to the attribute. + * + * @return $this + */ + public function setExampleValue($exampleValue) + { + $this->container['exampleValue'] = $exampleValue; + + 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/TalangAttributeVisibility.php b/lib/Model/TalangAttributeVisibility.php new file mode 100644 index 00000000..60223627 --- /dev/null +++ b/lib/Model/TalangAttributeVisibility.php @@ -0,0 +1,337 @@ + 'string[]', + 'visible' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'invisible' => null, + 'visible' => 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 = [ + 'invisible' => 'invisible', + 'visible' => 'visible' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'invisible' => 'setInvisible', + 'visible' => 'setVisible' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'invisible' => 'getInvisible', + 'visible' => 'getVisible' + ]; + + /** + * 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['invisible'] = isset($data['invisible']) ? $data['invisible'] : null; + $this->container['visible'] = isset($data['visible']) ? $data['visible'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets invisible + * + * @return string[]|null + */ + public function getInvisible() + { + return $this->container['invisible']; + } + + /** + * Sets invisible + * + * @param string[]|null $invisible List of attribute names to hide in the UI. + * + * @return $this + */ + public function setInvisible($invisible) + { + $this->container['invisible'] = $invisible; + + return $this; + } + + /** + * Gets visible + * + * @return string[]|null + */ + public function getVisible() + { + return $this->container['visible']; + } + + /** + * Sets visible + * + * @param string[]|null $visible List of attribute names to show in the UI. + * + * @return $this + */ + public function setVisible($visible) + { + $this->container['visible'] = $visible; + + 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/TemplateArgDef.php b/lib/Model/TemplateArgDef.php index bcef88f8..52bc8613 100644 --- a/lib/Model/TemplateArgDef.php +++ b/lib/Model/TemplateArgDef.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -61,7 +61,9 @@ class TemplateArgDef implements ModelInterface, ArrayAccess 'type' => 'string', 'description' => 'string', 'title' => 'string', - 'ui' => 'object' + 'ui' => 'object', + 'picklistID' => 'int', + 'restrictedByPicklist' => 'bool' ]; /** @@ -73,7 +75,9 @@ class TemplateArgDef implements ModelInterface, ArrayAccess 'type' => null, 'description' => null, 'title' => null, - 'ui' => null + 'ui' => null, + 'picklistID' => null, + 'restrictedByPicklist' => null ]; /** @@ -106,7 +110,9 @@ public static function openAPIFormats() 'type' => 'type', 'description' => 'description', 'title' => 'title', - 'ui' => 'ui' + 'ui' => 'ui', + 'picklistID' => 'picklistID', + 'restrictedByPicklist' => 'restrictedByPicklist' ]; /** @@ -118,7 +124,9 @@ public static function openAPIFormats() 'type' => 'setType', 'description' => 'setDescription', 'title' => 'setTitle', - 'ui' => 'setUi' + 'ui' => 'setUi', + 'picklistID' => 'setPicklistID', + 'restrictedByPicklist' => 'setRestrictedByPicklist' ]; /** @@ -130,7 +138,9 @@ public static function openAPIFormats() 'type' => 'getType', 'description' => 'getDescription', 'title' => 'getTitle', - 'ui' => 'getUi' + 'ui' => 'getUi', + 'picklistID' => 'getPicklistID', + 'restrictedByPicklist' => 'getRestrictedByPicklist' ]; /** @@ -178,6 +188,7 @@ public function getModelName() const TYPE_BOOLEAN = 'boolean'; const TYPE_NUMBER = 'number'; const TYPE_TIME = 'time'; + const TYPE_LIST_STRING = '(list string)'; @@ -193,6 +204,7 @@ public function getTypeAllowableValues() self::TYPE_BOOLEAN, self::TYPE_NUMBER, self::TYPE_TIME, + self::TYPE_LIST_STRING, ]; } @@ -216,6 +228,8 @@ public function __construct(array $data = null) $this->container['description'] = isset($data['description']) ? $data['description'] : null; $this->container['title'] = isset($data['title']) ? $data['title'] : null; $this->container['ui'] = isset($data['ui']) ? $data['ui'] : null; + $this->container['picklistID'] = isset($data['picklistID']) ? $data['picklistID'] : null; + $this->container['restrictedByPicklist'] = isset($data['restrictedByPicklist']) ? $data['restrictedByPicklist'] : null; } /** @@ -384,6 +398,54 @@ public function setUi($ui) return $this; } + + /** + * Gets picklistID + * + * @return int|null + */ + public function getPicklistID() + { + return $this->container['picklistID']; + } + + /** + * Sets picklistID + * + * @param int|null $picklistID ID of the picklist linked to a template. + * + * @return $this + */ + public function setPicklistID($picklistID) + { + $this->container['picklistID'] = $picklistID; + + return $this; + } + + /** + * Gets restrictedByPicklist + * + * @return bool|null + */ + public function getRestrictedByPicklist() + { + return $this->container['restrictedByPicklist']; + } + + /** + * Sets restrictedByPicklist + * + * @param bool|null $restrictedByPicklist Whether or not this attribute's value is restricted by picklist (`picklist` property) + * + * @return $this + */ + public function setRestrictedByPicklist($restrictedByPicklist) + { + $this->container['restrictedByPicklist'] = $restrictedByPicklist; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/TemplateDef.php b/lib/Model/TemplateDef.php index 22f3747b..7a016d53 100644 --- a/lib/Model/TemplateDef.php +++ b/lib/Model/TemplateDef.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -320,7 +320,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -344,7 +344,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ diff --git a/lib/Model/TemplateLimitConfig.php b/lib/Model/TemplateLimitConfig.php index c847be2f..0dd783ba 100644 --- a/lib/Model/TemplateLimitConfig.php +++ b/lib/Model/TemplateLimitConfig.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Tier.php b/lib/Model/Tier.php index 543e2592..bdc679fa 100644 --- a/lib/Model/Tier.php +++ b/lib/Model/Tier.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/TransferLoyaltyCard.php b/lib/Model/TransferLoyaltyCard.php new file mode 100644 index 00000000..321a4f5a --- /dev/null +++ b/lib/Model/TransferLoyaltyCard.php @@ -0,0 +1,318 @@ + 'string' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'newCardIdentifier' => 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 = [ + 'newCardIdentifier' => 'newCardIdentifier' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'newCardIdentifier' => 'setNewCardIdentifier' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'newCardIdentifier' => 'getNewCardIdentifier' + ]; + + /** + * 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['newCardIdentifier'] = isset($data['newCardIdentifier']) ? $data['newCardIdentifier'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['newCardIdentifier'] === null) { + $invalidProperties[] = "'newCardIdentifier' can't be null"; + } + if ((mb_strlen($this->container['newCardIdentifier']) > 108)) { + $invalidProperties[] = "invalid value for 'newCardIdentifier', the character length must be smaller than or equal to 108."; + } + + 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 newCardIdentifier + * + * @return string + */ + public function getNewCardIdentifier() + { + return $this->container['newCardIdentifier']; + } + + /** + * Sets newCardIdentifier + * + * @param string $newCardIdentifier The alphanumeric identifier of the loyalty card. + * + * @return $this + */ + public function setNewCardIdentifier($newCardIdentifier) + { + if ((mb_strlen($newCardIdentifier) > 108)) { + throw new \InvalidArgumentException('invalid length for $newCardIdentifier when calling TransferLoyaltyCard., must be smaller than or equal to 108.'); + } + + $this->container['newCardIdentifier'] = $newCardIdentifier; + + 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/TriggerWebhookEffectProps.php b/lib/Model/TriggerWebhookEffectProps.php index 96694c35..338019a0 100644 --- a/lib/Model/TriggerWebhookEffectProps.php +++ b/lib/Model/TriggerWebhookEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateAccount.php b/lib/Model/UpdateAccount.php index 6c2a5cf1..e7350b62 100644 --- a/lib/Model/UpdateAccount.php +++ b/lib/Model/UpdateAccount.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateApplication.php b/lib/Model/UpdateApplication.php index ab5c5bf3..17bf3cef 100644 --- a/lib/Model/UpdateApplication.php +++ b/lib/Model/UpdateApplication.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -768,7 +768,7 @@ public function getEnableFlattenedCartItems() /** * Sets enableFlattenedCartItems * - * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See [the docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation/#flattened-cart-items). + * @param bool|null $enableFlattenedCartItems Indicates if cart items of quantity larger than one should be separated into different items of quantity one. See the [docs](https://docs.talon.one/docs/product/campaigns/campaign-evaluation#flattening). * * @return $this */ diff --git a/lib/Model/UpdateAttributeEffectProps.php b/lib/Model/UpdateAttributeEffectProps.php index 8ddb050c..9a600d62 100644 --- a/lib/Model/UpdateAttributeEffectProps.php +++ b/lib/Model/UpdateAttributeEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateAudience.php b/lib/Model/UpdateAudience.php index 066d64ca..a78959fc 100644 --- a/lib/Model/UpdateAudience.php +++ b/lib/Model/UpdateAudience.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateCampaign.php b/lib/Model/UpdateCampaign.php index e5c836d3..e0d36c4d 100644 --- a/lib/Model/UpdateCampaign.php +++ b/lib/Model/UpdateCampaign.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -225,6 +225,7 @@ public function getModelName() const FEATURES_REFERRALS = 'referrals'; const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; @@ -254,6 +255,7 @@ public function getFeaturesAllowableValues() self::FEATURES_REFERRALS, self::FEATURES_LOYALTY, self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, ]; } diff --git a/lib/Model/UpdateCampaignCollection.php b/lib/Model/UpdateCampaignCollection.php index d3808afe..8d8d8a2f 100644 --- a/lib/Model/UpdateCampaignCollection.php +++ b/lib/Model/UpdateCampaignCollection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateCampaignGroup.php b/lib/Model/UpdateCampaignGroup.php index 380d2c6c..cde57075 100644 --- a/lib/Model/UpdateCampaignGroup.php +++ b/lib/Model/UpdateCampaignGroup.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateCampaignTemplate.php b/lib/Model/UpdateCampaignTemplate.php index f96fd1e8..2156467e 100644 --- a/lib/Model/UpdateCampaignTemplate.php +++ b/lib/Model/UpdateCampaignTemplate.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -240,6 +240,7 @@ public function getModelName() const FEATURES_REFERRALS = 'referrals'; const FEATURES_LOYALTY = 'loyalty'; const FEATURES_GIVEAWAYS = 'giveaways'; + const FEATURES_STRIKETHROUGH = 'strikethrough'; @@ -269,6 +270,7 @@ public function getFeaturesAllowableValues() self::FEATURES_REFERRALS, self::FEATURES_LOYALTY, self::FEATURES_GIVEAWAYS, + self::FEATURES_STRIKETHROUGH, ]; } @@ -447,7 +449,7 @@ public function getCampaignAttributes() /** * Sets campaignAttributes * - * @param object|null $campaignAttributes The Campaign Attributes that Campaigns created from this template will have by default. + * @param object|null $campaignAttributes The campaign attributes that campaigns created from this template will have by default. * * @return $this */ @@ -471,7 +473,7 @@ public function getCouponAttributes() /** * Sets couponAttributes * - * @param object|null $couponAttributes The Campaign Attributes that Coupons created from this template will have by default. + * @param object|null $couponAttributes The campaign attributes that coupons created from this template will have by default. * * @return $this */ @@ -495,7 +497,7 @@ public function getState() /** * Sets state * - * @param string $state Only Campaign Templates in 'available' state may be used to create Campaigns. + * @param string $state Only campaign templates in 'available' state may be used to create campaigns. * * @return $this */ @@ -528,7 +530,7 @@ public function getActiveRulesetId() /** * Sets activeRulesetId * - * @param int|null $activeRulesetId The ID of the Ruleset this Campaign Template will use. + * @param int|null $activeRulesetId The ID of the ruleset this campaign template will use. * * @return $this */ @@ -657,7 +659,7 @@ public function getLimits() /** * Sets limits * - * @param \TalonOne\Client\Model\TemplateLimitConfig[]|null $limits The set of limits that will operate for this campaign template. + * @param \TalonOne\Client\Model\TemplateLimitConfig[]|null $limits The set of limits that operate for this campaign template. * * @return $this */ @@ -681,7 +683,7 @@ public function getTemplateParams() /** * Sets templateParams * - * @param \TalonOne\Client\Model\CampaignTemplateParams[]|null $templateParams Template parameters are fields which can be used to replace values in a rule. + * @param \TalonOne\Client\Model\CampaignTemplateParams[]|null $templateParams Fields which can be used to replace values in a rule. * * @return $this */ @@ -705,7 +707,7 @@ public function getApplicationsIds() /** * Sets applicationsIds * - * @param int[] $applicationsIds A list of the IDs of the applications that are subscribed to this campaign template. + * @param int[] $applicationsIds A list of IDs of the Applications that are subscribed to this campaign template. * * @return $this */ @@ -753,7 +755,7 @@ public function getDefaultCampaignGroupId() /** * Sets defaultCampaignGroupId * - * @param int|null $defaultCampaignGroupId The default campaignGroupId. + * @param int|null $defaultCampaignGroupId The default campaign group ID. * * @return $this */ diff --git a/lib/Model/UpdateCatalog.php b/lib/Model/UpdateCatalog.php index ef1c3a1a..20f0b235 100644 --- a/lib/Model/UpdateCatalog.php +++ b/lib/Model/UpdateCatalog.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateCollection.php b/lib/Model/UpdateCollection.php index b8946b84..e7e41b45 100644 --- a/lib/Model/UpdateCollection.php +++ b/lib/Model/UpdateCollection.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/UpdateCoupon.php b/lib/Model/UpdateCoupon.php index bb449a5e..90b27afa 100644 --- a/lib/Model/UpdateCoupon.php +++ b/lib/Model/UpdateCoupon.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,11 +60,13 @@ class UpdateCoupon implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'limits' => '\TalonOne\Client\Model\LimitConfig[]', 'recipientIntegrationId' => 'string', - 'attributes' => 'object' + 'attributes' => 'object', + 'isReservationMandatory' => 'bool' ]; /** @@ -75,11 +77,13 @@ class UpdateCoupon implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'limits' => null, 'recipientIntegrationId' => null, - 'attributes' => null + 'attributes' => null, + 'isReservationMandatory' => null ]; /** @@ -111,11 +115,13 @@ public static function openAPIFormats() protected static $attributeMap = [ 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'limits' => 'limits', 'recipientIntegrationId' => 'recipientIntegrationId', - 'attributes' => 'attributes' + 'attributes' => 'attributes', + 'isReservationMandatory' => 'isReservationMandatory' ]; /** @@ -126,11 +132,13 @@ public static function openAPIFormats() protected static $setters = [ 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'limits' => 'setLimits', 'recipientIntegrationId' => 'setRecipientIntegrationId', - 'attributes' => 'setAttributes' + 'attributes' => 'setAttributes', + 'isReservationMandatory' => 'setIsReservationMandatory' ]; /** @@ -141,11 +149,13 @@ public static function openAPIFormats() protected static $getters = [ 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'limits' => 'getLimits', 'recipientIntegrationId' => 'getRecipientIntegrationId', - 'attributes' => 'getAttributes' + 'attributes' => 'getAttributes', + 'isReservationMandatory' => 'getIsReservationMandatory' ]; /** @@ -210,11 +220,13 @@ 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['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : null; $this->container['startDate'] = isset($data['startDate']) ? $data['startDate'] : null; $this->container['expiryDate'] = isset($data['expiryDate']) ? $data['expiryDate'] : null; $this->container['limits'] = isset($data['limits']) ? $data['limits'] : null; $this->container['recipientIntegrationId'] = isset($data['recipientIntegrationId']) ? $data['recipientIntegrationId'] : null; $this->container['attributes'] = isset($data['attributes']) ? $data['attributes'] : null; + $this->container['isReservationMandatory'] = isset($data['isReservationMandatory']) ? $data['isReservationMandatory'] : true; } /** @@ -242,6 +254,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + if (!is_null($this->container['recipientIntegrationId']) && (mb_strlen($this->container['recipientIntegrationId']) > 1000)) { $invalidProperties[] = "invalid value for 'recipientIntegrationId', the character length must be smaller than or equal to 1000."; } @@ -306,7 +326,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -325,6 +345,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling UpdateCoupon., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling UpdateCoupon., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -362,7 +414,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ @@ -448,6 +500,30 @@ public function setAttributes($attributes) return $this; } + + /** + * Gets isReservationMandatory + * + * @return bool|null + */ + public function getIsReservationMandatory() + { + return $this->container['isReservationMandatory']; + } + + /** + * Sets isReservationMandatory + * + * @param bool|null $isReservationMandatory Whether the reservation effect actually created a new reservation. + * + * @return $this + */ + public function setIsReservationMandatory($isReservationMandatory) + { + $this->container['isReservationMandatory'] = $isReservationMandatory; + + return $this; + } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/Model/UpdateCouponBatch.php b/lib/Model/UpdateCouponBatch.php index b4efbe57..dc7c54ac 100644 --- a/lib/Model/UpdateCouponBatch.php +++ b/lib/Model/UpdateCouponBatch.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -60,6 +60,7 @@ class UpdateCouponBatch implements ModelInterface, ArrayAccess protected static $openAPITypes = [ 'usageLimit' => 'int', 'discountLimit' => 'float', + 'reservationLimit' => 'int', 'startDate' => '\DateTime', 'expiryDate' => '\DateTime', 'attributes' => 'object', @@ -74,6 +75,7 @@ class UpdateCouponBatch implements ModelInterface, ArrayAccess protected static $openAPIFormats = [ 'usageLimit' => null, 'discountLimit' => null, + 'reservationLimit' => null, 'startDate' => 'date-time', 'expiryDate' => 'date-time', 'attributes' => null, @@ -109,6 +111,7 @@ public static function openAPIFormats() protected static $attributeMap = [ 'usageLimit' => 'usageLimit', 'discountLimit' => 'discountLimit', + 'reservationLimit' => 'reservationLimit', 'startDate' => 'startDate', 'expiryDate' => 'expiryDate', 'attributes' => 'attributes', @@ -123,6 +126,7 @@ public static function openAPIFormats() protected static $setters = [ 'usageLimit' => 'setUsageLimit', 'discountLimit' => 'setDiscountLimit', + 'reservationLimit' => 'setReservationLimit', 'startDate' => 'setStartDate', 'expiryDate' => 'setExpiryDate', 'attributes' => 'setAttributes', @@ -137,6 +141,7 @@ public static function openAPIFormats() protected static $getters = [ 'usageLimit' => 'getUsageLimit', 'discountLimit' => 'getDiscountLimit', + 'reservationLimit' => 'getReservationLimit', 'startDate' => 'getStartDate', 'expiryDate' => 'getExpiryDate', 'attributes' => 'getAttributes', @@ -205,6 +210,7 @@ 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['reservationLimit'] = isset($data['reservationLimit']) ? $data['reservationLimit'] : 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; @@ -236,6 +242,14 @@ public function listInvalidProperties() $invalidProperties[] = "invalid value for 'discountLimit', must be bigger than or equal to 0."; } + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] > 999999)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be smaller than or equal to 999999."; + } + + if (!is_null($this->container['reservationLimit']) && ($this->container['reservationLimit'] < 0)) { + $invalidProperties[] = "invalid value for 'reservationLimit', must be bigger than or equal to 0."; + } + return $invalidProperties; } @@ -296,7 +310,7 @@ public function getDiscountLimit() /** * Sets discountLimit * - * @param float|null $discountLimit The amount of discounts that can be given with this coupon code. + * @param float|null $discountLimit The total discount value that the code can give. Typically used to represent a gift card value. * * @return $this */ @@ -315,6 +329,38 @@ public function setDiscountLimit($discountLimit) return $this; } + /** + * Gets reservationLimit + * + * @return int|null + */ + public function getReservationLimit() + { + return $this->container['reservationLimit']; + } + + /** + * Sets reservationLimit + * + * @param int|null $reservationLimit The number of reservations that can be made with this coupon code. + * + * @return $this + */ + public function setReservationLimit($reservationLimit) + { + + if (!is_null($reservationLimit) && ($reservationLimit > 999999)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling UpdateCouponBatch., must be smaller than or equal to 999999.'); + } + if (!is_null($reservationLimit) && ($reservationLimit < 0)) { + throw new \InvalidArgumentException('invalid value for $reservationLimit when calling UpdateCouponBatch., must be bigger than or equal to 0.'); + } + + $this->container['reservationLimit'] = $reservationLimit; + + return $this; + } + /** * Gets startDate * @@ -352,7 +398,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the coupon. Coupon never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the coupon. Coupon never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/UpdateCustomEffect.php b/lib/Model/UpdateCustomEffect.php index e05a806d..ef1232f6 100644 --- a/lib/Model/UpdateCustomEffect.php +++ b/lib/Model/UpdateCustomEffect.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -59,6 +59,7 @@ class UpdateCustomEffect implements ModelInterface, ArrayAccess */ protected static $openAPITypes = [ 'applicationIds' => 'int[]', + 'isPerItem' => 'bool', 'name' => 'string', 'title' => 'string', 'payload' => 'string', @@ -74,6 +75,7 @@ class UpdateCustomEffect implements ModelInterface, ArrayAccess */ protected static $openAPIFormats = [ 'applicationIds' => null, + 'isPerItem' => null, 'name' => null, 'title' => null, 'payload' => null, @@ -110,6 +112,7 @@ public static function openAPIFormats() */ protected static $attributeMap = [ 'applicationIds' => 'applicationIds', + 'isPerItem' => 'isPerItem', 'name' => 'name', 'title' => 'title', 'payload' => 'payload', @@ -125,6 +128,7 @@ public static function openAPIFormats() */ protected static $setters = [ 'applicationIds' => 'setApplicationIds', + 'isPerItem' => 'setIsPerItem', 'name' => 'setName', 'title' => 'setTitle', 'payload' => 'setPayload', @@ -140,6 +144,7 @@ public static function openAPIFormats() */ protected static $getters = [ 'applicationIds' => 'getApplicationIds', + 'isPerItem' => 'getIsPerItem', 'name' => 'getName', 'title' => 'getTitle', 'payload' => 'getPayload', @@ -209,6 +214,7 @@ public function getModelName() public function __construct(array $data = null) { $this->container['applicationIds'] = isset($data['applicationIds']) ? $data['applicationIds'] : null; + $this->container['isPerItem'] = isset($data['isPerItem']) ? $data['isPerItem'] : null; $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['title'] = isset($data['title']) ? $data['title'] : null; $this->container['payload'] = isset($data['payload']) ? $data['payload'] : null; @@ -277,7 +283,7 @@ public function getApplicationIds() /** * Sets applicationIds * - * @param int[] $applicationIds The IDs of the applications that are related to this entity. + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. * * @return $this */ @@ -288,6 +294,30 @@ public function setApplicationIds($applicationIds) return $this; } + /** + * Gets isPerItem + * + * @return bool|null + */ + public function getIsPerItem() + { + return $this->container['isPerItem']; + } + + /** + * Sets isPerItem + * + * @param bool|null $isPerItem Indicates if this effect is per item or not. + * + * @return $this + */ + public function setIsPerItem($isPerItem) + { + $this->container['isPerItem'] = $isPerItem; + + return $this; + } + /** * Gets name * diff --git a/lib/Model/UpdateLoyaltyCard.php b/lib/Model/UpdateLoyaltyCard.php index 0a940d03..570b6bb8 100644 --- a/lib/Model/UpdateLoyaltyCard.php +++ b/lib/Model/UpdateLoyaltyCard.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -220,7 +220,7 @@ public function getStatus() /** * Sets status * - * @param string $status Status of the loyalty card. Can be one of: ['active', 'disabled'] + * @param string $status Status of the loyalty card. Can be one of: ['active', 'inactive'] * * @return $this */ diff --git a/lib/Model/UpdateLoyaltyProgram.php b/lib/Model/UpdateLoyaltyProgram.php index e1059350..833af09d 100644 --- a/lib/Model/UpdateLoyaltyProgram.php +++ b/lib/Model/UpdateLoyaltyProgram.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -65,6 +65,7 @@ class UpdateLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => 'string', 'allowSubledger' => 'bool', 'usersPerCardLimit' => 'int', + 'sandbox' => 'bool', 'tiers' => '\TalonOne\Client\Model\NewLoyaltyTier[]' ]; @@ -81,6 +82,7 @@ class UpdateLoyaltyProgram implements ModelInterface, ArrayAccess 'defaultPending' => null, 'allowSubledger' => null, 'usersPerCardLimit' => null, + 'sandbox' => null, 'tiers' => null ]; @@ -118,6 +120,7 @@ public static function openAPIFormats() 'defaultPending' => 'defaultPending', 'allowSubledger' => 'allowSubledger', 'usersPerCardLimit' => 'usersPerCardLimit', + 'sandbox' => 'sandbox', 'tiers' => 'tiers' ]; @@ -134,6 +137,7 @@ public static function openAPIFormats() 'defaultPending' => 'setDefaultPending', 'allowSubledger' => 'setAllowSubledger', 'usersPerCardLimit' => 'setUsersPerCardLimit', + 'sandbox' => 'setSandbox', 'tiers' => 'setTiers' ]; @@ -150,6 +154,7 @@ public static function openAPIFormats() 'defaultPending' => 'getDefaultPending', 'allowSubledger' => 'getAllowSubledger', 'usersPerCardLimit' => 'getUsersPerCardLimit', + 'sandbox' => 'getSandbox', 'tiers' => 'getTiers' ]; @@ -220,6 +225,7 @@ public function __construct(array $data = null) $this->container['defaultPending'] = isset($data['defaultPending']) ? $data['defaultPending'] : null; $this->container['allowSubledger'] = isset($data['allowSubledger']) ? $data['allowSubledger'] : null; $this->container['usersPerCardLimit'] = isset($data['usersPerCardLimit']) ? $data['usersPerCardLimit'] : null; + $this->container['sandbox'] = isset($data['sandbox']) ? $data['sandbox'] : null; $this->container['tiers'] = isset($data['tiers']) ? $data['tiers'] : null; } @@ -336,7 +342,7 @@ public function getDefaultValidity() /** * Sets defaultValidity * - * @param string|null $defaultValidity Indicates the default duration after which new loyalty points should expire. The format is a number, followed by one letter indicating the unit; like '1h' or '40m'. + * @param string|null $defaultValidity The default duration after which new loyalty points should expire. Can be 'unlimited' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -360,7 +366,7 @@ public function getDefaultPending() /** * Sets defaultPending * - * @param string|null $defaultPending Indicates the default duration for the pending time, after which points will be valid. The format is a number followed by a duration unit, like '1h' or '40m'. + * @param string|null $defaultPending The default duration of the pending time after which points should be valid. Can be 'immediate' or a specific time. The time format is a number followed by one letter indicating the time unit, like '30s', '40m', '1h', '5D', '7W', or 10M'. These rounding suffixes are also supported: - '_D' for rounding down. Can be used as a suffix after 'D', and signifies the start of the day. - '_U' for rounding up. Can be used as a suffix after 'D', 'W', and 'M', and signifies the end of the day, week, and month. * * @return $this */ @@ -424,6 +430,30 @@ public function setUsersPerCardLimit($usersPerCardLimit) return $this; } + /** + * Gets sandbox + * + * @return bool|null + */ + public function getSandbox() + { + return $this->container['sandbox']; + } + + /** + * Sets sandbox + * + * @param bool|null $sandbox Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. + * + * @return $this + */ + public function setSandbox($sandbox) + { + $this->container['sandbox'] = $sandbox; + + return $this; + } + /** * Gets tiers * diff --git a/lib/Model/UpdatePicklist.php b/lib/Model/UpdatePicklist.php new file mode 100644 index 00000000..fd4afe40 --- /dev/null +++ b/lib/Model/UpdatePicklist.php @@ -0,0 +1,380 @@ + 'string', + 'values' => 'string[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPIFormats = [ + 'type' => null, + 'values' => 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 = [ + 'type' => 'type', + 'values' => 'values' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'type' => 'setType', + 'values' => 'setValues' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'type' => 'getType', + 'values' => 'getValues' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + const TYPE_STRING = 'string'; + const TYPE_BOOLEAN = 'boolean'; + const TYPE_NUMBER = 'number'; + const TYPE_TIME = 'time'; + + + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getTypeAllowableValues() + { + return [ + self::TYPE_STRING, + self::TYPE_BOOLEAN, + self::TYPE_NUMBER, + self::TYPE_TIME, + ]; + } + + + /** + * 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['type'] = isset($data['type']) ? $data['type'] : null; + $this->container['values'] = isset($data['values']) ? $data['values'] : null; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['type'] === null) { + $invalidProperties[] = "'type' can't be null"; + } + $allowedValues = $this->getTypeAllowableValues(); + if (!is_null($this->container['type']) && !in_array($this->container['type'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ); + } + + if ($this->container['values'] === null) { + $invalidProperties[] = "'values' 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 type + * + * @return string + */ + public function getType() + { + return $this->container['type']; + } + + /** + * Sets type + * + * @param string $type The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. + * + * @return $this + */ + public function setType($type) + { + $allowedValues = $this->getTypeAllowableValues(); + if (!in_array($type, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value for 'type', must be one of '%s'", + implode("', '", $allowedValues) + ) + ); + } + $this->container['type'] = $type; + + return $this; + } + + /** + * Gets values + * + * @return string[] + */ + public function getValues() + { + return $this->container['values']; + } + + /** + * Sets values + * + * @param string[] $values The list of allowed values provided by this picklist. + * + * @return $this + */ + public function setValues($values) + { + $this->container['values'] = $values; + + 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/UpdateReferral.php b/lib/Model/UpdateReferral.php index f4be912b..9b3140a7 100644 --- a/lib/Model/UpdateReferral.php +++ b/lib/Model/UpdateReferral.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -305,7 +305,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/UpdateReferralBatch.php b/lib/Model/UpdateReferralBatch.php index 93502f94..9bab8c2e 100644 --- a/lib/Model/UpdateReferralBatch.php +++ b/lib/Model/UpdateReferralBatch.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -324,7 +324,7 @@ public function getExpiryDate() /** * Sets expiryDate * - * @param \DateTime|null $expiryDate Expiry date of the referral code. Referral never expires if this is omitted, zero, or negative. + * @param \DateTime|null $expiryDate Expiration date of the referral code. Referral never expires if this is omitted, zero, or negative. * * @return $this */ diff --git a/lib/Model/UpdateRole.php b/lib/Model/UpdateRole.php index 9825fedc..58eb3d2d 100644 --- a/lib/Model/UpdateRole.php +++ b/lib/Model/UpdateRole.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -283,7 +283,7 @@ public function getAcl() /** * Sets acl * - * @param string|null $acl Role Policy this should be a stringified blob of json. + * @param string|null $acl The `Access Control List` json defining the role of the user. This represents the access control on the user level. * * @return $this */ diff --git a/lib/Model/UpdateUser.php b/lib/Model/UpdateUser.php index cdb21a6b..f041c66c 100644 --- a/lib/Model/UpdateUser.php +++ b/lib/Model/UpdateUser.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -288,7 +288,7 @@ public function getPolicy() /** * Sets policy * - * @param string|null $policy ACL Json. + * @param string|null $policy The `Access Control List` json defining the role of the user. This represents the access control on the user level. * * @return $this */ diff --git a/lib/Model/UpdateUserLatestFeedTimestamp.php b/lib/Model/UpdateUserLatestFeedTimestamp.php index 918f7317..887427a2 100644 --- a/lib/Model/UpdateUserLatestFeedTimestamp.php +++ b/lib/Model/UpdateUserLatestFeedTimestamp.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/User.php b/lib/Model/User.php index 0e1f64ea..9b460178 100644 --- a/lib/Model/User.php +++ b/lib/Model/User.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -342,7 +342,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -366,7 +366,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -390,7 +390,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ diff --git a/lib/Model/UserEntity.php b/lib/Model/UserEntity.php index 6fbd5bee..9f42e957 100644 --- a/lib/Model/UserEntity.php +++ b/lib/Model/UserEntity.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -220,7 +220,7 @@ public function getUserId() /** * Sets userId * - * @param int $userId The ID of the account that owns this entity. + * @param int $userId The ID of the user associated with this entity. * * @return $this */ diff --git a/lib/Model/UserFeedNotifications.php b/lib/Model/UserFeedNotifications.php index a1df366c..6d8dab16 100644 --- a/lib/Model/UserFeedNotifications.php +++ b/lib/Model/UserFeedNotifications.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/Webhook.php b/lib/Model/Webhook.php index 4a0ef82f..3da3b25a 100644 --- a/lib/Model/Webhook.php +++ b/lib/Model/Webhook.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -341,7 +341,7 @@ public function getId() /** * Sets id * - * @param int $id Unique ID for this entity. Not to be confused with the Integration ID, which is set by your integration layer and used in most endpoints. + * @param int $id Internal ID of this entity. * * @return $this */ @@ -365,7 +365,7 @@ public function getCreated() /** * Sets created * - * @param \DateTime $created The exact moment this entity was created. + * @param \DateTime $created The time this entity was created. * * @return $this */ @@ -389,7 +389,7 @@ public function getModified() /** * Sets modified * - * @param \DateTime $modified The exact moment this entity was last modified. + * @param \DateTime $modified The time this entity was last modified. * * @return $this */ @@ -413,7 +413,7 @@ public function getApplicationIds() /** * Sets applicationIds * - * @param int[] $applicationIds The IDs of the applications that are related to this entity. The IDs of the applications that are related to this entity. + * @param int[] $applicationIds The IDs of the Applications that are related to this entity. The IDs of the Applications that are related to this entity. * * @return $this */ @@ -437,7 +437,7 @@ public function getTitle() /** * Sets title * - * @param string $title Friendly title for this webhook. + * @param string $title Name or title for this webhook. * * @return $this */ @@ -499,7 +499,7 @@ public function getUrl() /** * Sets url * - * @param string $url API url (supports templating using parameters) for this webhook. + * @param string $url API URL (supports templating using parameters) for this webhook. * * @return $this */ @@ -595,7 +595,7 @@ public function getEnabled() /** * Sets enabled * - * @param bool $enabled Enables or disables webhook from showing in rule builder. + * @param bool $enabled Enables or disables webhook from showing in the Rule Builder. * * @return $this */ diff --git a/lib/Model/WebhookActivationLogEntry.php b/lib/Model/WebhookActivationLogEntry.php index 5d4964cc..86ee8f1c 100644 --- a/lib/Model/WebhookActivationLogEntry.php +++ b/lib/Model/WebhookActivationLogEntry.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/Model/WebhookLogEntry.php b/lib/Model/WebhookLogEntry.php index acc28ff1..a66a9ea4 100644 --- a/lib/Model/WebhookLogEntry.php +++ b/lib/Model/WebhookLogEntry.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -36,7 +36,7 @@ * WebhookLogEntry Class Doc Comment * * @category Class - * @description Log of webhook api calls. + * @description Log of webhook API calls. * @package TalonOne\Client * @author OpenAPI Generator team * @link https://openapi-generator.tech diff --git a/lib/Model/WillAwardGiveawayEffectProps.php b/lib/Model/WillAwardGiveawayEffectProps.php index 40867e4a..436c1878 100644 --- a/lib/Model/WillAwardGiveawayEffectProps.php +++ b/lib/Model/WillAwardGiveawayEffectProps.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/lib/ObjectSerializer.php b/lib/ObjectSerializer.php index 5cf1f799..5a35dbbb 100644 --- a/lib/ObjectSerializer.php +++ b/lib/ObjectSerializer.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Api/IntegrationApiTest.php b/test/Api/IntegrationApiTest.php index a7574d02..19e8566b 100644 --- a/test/Api/IntegrationApiTest.php +++ b/test/Api/IntegrationApiTest.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -173,12 +173,42 @@ public function testGetCustomerSession() } /** - * Test case for getLoyaltyTransactions + * Test case for getLoyaltyBalances * - * Get loyalty ledger transaction logs. + * Get customer's loyalty points. * */ - public function testGetLoyaltyTransactions() + public function testGetLoyaltyBalances() + { + } + + /** + * Test case for getLoyaltyCardBalances + * + * Get card's point balances. + * + */ + public function testGetLoyaltyCardBalances() + { + } + + /** + * Test case for getLoyaltyCardTransactions + * + * List card's transactions. + * + */ + public function testGetLoyaltyCardTransactions() + { + } + + /** + * Test case for getLoyaltyProgramProfileTransactions + * + * List customer's loyalty transactions. + * + */ + public function testGetLoyaltyProgramProfileTransactions() { } @@ -192,6 +222,26 @@ public function testGetReservedCustomers() { } + /** + * Test case for linkLoyaltyCardToProfile + * + * Link customer profile to card. + * + */ + public function testLinkLoyaltyCardToProfile() + { + } + + /** + * Test case for reopenCustomerSession + * + * Reopen customer session. + * + */ + public function testReopenCustomerSession() + { + } + /** * Test case for returnCartItems * diff --git a/test/Api/ManagementApiTest.php b/test/Api/ManagementApiTest.php index f090998c..cb034dbe 100644 --- a/test/Api/ManagementApiTest.php +++ b/test/Api/ManagementApiTest.php @@ -12,9 +12,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 @@ -72,10 +72,20 @@ public static function tearDownAfterClass() { } + /** + * Test case for addLoyaltyCardPoints + * + * Add points to card. + * + */ + public function testAddLoyaltyCardPoints() + { + } + /** * Test case for addLoyaltyPoints * - * Add points in loyalty program for given customer. + * Add points to customer profile. * */ public function testAddLoyaltyPoints() @@ -85,7 +95,7 @@ public function testAddLoyaltyPoints() /** * Test case for copyCampaignToApplications * - * Copy the campaign into the specified application. + * Copy the campaign into the specified Application. * */ public function testCopyCampaignToApplications() @@ -175,7 +185,7 @@ public function testCreateCouponsForMultipleRecipients() /** * Test case for createNotificationWebhook * - * Create notification webhook. + * Create notification about campaign-related changes. * */ public function testCreateNotificationWebhook() @@ -202,6 +212,16 @@ public function testCreateSession() { } + /** + * Test case for deductLoyaltyCardPoints + * + * Deduct points from card. + * + */ + public function testDeductLoyaltyCardPoints() + { + } + /** * Test case for deleteAccountCollection * @@ -252,10 +272,20 @@ public function testDeleteCoupons() { } + /** + * Test case for deleteLoyaltyCard + * + * Delete loyalty card. + * + */ + public function testDeleteLoyaltyCard() + { + } + /** * Test case for deleteNotificationWebhook * - * Delete notification webhook. + * Delete notification about campaign-related changes. * */ public function testDeleteNotificationWebhook() @@ -335,17 +365,47 @@ public function testExportEffects() /** * Test case for exportLoyaltyBalance * - * Export customer loyalty balance to a CSV file. + * Export customer loyalty balance to CSV. * */ public function testExportLoyaltyBalance() { } + /** + * Test case for exportLoyaltyBalances + * + * Export customer loyalty balances. + * + */ + public function testExportLoyaltyBalances() + { + } + + /** + * Test case for exportLoyaltyCardBalances + * + * Export all card transaction logs. + * + */ + public function testExportLoyaltyCardBalances() + { + } + + /** + * Test case for exportLoyaltyCardLedger + * + * Export card's ledger log. + * + */ + public function testExportLoyaltyCardLedger() + { + } + /** * Test case for exportLoyaltyLedger * - * Export a customer's loyalty ledger log. + * Export customer's transaction logs. * */ public function testExportLoyaltyLedger() @@ -445,7 +505,7 @@ public function testGetAllRoles() /** * Test case for getApplication * - * Get application. + * Get Application. * */ public function testGetApplication() @@ -455,7 +515,7 @@ public function testGetApplication() /** * Test case for getApplicationApiHealth * - * Get report of health of application API. + * Get Application health. * */ public function testGetApplicationApiHealth() @@ -545,7 +605,7 @@ public function testGetApplicationSessions() /** * Test case for getApplications * - * List applications. + * List Applications. * */ public function testGetApplications() @@ -612,6 +672,16 @@ public function testGetCampaignByAttributes() { } + /** + * Test case for getCampaignTemplates + * + * List campaign templates. + * + */ + public function testGetCampaignTemplates() + { + } + /** * Test case for getCampaigns * @@ -742,10 +812,40 @@ public function testGetExports() { } + /** + * Test case for getLoyaltyCard + * + * Get loyalty card. + * + */ + public function testGetLoyaltyCard() + { + } + + /** + * Test case for getLoyaltyCardTransactionLogs + * + * List card's transactions. + * + */ + public function testGetLoyaltyCardTransactionLogs() + { + } + + /** + * Test case for getLoyaltyCards + * + * List loyalty cards. + * + */ + public function testGetLoyaltyCards() + { + } + /** * Test case for getLoyaltyPoints * - * Get the Loyalty Ledger for this integrationID. + * Get customer's full loyalty ledger. * */ public function testGetLoyaltyPoints() @@ -762,6 +862,16 @@ public function testGetLoyaltyProgram() { } + /** + * Test case for getLoyaltyProgramTransactions + * + * List loyalty program transactions. + * + */ + public function testGetLoyaltyProgramTransactions() + { + } + /** * Test case for getLoyaltyPrograms * @@ -775,7 +885,7 @@ public function testGetLoyaltyPrograms() /** * Test case for getLoyaltyStatistics * - * Get loyalty program statistics by loyalty program ID. + * Get loyalty program statistics. * */ public function testGetLoyaltyStatistics() @@ -785,7 +895,7 @@ public function testGetLoyaltyStatistics() /** * Test case for getNotificationWebhook * - * Get notification webhook. + * Get notification about campaign-related changes. * */ public function testGetNotificationWebhook() @@ -795,7 +905,7 @@ public function testGetNotificationWebhook() /** * Test case for getNotificationWebhooks * - * List notification webhooks. + * List notifications about campaign-related changes. * */ public function testGetNotificationWebhooks() @@ -942,6 +1052,16 @@ public function testImportCoupons() { } + /** + * Test case for importLoyaltyCards + * + * Import loyalty cards. + * + */ + public function testImportLoyaltyCards() + { + } + /** * Test case for importLoyaltyPoints * @@ -1002,10 +1122,30 @@ public function testListCollectionsInApplication() { } + /** + * Test case for postAddedDeductedPointsNotification + * + * Create notification about added or deducted loyalty points. + * + */ + public function testPostAddedDeductedPointsNotification() + { + } + + /** + * Test case for postCatalogsStrikethroughNotification + * + * Create strikethrough notification. + * + */ + public function testPostCatalogsStrikethroughNotification() + { + } + /** * Test case for removeLoyaltyPoints * - * Deduct points in loyalty program for given customer. + * Deduct points from customer profile. * */ public function testRemoveLoyaltyPoints() @@ -1042,6 +1182,16 @@ public function testSearchCouponsAdvancedWithoutTotalCount() { } + /** + * Test case for transferLoyaltyCard + * + * Transfer card data. + * + */ + public function testTransferLoyaltyCard() + { + } + /** * Test case for updateAccountCollection * @@ -1112,10 +1262,20 @@ public function testUpdateCouponBatch() { } + /** + * Test case for updateLoyaltyCard + * + * Update loyalty card status. + * + */ + public function testUpdateLoyaltyCard() + { + } + /** * Test case for updateNotificationWebhook * - * Update notification webhook. + * Update notification about campaign-related changes. * */ public function testUpdateNotificationWebhook() diff --git a/test/Model/APIErrorTest.php b/test/Model/APIErrorTest.php index 213d15dc..e528ab0c 100644 --- a/test/Model/APIErrorTest.php +++ b/test/Model/APIErrorTest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Model/AcceptCouponEffectPropsTest.php b/test/Model/AcceptCouponEffectPropsTest.php index 863378c4..e5ff5854 100644 --- a/test/Model/AcceptCouponEffectPropsTest.php +++ b/test/Model/AcceptCouponEffectPropsTest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Model/AcceptReferralEffectPropsTest.php b/test/Model/AcceptReferralEffectPropsTest.php index 11a2bdc6..5fe9304f 100644 --- a/test/Model/AcceptReferralEffectPropsTest.php +++ b/test/Model/AcceptReferralEffectPropsTest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Model/AccessLogEntryTest.php b/test/Model/AccessLogEntryTest.php index 994dfbf5..5eb36e9d 100644 --- a/test/Model/AccessLogEntryTest.php +++ b/test/Model/AccessLogEntryTest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Model/AccountAdditionalCostTest.php b/test/Model/AccountAdditionalCostTest.php index 8933631a..e431b91f 100644 --- a/test/Model/AccountAdditionalCostTest.php +++ b/test/Model/AccountAdditionalCostTest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Model/AccountAnalyticsTest.php b/test/Model/AccountAnalyticsTest.php index ccce2b61..3088a109 100644 --- a/test/Model/AccountAnalyticsTest.php +++ b/test/Model/AccountAnalyticsTest.php @@ -13,9 +13,9 @@ /** * Talon.One API * - * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerSession](https://docs.talon.one/integration-api/#operation/updateCustomerSessionV2) endpoint is `https://mycompany.talon.one/v2/customer_sessions/{Id}` + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` * - * The version of the OpenAPI document: 1.0.0 + * The version of the OpenAPI document: * * Generated by: https://openapi-generator.tech * OpenAPI Generator version: 4.3.1 diff --git a/test/Model/AccountDashboardStatisticApiCallsTest.php b/test/Model/AccountDashboardStatisticApiCallsTest.php new file mode 100644 index 00000000..6d3b1e73 --- /dev/null +++ b/test/Model/AccountDashboardStatisticApiCallsTest.php @@ -0,0 +1,94 @@ +