diff --git a/Makefile b/Makefile index d8f170ae..57ba83e1 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,3 @@ update-pkg-cache: GOPROXY=https://proxy.golang.org GO111MODULE=on \ - go get github.com/talon-one/talon_go/v5 + go get github.com/talon-one/talon_go/v6 diff --git a/README.md b/README.md index 38ffa884..11e268f4 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - API version: -- Package version: 5.0.0 +- Package version: 6.0.0 - Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen ## Installation @@ -94,7 +94,7 @@ import ( "encoding/json" "fmt" - talon "github.com/talon-one/talon_go/v5" + talon "github.com/talon-one/talon_go/v6" ) func main() { @@ -220,7 +220,7 @@ import ( "context" "fmt" - talon "github.com/talon-one/talon_go/v5" + talon "github.com/talon-one/talon_go/v6" ) func main() { @@ -299,6 +299,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**AddLoyaltyPoints**](docs/ManagementApi.md#addloyaltypoints) | **Put** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points to customer profile *ManagementApi* | [**CopyCampaignToApplications**](docs/ManagementApi.md#copycampaigntoapplications) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified Application *ManagementApi* | [**CreateAccountCollection**](docs/ManagementApi.md#createaccountcollection) | **Post** /v1/collections | Create account-level collection +*ManagementApi* | [**CreateAchievement**](docs/ManagementApi.md#createachievement) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | Create achievement *ManagementApi* | [**CreateAdditionalCost**](docs/ManagementApi.md#createadditionalcost) | **Post** /v1/additional_costs | Create additional cost *ManagementApi* | [**CreateAttribute**](docs/ManagementApi.md#createattribute) | **Post** /v1/attributes | Create custom attribute *ManagementApi* | [**CreateCampaignFromTemplate**](docs/ManagementApi.md#createcampaignfromtemplate) | **Post** /v1/applications/{applicationId}/create_campaign_from_template | Create campaign from campaign template @@ -306,11 +307,15 @@ Class | Method | HTTP request | Description *ManagementApi* | [**CreateCoupons**](docs/ManagementApi.md#createcoupons) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Create coupons *ManagementApi* | [**CreateCouponsAsync**](docs/ManagementApi.md#createcouponsasync) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_async | Create coupons asynchronously *ManagementApi* | [**CreateCouponsForMultipleRecipients**](docs/ManagementApi.md#createcouponsformultiplerecipients) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons_with_recipients | Create coupons for multiple recipients +*ManagementApi* | [**CreateInviteEmail**](docs/ManagementApi.md#createinviteemail) | **Post** /v1/invite_emails | Resend invitation email +*ManagementApi* | [**CreateInviteV2**](docs/ManagementApi.md#createinvitev2) | **Post** /v2/invites | Invite user *ManagementApi* | [**CreatePasswordRecoveryEmail**](docs/ManagementApi.md#createpasswordrecoveryemail) | **Post** /v1/password_recovery_emails | Request a password reset *ManagementApi* | [**CreateSession**](docs/ManagementApi.md#createsession) | **Post** /v1/sessions | Create session *ManagementApi* | [**CreateStore**](docs/ManagementApi.md#createstore) | **Post** /v1/applications/{applicationId}/stores | Create store +*ManagementApi* | [**DeactivateUserByEmail**](docs/ManagementApi.md#deactivateuserbyemail) | **Post** /v1/users/deactivate | Deactivate user by email address *ManagementApi* | [**DeductLoyaltyCardPoints**](docs/ManagementApi.md#deductloyaltycardpoints) | **Put** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points | Deduct points from card *ManagementApi* | [**DeleteAccountCollection**](docs/ManagementApi.md#deleteaccountcollection) | **Delete** /v1/collections/{collectionId} | Delete account-level collection +*ManagementApi* | [**DeleteAchievement**](docs/ManagementApi.md#deleteachievement) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Delete achievement *ManagementApi* | [**DeleteCampaign**](docs/ManagementApi.md#deletecampaign) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId} | Delete campaign *ManagementApi* | [**DeleteCollection**](docs/ManagementApi.md#deletecollection) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId} | Delete campaign-level collection *ManagementApi* | [**DeleteCoupon**](docs/ManagementApi.md#deletecoupon) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Delete coupon @@ -318,8 +323,12 @@ Class | Method | HTTP request | Description *ManagementApi* | [**DeleteLoyaltyCard**](docs/ManagementApi.md#deleteloyaltycard) | **Delete** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Delete loyalty card *ManagementApi* | [**DeleteReferral**](docs/ManagementApi.md#deletereferral) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete referral *ManagementApi* | [**DeleteStore**](docs/ManagementApi.md#deletestore) | **Delete** /v1/applications/{applicationId}/stores/{storeId} | Delete store +*ManagementApi* | [**DeleteUser**](docs/ManagementApi.md#deleteuser) | **Delete** /v1/users/{userId} | Delete user +*ManagementApi* | [**DeleteUserByEmail**](docs/ManagementApi.md#deleteuserbyemail) | **Post** /v1/users/delete | Delete user by email address *ManagementApi* | [**DestroySession**](docs/ManagementApi.md#destroysession) | **Delete** /v1/sessions | Destroy session *ManagementApi* | [**ExportAccountCollectionItems**](docs/ManagementApi.md#exportaccountcollectionitems) | **Get** /v1/collections/{collectionId}/export | Export account-level collection's items +*ManagementApi* | [**ExportAchievements**](docs/ManagementApi.md#exportachievements) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export | Export achievement customer data +*ManagementApi* | [**ExportAudiencesMemberships**](docs/ManagementApi.md#exportaudiencesmemberships) | **Get** /v1/audiences/{audienceId}/memberships/export | Export audience members *ManagementApi* | [**ExportCollectionItems**](docs/ManagementApi.md#exportcollectionitems) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items *ManagementApi* | [**ExportCoupons**](docs/ManagementApi.md#exportcoupons) | **Get** /v1/applications/{applicationId}/export_coupons | Export coupons *ManagementApi* | [**ExportCustomerSessions**](docs/ManagementApi.md#exportcustomersessions) | **Get** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions @@ -336,6 +345,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**GetAccount**](docs/ManagementApi.md#getaccount) | **Get** /v1/accounts/{accountId} | Get account details *ManagementApi* | [**GetAccountAnalytics**](docs/ManagementApi.md#getaccountanalytics) | **Get** /v1/accounts/{accountId}/analytics | Get account analytics *ManagementApi* | [**GetAccountCollection**](docs/ManagementApi.md#getaccountcollection) | **Get** /v1/collections/{collectionId} | Get account-level collection +*ManagementApi* | [**GetAchievement**](docs/ManagementApi.md#getachievement) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Get achievement *ManagementApi* | [**GetAdditionalCost**](docs/ManagementApi.md#getadditionalcost) | **Get** /v1/additional_costs/{additionalCostId} | Get additional cost *ManagementApi* | [**GetAdditionalCosts**](docs/ManagementApi.md#getadditionalcosts) | **Get** /v1/additional_costs | List additional costs *ManagementApi* | [**GetAllAccessLogs**](docs/ManagementApi.md#getallaccesslogs) | **Get** /v1/access_logs | List access logs @@ -353,10 +363,14 @@ Class | Method | HTTP request | Description *ManagementApi* | [**GetApplications**](docs/ManagementApi.md#getapplications) | **Get** /v1/applications | List Applications *ManagementApi* | [**GetAttribute**](docs/ManagementApi.md#getattribute) | **Get** /v1/attributes/{attributeId} | Get custom attribute *ManagementApi* | [**GetAttributes**](docs/ManagementApi.md#getattributes) | **Get** /v1/attributes | List custom attributes +*ManagementApi* | [**GetAudienceMemberships**](docs/ManagementApi.md#getaudiencememberships) | **Get** /v1/audiences/{audienceId}/memberships | List audience members *ManagementApi* | [**GetAudiences**](docs/ManagementApi.md#getaudiences) | **Get** /v1/audiences | List audiences +*ManagementApi* | [**GetAudiencesAnalytics**](docs/ManagementApi.md#getaudiencesanalytics) | **Get** /v1/audiences/analytics | List audience analytics *ManagementApi* | [**GetCampaign**](docs/ManagementApi.md#getcampaign) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId} | Get campaign *ManagementApi* | [**GetCampaignAnalytics**](docs/ManagementApi.md#getcampaignanalytics) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/analytics | Get analytics of campaigns *ManagementApi* | [**GetCampaignByAttributes**](docs/ManagementApi.md#getcampaignbyattributes) | **Post** /v1/applications/{applicationId}/campaigns_search | List campaigns that match the given attributes +*ManagementApi* | [**GetCampaignGroup**](docs/ManagementApi.md#getcampaigngroup) | **Get** /v1/campaign_groups/{campaignGroupId} | Get campaign access group +*ManagementApi* | [**GetCampaignGroups**](docs/ManagementApi.md#getcampaigngroups) | **Get** /v1/campaign_groups | List campaign access groups *ManagementApi* | [**GetCampaignTemplates**](docs/ManagementApi.md#getcampaigntemplates) | **Get** /v1/campaign_templates | List campaign templates *ManagementApi* | [**GetCampaigns**](docs/ManagementApi.md#getcampaigns) | **Get** /v1/applications/{applicationId}/campaigns | List campaigns *ManagementApi* | [**GetChanges**](docs/ManagementApi.md#getchanges) | **Get** /v1/changes | Get audit logs for an account @@ -367,6 +381,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**GetCustomerActivityReportsWithoutTotalCount**](docs/ManagementApi.md#getcustomeractivityreportswithouttotalcount) | **Get** /v1/applications/{applicationId}/customer_activity_reports/no_total | Get Activity Reports for Application Customers *ManagementApi* | [**GetCustomerAnalytics**](docs/ManagementApi.md#getcustomeranalytics) | **Get** /v1/applications/{applicationId}/customers/{customerId}/analytics | Get customer's analytics report *ManagementApi* | [**GetCustomerProfile**](docs/ManagementApi.md#getcustomerprofile) | **Get** /v1/customers/{customerId} | Get customer profile +*ManagementApi* | [**GetCustomerProfileAchievementProgress**](docs/ManagementApi.md#getcustomerprofileachievementprogress) | **Get** /v1/applications/{applicationId}/achievement_progress/{integrationId} | List customer achievements *ManagementApi* | [**GetCustomerProfiles**](docs/ManagementApi.md#getcustomerprofiles) | **Get** /v1/customers/no_total | List customer profiles *ManagementApi* | [**GetCustomersByAttributes**](docs/ManagementApi.md#getcustomersbyattributes) | **Post** /v1/customer_search/no_total | List customer profiles matching the given attributes *ManagementApi* | [**GetEventTypes**](docs/ManagementApi.md#geteventtypes) | **Get** /v1/event_types | List event types @@ -392,6 +407,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**GetWebhooks**](docs/ManagementApi.md#getwebhooks) | **Get** /v1/webhooks | List webhooks *ManagementApi* | [**ImportAccountCollection**](docs/ManagementApi.md#importaccountcollection) | **Post** /v1/collections/{collectionId}/import | Import data into existing account-level collection *ManagementApi* | [**ImportAllowedList**](docs/ManagementApi.md#importallowedlist) | **Post** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute +*ManagementApi* | [**ImportAudiencesMemberships**](docs/ManagementApi.md#importaudiencesmemberships) | **Post** /v1/audiences/{audienceId}/memberships/import | Import audience members *ManagementApi* | [**ImportCollection**](docs/ManagementApi.md#importcollection) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data into existing campaign-level collection *ManagementApi* | [**ImportCoupons**](docs/ManagementApi.md#importcoupons) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons *ManagementApi* | [**ImportLoyaltyCards**](docs/ManagementApi.md#importloyaltycards) | **Post** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards @@ -400,6 +416,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**ImportPoolGiveaways**](docs/ManagementApi.md#importpoolgiveaways) | **Post** /v1/giveaways/pools/{poolId}/import | Import giveaway codes into a giveaway pool *ManagementApi* | [**ImportReferrals**](docs/ManagementApi.md#importreferrals) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals | Import referrals *ManagementApi* | [**ListAccountCollections**](docs/ManagementApi.md#listaccountcollections) | **Get** /v1/collections | List collections in account +*ManagementApi* | [**ListAchievements**](docs/ManagementApi.md#listachievements) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements *ManagementApi* | [**ListCatalogItems**](docs/ManagementApi.md#listcatalogitems) | **Get** /v1/catalogs/{catalogId}/items | List items in a catalog *ManagementApi* | [**ListCollections**](docs/ManagementApi.md#listcollections) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign *ManagementApi* | [**ListCollectionsInApplication**](docs/ManagementApi.md#listcollectionsinapplication) | **Get** /v1/applications/{applicationId}/collections | List collections in Application @@ -414,6 +431,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**SearchCouponsAdvancedWithoutTotalCount**](docs/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/ManagementApi.md#transferloyaltycard) | **Put** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer | Transfer card data *ManagementApi* | [**UpdateAccountCollection**](docs/ManagementApi.md#updateaccountcollection) | **Put** /v1/collections/{collectionId} | Update account-level collection +*ManagementApi* | [**UpdateAchievement**](docs/ManagementApi.md#updateachievement) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Update achievement *ManagementApi* | [**UpdateAdditionalCost**](docs/ManagementApi.md#updateadditionalcost) | **Put** /v1/additional_costs/{additionalCostId} | Update additional cost *ManagementApi* | [**UpdateAttribute**](docs/ManagementApi.md#updateattribute) | **Put** /v1/attributes/{attributeId} | Update custom attribute *ManagementApi* | [**UpdateCampaign**](docs/ManagementApi.md#updatecampaign) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId} | Update campaign @@ -422,7 +440,9 @@ Class | Method | HTTP request | Description *ManagementApi* | [**UpdateCouponBatch**](docs/ManagementApi.md#updatecouponbatch) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Update coupons *ManagementApi* | [**UpdateLoyaltyCard**](docs/ManagementApi.md#updateloyaltycard) | **Put** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Update loyalty card status *ManagementApi* | [**UpdateReferral**](docs/ManagementApi.md#updatereferral) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Update referral +*ManagementApi* | [**UpdateRoleV2**](docs/ManagementApi.md#updaterolev2) | **Put** /v2/roles/{roleId} | Update role *ManagementApi* | [**UpdateStore**](docs/ManagementApi.md#updatestore) | **Put** /v1/applications/{applicationId}/stores/{storeId} | Update store +*ManagementApi* | [**UpdateUser**](docs/ManagementApi.md#updateuser) | **Put** /v1/users/{userId} | Update user ## Documentation For Models @@ -434,7 +454,6 @@ Class | Method | HTTP request | Description - [AccountAdditionalCost](docs/AccountAdditionalCost.md) - [AccountAnalytics](docs/AccountAnalytics.md) - [AccountDashboardStatistic](docs/AccountDashboardStatistic.md) - - [AccountDashboardStatisticApiCalls](docs/AccountDashboardStatisticApiCalls.md) - [AccountDashboardStatisticCampaigns](docs/AccountDashboardStatisticCampaigns.md) - [AccountDashboardStatisticDiscount](docs/AccountDashboardStatisticDiscount.md) - [AccountDashboardStatisticLoyaltyPoints](docs/AccountDashboardStatisticLoyaltyPoints.md) @@ -442,6 +461,9 @@ Class | Method | HTTP request | Description - [AccountDashboardStatisticRevenue](docs/AccountDashboardStatisticRevenue.md) - [AccountEntity](docs/AccountEntity.md) - [AccountLimits](docs/AccountLimits.md) + - [Achievement](docs/Achievement.md) + - [AchievementAdditionalProperties](docs/AchievementAdditionalProperties.md) + - [AchievementProgress](docs/AchievementProgress.md) - [AddFreeItemEffectProps](docs/AddFreeItemEffectProps.md) - [AddItemCatalogAction](docs/AddItemCatalogAction.md) - [AddLoyaltyPoints](docs/AddLoyaltyPoints.md) @@ -452,8 +474,20 @@ Class | Method | HTTP request | Description - [AdditionalCost](docs/AdditionalCost.md) - [ApiError](docs/ApiError.md) - [Application](docs/Application.md) + - [ApplicationAnalyticsDataPoint](docs/ApplicationAnalyticsDataPoint.md) + - [ApplicationAnalyticsDataPointAvgItemsPerSession](docs/ApplicationAnalyticsDataPointAvgItemsPerSession.md) + - [ApplicationAnalyticsDataPointAvgSessionValue](docs/ApplicationAnalyticsDataPointAvgSessionValue.md) + - [ApplicationAnalyticsDataPointSessionsCount](docs/ApplicationAnalyticsDataPointSessionsCount.md) + - [ApplicationAnalyticsDataPointTotalRevenue](docs/ApplicationAnalyticsDataPointTotalRevenue.md) - [ApplicationApiHealth](docs/ApplicationApiHealth.md) - [ApplicationApiKey](docs/ApplicationApiKey.md) + - [ApplicationCampaignAnalytics](docs/ApplicationCampaignAnalytics.md) + - [ApplicationCampaignAnalyticsAvgItemsPerSession](docs/ApplicationCampaignAnalyticsAvgItemsPerSession.md) + - [ApplicationCampaignAnalyticsAvgSessionValue](docs/ApplicationCampaignAnalyticsAvgSessionValue.md) + - [ApplicationCampaignAnalyticsCouponsCount](docs/ApplicationCampaignAnalyticsCouponsCount.md) + - [ApplicationCampaignAnalyticsSessionsCount](docs/ApplicationCampaignAnalyticsSessionsCount.md) + - [ApplicationCampaignAnalyticsTotalDiscounts](docs/ApplicationCampaignAnalyticsTotalDiscounts.md) + - [ApplicationCampaignAnalyticsTotalRevenue](docs/ApplicationCampaignAnalyticsTotalRevenue.md) - [ApplicationCampaignStats](docs/ApplicationCampaignStats.md) - [ApplicationCustomer](docs/ApplicationCustomer.md) - [ApplicationCustomerEntity](docs/ApplicationCustomerEntity.md) @@ -475,7 +509,6 @@ Class | Method | HTTP request | Description - [AudienceMembership](docs/AudienceMembership.md) - [AwardGiveawayEffectProps](docs/AwardGiveawayEffectProps.md) - [BaseCampaign](docs/BaseCampaign.md) - - [BaseCampaignForNotification](docs/BaseCampaignForNotification.md) - [BaseLoyaltyProgram](docs/BaseLoyaltyProgram.md) - [BaseNotification](docs/BaseNotification.md) - [BaseNotificationEntity](docs/BaseNotificationEntity.md) @@ -500,7 +533,6 @@ Class | Method | HTTP request | Description - [CampaignEvaluationGroup](docs/CampaignEvaluationGroup.md) - [CampaignEvaluationPosition](docs/CampaignEvaluationPosition.md) - [CampaignEvaluationTreeChangedNotification](docs/CampaignEvaluationTreeChangedNotification.md) - - [CampaignForNotification](docs/CampaignForNotification.md) - [CampaignGroup](docs/CampaignGroup.md) - [CampaignGroupEntity](docs/CampaignGroupEntity.md) - [CampaignNotification](docs/CampaignNotification.md) @@ -512,10 +544,11 @@ Class | Method | HTTP request | Description - [CampaignSetLeafNode](docs/CampaignSetLeafNode.md) - [CampaignSetNode](docs/CampaignSetNode.md) - [CampaignStateChangedNotification](docs/CampaignStateChangedNotification.md) - - [CampaignStateNotification](docs/CampaignStateNotification.md) - [CampaignTemplate](docs/CampaignTemplate.md) - [CampaignTemplateCollection](docs/CampaignTemplateCollection.md) - [CampaignTemplateParams](docs/CampaignTemplateParams.md) + - [CardExpiringPointsNotificationPolicy](docs/CardExpiringPointsNotificationPolicy.md) + - [CardExpiringPointsNotificationTrigger](docs/CardExpiringPointsNotificationTrigger.md) - [CardLedgerPointsEntryIntegrationApi](docs/CardLedgerPointsEntryIntegrationApi.md) - [CardLedgerTransactionLogEntry](docs/CardLedgerTransactionLogEntry.md) - [CardLedgerTransactionLogEntryIntegrationApi](docs/CardLedgerTransactionLogEntryIntegrationApi.md) @@ -527,6 +560,7 @@ Class | Method | HTTP request | Description - [CatalogSyncRequest](docs/CatalogSyncRequest.md) - [CatalogsStrikethroughNotificationPolicy](docs/CatalogsStrikethroughNotificationPolicy.md) - [Change](docs/Change.md) + - [ChangeLoyaltyTierLevelEffectProps](docs/ChangeLoyaltyTierLevelEffectProps.md) - [ChangeProfilePassword](docs/ChangeProfilePassword.md) - [CodeGeneratorSettings](docs/CodeGeneratorSettings.md) - [Collection](docs/Collection.md) @@ -542,6 +576,7 @@ Class | Method | HTTP request | Description - [CouponSearch](docs/CouponSearch.md) - [CouponValue](docs/CouponValue.md) - [CouponsNotificationPolicy](docs/CouponsNotificationPolicy.md) + - [CreateAchievement](docs/CreateAchievement.md) - [CreateApplicationApiKey](docs/CreateApplicationApiKey.md) - [CreateManagementKey](docs/CreateManagementKey.md) - [CreateTemplateCampaign](docs/CreateTemplateCampaign.md) @@ -560,8 +595,10 @@ Class | Method | HTTP request | Description - [CustomerProfileUpdateV2Response](docs/CustomerProfileUpdateV2Response.md) - [CustomerSession](docs/CustomerSession.md) - [CustomerSessionV2](docs/CustomerSessionV2.md) + - [DeactivateUserRequest](docs/DeactivateUserRequest.md) - [DeductLoyaltyPoints](docs/DeductLoyaltyPoints.md) - [DeductLoyaltyPointsEffectProps](docs/DeductLoyaltyPointsEffectProps.md) + - [DeleteUserRequest](docs/DeleteUserRequest.md) - [Effect](docs/Effect.md) - [EffectEntity](docs/EffectEntity.md) - [EmailEntity](docs/EmailEntity.md) @@ -577,6 +614,8 @@ Class | Method | HTTP request | Description - [Event](docs/Event.md) - [EventType](docs/EventType.md) - [EventV2](docs/EventV2.md) + - [ExpiringCouponsNotificationPolicy](docs/ExpiringCouponsNotificationPolicy.md) + - [ExpiringCouponsNotificationTrigger](docs/ExpiringCouponsNotificationTrigger.md) - [ExpiringPointsNotificationPolicy](docs/ExpiringPointsNotificationPolicy.md) - [ExpiringPointsNotificationTrigger](docs/ExpiringPointsNotificationTrigger.md) - [Export](docs/Export.md) @@ -584,11 +623,13 @@ Class | Method | HTTP request | Description - [FeaturesFeed](docs/FeaturesFeed.md) - [FuncArgDef](docs/FuncArgDef.md) - [FunctionDef](docs/FunctionDef.md) + - [GetIntegrationCouponRequest](docs/GetIntegrationCouponRequest.md) - [Giveaway](docs/Giveaway.md) - [GiveawaysPool](docs/GiveawaysPool.md) - [IdentifiableEntity](docs/IdentifiableEntity.md) - [Import](docs/Import.md) - [ImportEntity](docs/ImportEntity.md) + - [IncreaseAchievementProgressEffectProps](docs/IncreaseAchievementProgressEffectProps.md) - [InlineResponse200](docs/InlineResponse200.md) - [InlineResponse2001](docs/InlineResponse2001.md) - [InlineResponse20010](docs/InlineResponse20010.md) @@ -628,6 +669,10 @@ Class | Method | HTTP request | Description - [InlineResponse20041](docs/InlineResponse20041.md) - [InlineResponse20042](docs/InlineResponse20042.md) - [InlineResponse20043](docs/InlineResponse20043.md) + - [InlineResponse20044](docs/InlineResponse20044.md) + - [InlineResponse20045](docs/InlineResponse20045.md) + - [InlineResponse20046](docs/InlineResponse20046.md) + - [InlineResponse20047](docs/InlineResponse20047.md) - [InlineResponse2005](docs/InlineResponse2005.md) - [InlineResponse2006](docs/InlineResponse2006.md) - [InlineResponse2007](docs/InlineResponse2007.md) @@ -677,6 +722,10 @@ Class | Method | HTTP request | Description - [LoyaltyTier](docs/LoyaltyTier.md) - [ManagementKey](docs/ManagementKey.md) - [ManagerConfig](docs/ManagerConfig.md) + - [MessageLogEntries](docs/MessageLogEntries.md) + - [MessageLogEntry](docs/MessageLogEntry.md) + - [MessageLogRequest](docs/MessageLogRequest.md) + - [MessageLogResponse](docs/MessageLogResponse.md) - [Meta](docs/Meta.md) - [MultiApplicationEntity](docs/MultiApplicationEntity.md) - [MultipleAttribute](docs/MultipleAttribute.md) @@ -721,6 +770,7 @@ Class | Method | HTTP request | Description - [NewLoyaltyTier](docs/NewLoyaltyTier.md) - [NewManagementKey](docs/NewManagementKey.md) - [NewMultipleAudiencesItem](docs/NewMultipleAudiencesItem.md) + - [NewNotificationTest](docs/NewNotificationTest.md) - [NewNotificationWebhook](docs/NewNotificationWebhook.md) - [NewOutgoingIntegrationWebhook](docs/NewOutgoingIntegrationWebhook.md) - [NewPassword](docs/NewPassword.md) @@ -739,6 +789,8 @@ Class | Method | HTTP request | Description - [NewWebhook](docs/NewWebhook.md) - [Notification](docs/Notification.md) - [NotificationActivation](docs/NotificationActivation.md) + - [NotificationListItem](docs/NotificationListItem.md) + - [NotificationTest](docs/NotificationTest.md) - [OneTimeCode](docs/OneTimeCode.md) - [OutgoingIntegrationBrazePolicy](docs/OutgoingIntegrationBrazePolicy.md) - [OutgoingIntegrationCleverTapPolicy](docs/OutgoingIntegrationCleverTapPolicy.md) @@ -754,6 +806,7 @@ Class | Method | HTTP request | Description - [PatchManyItemsCatalogAction](docs/PatchManyItemsCatalogAction.md) - [PendingPointsNotificationPolicy](docs/PendingPointsNotificationPolicy.md) - [Picklist](docs/Picklist.md) + - [Product](docs/Product.md) - [ProfileAudiencesChanges](docs/ProfileAudiencesChanges.md) - [RedeemReferralEffectProps](docs/RedeemReferralEffectProps.md) - [Referral](docs/Referral.md) @@ -788,6 +841,7 @@ Class | Method | HTTP request | Description - [RuleFailureReason](docs/RuleFailureReason.md) - [Ruleset](docs/Ruleset.md) - [SamlConnection](docs/SamlConnection.md) + - [SamlConnectionInternal](docs/SamlConnectionInternal.md) - [SamlConnectionMetadata](docs/SamlConnectionMetadata.md) - [SamlLoginEndpoint](docs/SamlLoginEndpoint.md) - [Session](docs/Session.md) @@ -816,12 +870,15 @@ Class | Method | HTTP request | Description - [TierUpgradeNotificationPolicy](docs/TierUpgradeNotificationPolicy.md) - [TierWillDowngradeNotificationPolicy](docs/TierWillDowngradeNotificationPolicy.md) - [TierWillDowngradeNotificationTrigger](docs/TierWillDowngradeNotificationTrigger.md) + - [TimePoint](docs/TimePoint.md) - [TrackEventV2Response](docs/TrackEventV2Response.md) - [TransferLoyaltyCard](docs/TransferLoyaltyCard.md) - [TriggerWebhookEffectProps](docs/TriggerWebhookEffectProps.md) - [TwoFaConfig](docs/TwoFaConfig.md) - [UpdateAccount](docs/UpdateAccount.md) + - [UpdateAchievement](docs/UpdateAchievement.md) - [UpdateApplication](docs/UpdateApplication.md) + - [UpdateApplicationApiKey](docs/UpdateApplicationApiKey.md) - [UpdateAttributeEffectProps](docs/UpdateAttributeEffectProps.md) - [UpdateAudience](docs/UpdateAudience.md) - [UpdateCampaign](docs/UpdateCampaign.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index d4592f6a..0889ac03 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -32,6 +32,11 @@ tags: - description: | Operations for updating account information such as billing email addresses, inviting users, etc. name: Accounts and users +- description: | + Achievements allow you to reward a customer profile for performing a number of specific actions or reaching a transactional milestone within a defined period. + + For example, you can use achievements to award your customers when they purchase five cups of coffee in one week or when they purchase items worth $3000 in three months. + name: Achievements - description: | An extra fee applied to the cart. For example, shipping fees or processing fees. @@ -64,7 +69,9 @@ tags: See the [docs](https://docs.talon.one/docs/product/audiences/overview). name: Audiences - description: | - Represents the campaign access groups users can create in their Applications. + Represents the campaign access groups you can create in your Applications to organize your campaigns based on the type of campaign or the team in charge. + + See the [docs](https://docs.talon.one/docs/product/account/account-settings/managing-campaign-groups). name: Campaign access groups - description: | Represents templates used to generate campaigns from. @@ -186,14 +193,14 @@ tags: See the [docs](https://docs.talon.one/docs/product/account/account-settings/managing-roles). name: Roles - description: | - Represents the endpoints related to the SAML config used for SSO. + Represents the endpoints related to the SAML configuration used for single sign-on (SSO). name: SAML - description: | Represents a session used for authentication purposes. Create one with the [Create session](#operation/createSession) endpoint. name: Sessions - description: | - Represents single sign-on (SSO) configuration-related endpoints. + Represents [single sign-on](https://docs.talon.one/docs/product/account/account-settings/setting-up-sso) (SSO) configuration-related endpoints. Single sign-on is a way to allow users to access many service providers using a single username and password by relying on a single identity provider. name: Single sign-on @@ -204,7 +211,7 @@ tags: Talang template operations. name: Talang templates - description: | - Represents two-factor authentication (2FA) that requires users of an organization to enter a one-time security code sent to their email address when signing in to their Talon.One account. + Represents [two-factor authentication](https://docs.talon.one/docs/product/account/account-settings/setting-up-2fa) (2FA) that requires users of an organization to enter a one-time security code sent to their email address when signing in to their Talon.One account. name: Two-factor authentication - description: | A way to send information from Talon.One to the URI of your choice. @@ -318,6 +325,21 @@ paths: required: true schema: type: string + - description: | + A timestamp value of a future date that acts as a current date when included in the query. + + Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). + + **Note:** + + - It must be an RFC3339 timestamp string. + - It can **only** be a date in the future. + - It can **only** be used if the `dry` parameter in the query is set to `true`. + in: query + name: now + schema: + format: date-time + type: string requestBody: content: application/json: @@ -705,8 +727,7 @@ paths: **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). operationId: deleteAudienceV2 parameters: - - description: The ID of the audience. You get it via the `id` property when - [creating an audience](#operation/createAudienceV2). + - description: The ID of the audience. in: path name: audienceId required: true @@ -746,8 +767,7 @@ paths: To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint. operationId: updateAudienceV2 parameters: - - description: The ID of the audience. You get it via the `id` property when - [creating an audience](#operation/createAudienceV2). + - description: The ID of the audience. in: path name: audienceId required: true @@ -791,8 +811,7 @@ paths: Remove all members from this audience. operationId: deleteAudienceMembershipsV2 parameters: - - description: The ID of the audience. You get it via the `id` property when - [creating an audience](#operation/createAudienceV2). + - description: The ID of the audience. in: path name: audienceId required: true @@ -822,12 +841,11 @@ paths: /v2/customer_audiences: post: description: | - Update the specified customer profiles with the specified audiences. Use this endpoint - when customers join or leave audiences. + Add customer profiles to or remove them from an audience. - The limit of customer profiles per request is 1000. + The endpoint supports 1000 audience actions (`add` or `remove`) per request. - **Note:** You can also add customer profiles to or remove them from an audience using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect. + **Note:** You can also do this using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect. operationId: updateCustomerProfileAudiences requestBody: content: @@ -870,8 +888,7 @@ paths: Update the specified profile attributes to the provided values for all customers in the specified audience. operationId: updateAudienceCustomersAttributes parameters: - - description: The ID of the audience. You get it via the `id` property when - [creating an audience](#operation/createAudienceV2). + - description: The ID of the audience. in: path name: audienceId required: true @@ -1402,6 +1419,11 @@ paths: name: giveaways schema: type: boolean + - description: Set to `true` to include achievement information in the response. + in: query + name: achievements + schema: + type: boolean responses: "200": content: @@ -1453,7 +1475,10 @@ paths: - description: | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: @@ -1524,7 +1549,10 @@ paths: - description: | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: @@ -1605,7 +1633,10 @@ paths: - description: | Date and time from which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: startDate schema: @@ -1614,13 +1645,16 @@ paths: - description: | Date and time by which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: format: date-time type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -1715,7 +1749,10 @@ paths: - description: | Date and time from which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: startDate schema: @@ -1724,13 +1761,16 @@ paths: - description: | Date and time by which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: format: date-time type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -1817,7 +1857,7 @@ paths: name: subledgerId schema: type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -1906,7 +1946,7 @@ paths: name: subledgerId schema: type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -1955,7 +1995,7 @@ paths: description: List all applications in the current account. operationId: getApplications parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -2015,7 +2055,7 @@ paths: List the campaigns of the specified application that match your filter criteria. operationId: getCampaigns parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -2079,7 +2119,7 @@ paths: type: string - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -2087,7 +2127,7 @@ paths: type: string - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -2288,7 +2328,7 @@ paths: A notification for added or deducted loyalty points is different from regular webhooks in that it is loyalty program-scoped and has a predefined payload. - For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-loyalty-notifications). + For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications). operationId: postAddedDeductedPointsNotification parameters: - description: | @@ -2338,7 +2378,7 @@ paths: /v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points: post: description: | - Create a notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-loyalty-notifications). + Create a notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications). operationId: postPendingPointsNotification parameters: - description: | @@ -2443,7 +2483,7 @@ paths: Get a list of all the campaigns that match a set of attributes. operationId: getCampaignByAttributes parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -2519,7 +2559,7 @@ paths: You should only consider the latest revision of the returned rulesets. operationId: getRulesets parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -2628,7 +2668,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -2636,7 +2676,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -2644,7 +2684,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: startsAfter schema: @@ -2652,7 +2692,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: startsBefore schema: @@ -2660,7 +2700,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: expiresAfter schema: @@ -2668,7 +2708,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: expiresBefore schema: @@ -2920,7 +2960,7 @@ paths: List all the coupons matching the specified criteria. operationId: getCouponsWithoutTotalCount parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -2965,7 +3005,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -2973,7 +3013,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -3131,7 +3171,7 @@ paths: **Note:** The total count is not included in the response. operationId: searchCouponsAdvancedWithoutTotalCount parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -3176,7 +3216,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -3184,7 +3224,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -3263,7 +3303,7 @@ paths: **Note:** The total count is not included in the response. operationId: searchCouponsAdvancedApplicationWideWithoutTotalCount parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -3301,7 +3341,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -3309,7 +3349,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -3476,7 +3516,7 @@ paths: description: List all referrals of the specified campaign. operationId: getReferralsWithoutTotalCount parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -3521,7 +3561,7 @@ paths: type: string - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -3529,7 +3569,7 @@ paths: type: string - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -3570,12 +3610,70 @@ paths: summary: List referrals tags: - management + /v1/campaign_groups: + get: + description: List the campaign access groups in the current account. + operationId: getCampaignGroups + parameters: + - description: The number of items in the response. + in: query + name: pageSize + schema: + default: 1000 + maximum: 1000 + minimum: 1 + type: integer + - description: The number of items to skip when paging through large result + sets. + in: query + name: skip + schema: + type: integer + - description: | + The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. + + **Note:** This parameter works only with numeric fields. + in: query + name: sort + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_11' + description: OK + summary: List campaign access groups + tags: + - management + /v1/campaign_groups/{campaignGroupId}: + get: + description: Get a campaign access group specified by its ID. + operationId: getCampaignGroup + parameters: + - description: The ID of the campaign access group. + in: path + name: campaignGroupId + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/CampaignGroup' + description: OK + summary: Get campaign access group + tags: + - management /v1/campaign_templates: get: description: Retrieve a list of campaign templates. operationId: getCampaignTemplates parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -3628,7 +3726,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_11' + $ref: '#/components/schemas/inline_response_200_12' description: OK summary: List campaign templates tags: @@ -3677,7 +3775,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_12' + $ref: '#/components/schemas/inline_response_200_13' description: OK summary: List loyalty programs tags: @@ -3693,7 +3791,7 @@ paths: operationId: getLoyaltyProgram parameters: - description: | - Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with + Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. in: path name: loyaltyProgramId @@ -3716,7 +3814,7 @@ paths: 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. + Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. The CSV file contains the following columns: @@ -3756,7 +3854,7 @@ paths: operationId: importLoyaltyPoints parameters: - description: | - Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with + Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. in: path name: loyaltyProgramId @@ -3769,8 +3867,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -3799,9 +3896,11 @@ paths: About customer assignment to a tier: - If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. - - If the customer is already in a tier, the customer is assigned to match the new information provided in the CSV file. - If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. + **Note:** We recommend not using this endpoint to update the tier of a customer. + To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. + 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. @@ -3816,7 +3915,7 @@ paths: operationId: importLoyaltyCustomersTiers parameters: - description: | - Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with + Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. in: path name: loyaltyProgramId @@ -3829,8 +3928,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -4030,18 +4128,27 @@ paths: - `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. + - `campaignid`: The ID of the campaign. operationId: exportLoyaltyLedger parameters: - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd required: true @@ -4073,9 +4180,9 @@ paths: content: application/csv: example: | - customerprofileid,customersessionid,rulesetid,rulename,programid,type,name,subledgerid,startdate,expirydate,id,created,amount,archived - 8NHOS78H,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,subtraction,10% of current total,,immediate,unlimited,60803,2022-11-29 16:16:10,100.00,false - EB780RDN,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,addition,Reimbursed loyalty points,,immediate,unlimited,60804,2022-11-29 16:16:23,100.00,false + customerprofileid,customersessionid,rulesetid,rulename,programid,type,name,subledgerid,startdate,expirydate,id,created,amount,archived,campaignid + 8NHOS78H,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,subtraction,10% of current total,,immediate,unlimited,60803,2022-11-29 16:16:10,100.00,false,5 + EB780RDN,06b0fafb-ccbf-42c7-b44b-d858e8b525022,1691,test,37,addition,Reimbursed loyalty points,,immediate,unlimited,60804,2022-11-29 16:16:23,100.00,false,5 schema: format: csv type: string @@ -4153,7 +4260,7 @@ paths: operationId: getLoyaltyStatistics parameters: - description: | - Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with + Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. in: path name: loyaltyProgramId @@ -4198,7 +4305,10 @@ paths: - description: | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: @@ -4252,7 +4362,10 @@ paths: - description: | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: @@ -4284,15 +4397,15 @@ paths: /v1/loyalty_programs/{loyaltyProgramId}/transactions: get: description: | - 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. + Retrieve loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. + **Note:** 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). operationId: getLoyaltyProgramTransactions parameters: - description: | - Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with + Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. in: path name: loyaltyProgramId @@ -4320,7 +4433,10 @@ paths: - description: | Date and time from which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: startDate schema: @@ -4329,13 +4445,16 @@ paths: - description: | Date and time by which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: format: date-time type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -4354,7 +4473,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_13' + $ref: '#/components/schemas/inline_response_200_14' description: OK "400": content: @@ -4413,8 +4532,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -4468,7 +4586,10 @@ paths: - description: | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: @@ -4506,7 +4627,7 @@ paths: For the given card-based loyalty program, list the loyalty cards that match your filter criteria. operationId: getLoyaltyCards parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -4553,7 +4674,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_14' + $ref: '#/components/schemas/inline_response_200_15' description: OK "400": content: @@ -4855,16 +4976,24 @@ paths: schema: maxLength: 108 type: string - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd required: true @@ -4930,7 +5059,10 @@ paths: - description: | Date and time from which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: startDate schema: @@ -4939,13 +5071,16 @@ paths: - description: | Date and time by which results are returned. Results are filtered by transaction creation date. - **Note:** It must be an RFC3339 timestamp string. + **Note:** + + - It must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: endDate schema: format: date-time type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -4969,7 +5104,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_15' + $ref: '#/components/schemas/inline_response_200_16' description: OK "401": content: @@ -5053,16 +5188,16 @@ paths: 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. + - `code` (required): The code of your giveaway, for instance, a gift card redemption code. + - `startdate`: The start date in RFC3339 of the code redemption period. + - `enddate`: The last date in RFC3339 of the code redemption period. - `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `"{"provider": "myPartnerCompany"}"`. The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. - You can use the time zone of your choice. The values are converted to UTC internally by Talon.One. + You can use the time zone setting of your choice. The values are converted to UTC internally by Talon.One. **Note:** @@ -5092,8 +5227,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -5174,7 +5308,7 @@ paths: description: List account-level collections in the account. operationId: listAccountCollections parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -5215,7 +5349,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_16' + $ref: '#/components/schemas/inline_response_200_17' description: OK "400": content: @@ -5385,7 +5519,7 @@ paths: You can retrieve items from both account-level collections and campaign-level collections using this endpoint. operationId: getCollectionItems parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -5411,7 +5545,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_17' + $ref: '#/components/schemas/inline_response_200_18' description: OK "404": content: @@ -5434,7 +5568,7 @@ paths: required: true schema: type: integer - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -5475,7 +5609,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_18' + $ref: '#/components/schemas/inline_response_200_17' description: OK "404": content: @@ -5505,7 +5639,7 @@ paths: required: true schema: type: integer - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -5546,7 +5680,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_18' + $ref: '#/components/schemas/inline_response_200_17' description: OK "404": content: @@ -5761,8 +5895,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -5840,8 +5973,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -6026,23 +6158,31 @@ paths: - success - error type: string - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd required: true schema: format: date-time type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6080,19 +6220,25 @@ paths: Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs. operationId: getAllAccessLogs parameters: - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart - required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd - required: true schema: format: date-time type: string @@ -6122,7 +6268,7 @@ paths: - success - error type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6173,16 +6319,24 @@ paths: required: true schema: type: integer - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd required: true @@ -6228,7 +6382,7 @@ paths: name: integrationId schema: type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6276,7 +6430,7 @@ paths: required: true schema: type: integer - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6325,7 +6479,7 @@ paths: 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. operationId: getCustomersByAttributes parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6402,7 +6556,7 @@ paths: description: List all customer profiles. operationId: getCustomerProfiles parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6470,7 +6624,7 @@ paths: in the response, this endpoint only mentions whether there are more results. operationId: getCustomerActivityReportsWithoutTotalCount parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6492,16 +6646,24 @@ paths: name: sort schema: type: string - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd required: true @@ -6552,7 +6714,7 @@ paths: in a time range. operationId: getCustomerActivityReport parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6566,16 +6728,24 @@ paths: name: skip schema: type: integer - - description: Only return results from after this timestamp. This must be an - RFC3339 timestamp string. + - description: | + Only return results from after this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeStart required: true schema: format: date-time type: string - - description: Only return results from before this timestamp. This must be - an RFC3339 timestamp string. + - description: | + Only return results from before this timestamp. + + **Note:** + - This must be an RFC3339 timestamp string. + - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. in: query name: rangeEnd required: true @@ -6612,7 +6782,7 @@ paths: description: Fetch analytics for a given customer in the given application. operationId: getCustomerAnalytics parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6665,7 +6835,7 @@ paths: List all the sessions of the specified Application. operationId: getApplicationSessions parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6703,14 +6873,14 @@ paths: - cancelled type: string - description: Only return events created before this date. You can use any - timezone. Talon.One will convert to UTC internally. + time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: format: date-time type: string - - description: Only return events created after this date. You can use any timezone. - Talon.One will convert to UTC internally. + - description: Only return events created after this date. You can use any time + zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -6731,6 +6901,12 @@ paths: name: integrationId schema: type: string + - description: The integration ID of the store. You choose this ID when you + create a store. + in: query + name: storeIntegrationId + schema: + type: string - description: The ID of the Application. It is displayed in your Talon.One deployment URL. in: path @@ -6785,7 +6961,7 @@ paths: Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. operationId: getApplicationEventsWithoutTotalCount parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6814,14 +6990,14 @@ paths: schema: type: string - description: Only return events created before this date. You can use any - timezone. Talon.One will convert to UTC internally. + time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: format: date-time type: string - - description: Only return events created after this date. You can use any timezone. - Talon.One will convert to UTC internally. + - description: Only return events created after this date. You can use any time + zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -6895,7 +7071,7 @@ paths: See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) operationId: getApplicationEventTypes parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6940,7 +7116,7 @@ paths: Get all audiences created in the account. To create an audience, use [Create audience](https://docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2). operationId: getAudiences parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -6981,13 +7157,52 @@ paths: summary: List audiences tags: - management - /v1/applications/{applicationId}/profile/{integrationId}/friends: + /v1/audiences/analytics: get: description: | - List the friends referred by the specified customer profile in this Application. - operationId: getApplicationCustomerFriends + Get a list of audience IDs and their member count. + operationId: getAudiencesAnalytics + parameters: + - description: | + The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. + + **Note:** This parameter works only with numeric fields. + in: query + name: sort + schema: + type: string + - description: The IDs of one or more audiences, separated by commas, by which + to filter results. + in: query + name: audienceIds + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_31' + description: OK + summary: List audience analytics + tags: + - management + /v1/audiences/{audienceId}/memberships: + get: + description: | + Get a paginated list of the customer profiles in a given audience. + + A maximum of 1000 customer profiles per page is allowed. + operationId: getAudienceMemberships parameters: - - description: The number of items in this response. + - description: The ID of the audience. + in: path + name: audienceId + required: true + schema: + type: integer + - description: The number of items in the response. in: query name: pageSize schema: @@ -7009,45 +7224,208 @@ paths: name: sort schema: type: string - - description: The ID of the Application. It is displayed in your Talon.One - deployment URL. + - description: The filter to select a profile. + in: query + name: profileQuery + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_32' + description: OK + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: List audience members + tags: + - management + /v1/audiences/{audienceId}/memberships/import: + post: + description: | + Upload a CSV file containing the integration IDs of the members you want to add to an audience. + + The file should be sent as multipart data and should contain only the following column (required): + - `profileintegrationid`: The integration ID of the customer profile. + + The import **replaces** the previous list of audience members. + + **Note:** We recommend limiting your file size to 500MB. + + Example: + + ```text + profileintegrationid + charles + alexa + ``` + operationId: importAudiencesMemberships + parameters: + - description: The ID of the audience. in: path - name: applicationId + name: audienceId required: true schema: type: integer - - description: | - 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. + requestBody: + content: + multipart/form-data: + schema: + properties: + upFile: + description: The file containing the data that is being imported. + format: csv + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Import' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized - Invalid API key + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: Import audience members + tags: + - management + /v1/audiences/{audienceId}/memberships/export: + get: + description: | + Download a CSV file containing the integration IDs of the members of an audience. - - 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. - in: query - name: withTotalResultSize - schema: - type: boolean - - description: The Integration ID of the Advocate's Profile. + **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 file contains the following column: + - `profileintegrationid`: The integration ID of the customer profile. + operationId: exportAudiencesMemberships + parameters: + - description: The ID of the audience. in: path - name: integrationId + name: audienceId required: true schema: - type: string + type: integer responses: "200": content: - application/json: + application/csv: + example: | + profileintegrationid + URNGV8294NV + BZGGC2454PA schema: - $ref: '#/components/schemas/inline_response_200_31' + format: csv + type: string description: OK - summary: List friends referred by customer profile + "400": + content: + application/csv: + schema: + $ref: '#/components/schemas/ErrorResponse' + description: Bad request + "401": + content: + application/csv: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized - Invalid API key + "404": + content: + application/csv: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: Export audience members tags: - management - /v1/attributes: + /v1/applications/{applicationId}/profile/{integrationId}/friends: get: description: | - Return all the custom attributes for the account. - operationId: getAttributes + List the friends referred by the specified customer profile in this Application. + operationId: getApplicationCustomerFriends parameters: - - description: The number of items in this response. + - description: The number of items in the response. + in: query + name: pageSize + schema: + default: 1000 + maximum: 1000 + minimum: 1 + type: integer + - description: The number of items to skip when paging through large result + sets. + in: query + name: skip + schema: + type: integer + - description: | + The field by which results should be sorted. By default, results are sorted in ascending order. To sort them in descending order, prefix the field name with `-`. + + **Note:** This parameter works only with numeric fields. + in: query + name: sort + schema: + type: string + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: | + 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. + in: query + name: withTotalResultSize + schema: + type: boolean + - description: The Integration ID of the Advocate's Profile. + in: path + name: integrationId + required: true + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_33' + description: OK + summary: List friends referred by customer profile + tags: + - management + /v1/attributes: + get: + description: | + Return all the custom attributes for the account. + operationId: getAttributes + parameters: + - description: The number of items in the response. in: query name: pageSize schema: @@ -7079,7 +7457,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_32' + $ref: '#/components/schemas/inline_response_200_34' description: OK summary: List custom attributes tags: @@ -7214,8 +7592,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -7259,7 +7636,7 @@ paths: required: true schema: type: integer - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -7282,17 +7659,30 @@ paths: name: withTotalResultSize schema: type: boolean - - description: The SKU of the item. + - description: Filter results by one or more SKUs. Must be exact match. + explode: false in: query name: sku schema: - type: string + items: + type: string + type: array + style: form + - description: Filter results by one or more product names. Must be exact match. + explode: false + in: query + name: productNames + schema: + items: + type: string + type: array + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_33' + $ref: '#/components/schemas/inline_response_200_35' description: OK summary: List items in a catalog tags: @@ -7300,19 +7690,24 @@ paths: /v1/catalogs/{catalogId}/sync: put: description: | - Perform one or more of the following sync actions on this cart item catalog, up to 1000 actions: + Perform one or more of the following actions for a given cart item catalog: + + - Adding an item to the catalog. + - Adding several items to the catalog. + - Editing the attributes of an item in the catalog. + - Editing the attributes of several items in the catalog. + - Removing an item from the catalog. + - Removing several items from the catalog. - - 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. + You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. - **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). + **Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. + + For more information, read [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) + Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. @@ -7352,11 +7747,57 @@ paths: "payload": { "attributes": { "color": "Navy blue", - "type": "shoe" + "type": "shoes" }, "replaceIfExists": true, "sku": "SKU1241028", - "price": 100 + "price": 100, + "product": { + "name": "sneakers" + } + }, + "type": "ADD" + } + ] + } + ``` + + + +
+ Adding several items to the catalog +
+ + ```json + { + "actions": [ + { + "payload": { + "attributes": { + "color": "Navy blue", + "type": "shoes" + }, + "replaceIfExists": true, + "sku": "SKU1241027", + "price": 100, + "product": { + "name": "sneakers" + } + }, + "type": "ADD" + }, + { + "payload": { + "attributes": { + "color": "Navy blue", + "type": "shoes" + }, + "replaceIfExists": true, + "sku": "SKU1241028", + "price": 100, + "product": { + "name": "sneakers" + } }, "type": "ADD" } @@ -7380,7 +7821,10 @@ paths: "origin": "germany" }, "createIfNotExists": false, - "sku": "SKU1241028" + "sku": "SKU1241028", + "product": { + "name": "sneakers" + } }, "type": "PATCH" } @@ -7391,7 +7835,7 @@ paths:
- Editing the attributes of several items at once + Editing the attributes of several items in the catalog
```json @@ -7440,7 +7884,7 @@ paths:
- Removing several items from the catalog at once + Removing several items from the catalog
```json @@ -7545,7 +7989,7 @@ paths: Returns all the defined additional costs for the account. operationId: getAdditionalCosts parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -7572,7 +8016,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_34' + $ref: '#/components/schemas/inline_response_200_36' description: OK summary: List additional costs tags: @@ -7672,7 +8116,7 @@ paths: name: sort schema: type: string - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -7718,7 +8162,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_35' + $ref: '#/components/schemas/inline_response_200_37' description: OK summary: List webhooks tags: @@ -7752,7 +8196,7 @@ paths: triggers a webhook effect. See the [docs](https://docs.talon.one/docs/dev/getting-started/webhooks). operationId: getWebhookActivationLogs parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -7795,14 +8239,14 @@ paths: schema: type: number - description: Only return events created before this date. You can use any - timezone. Talon.One will convert to UTC internally. + time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: format: date-time type: string - - description: Only return events created after this date. You can use any timezone. - Talon.One will convert to UTC internally. + - description: Only return events created after this date. You can use any time + zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -7813,7 +8257,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_36' + $ref: '#/components/schemas/inline_response_200_38' description: OK summary: List webhook activation log entries tags: @@ -7823,7 +8267,7 @@ paths: description: Retrieve all webhook log entries. operationId: getWebhookLogs parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -7875,7 +8319,7 @@ paths: type: string - description: 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. + can use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -7883,7 +8327,7 @@ paths: type: string - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -7894,7 +8338,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_37' + $ref: '#/components/schemas/inline_response_200_39' description: OK summary: List webhook log entries tags: @@ -7917,7 +8361,7 @@ paths: schema: default: false type: boolean - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -7944,7 +8388,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_38' + $ref: '#/components/schemas/inline_response_200_40' description: OK summary: List event types tags: @@ -7998,14 +8442,20 @@ paths: required: true schema: type: integer + - description: | + An indicator of whether to skip duplicate coupon values instead of causing an error. + Duplicate values are ignored when `skipDuplicates=true`. + in: query + name: skipDuplicates + schema: + type: boolean requestBody: content: multipart/form-data: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -8084,7 +8534,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -8092,7 +8542,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -8222,7 +8672,7 @@ paths: type: number - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -8230,7 +8680,7 @@ paths: type: string - description: 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. + use any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -8326,7 +8776,7 @@ paths: type: number - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -8334,7 +8784,7 @@ paths: type: string - description: Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use - any timezone. Talon.One will convert to UTC internally. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -8445,7 +8895,7 @@ paths: application/csv: example: | id,firstsession,integrationid,applicationid,profileid,profileintegrationid,created,state,cartitems,discounts,total,attributes,closedat,cancelledat,referral,identifiers,additional_costs,updated,store_integration_id,coupons - 12327,true,62791173fbf323ee5cfd96f3,270,6111,dxclwds,2022-05-09T13:05:31Z,open,"[{""sku"": ""B00004TKVY"", ""name"": ""Gravel bike - \""Aisle of Man\"""", ""price"": 1800, ""weight"": 6, ""category"": ""gravelbikes"", ""position"": 0, ""quantity"": 1, ""attributes"": {""color"": [""black,white""], ""material"": ""titanium""}, ""returnedQuantity"": 0, ""remainingQuantity"": 1}]","{}",1850.00,"{""ShippingCost"": 50, ""PaymentMethod"": ""creditcard"", ""ShippingMethod"": ""Standard""}",0001-01-01T00:00:00Z,0001-01-01T00:00:00Z,,"null","{""ShippingCost"": {""price"": 50}}",2022-05-09T13:13:28Z,"STORE-001","[""SORRY5QMUJRWA""]" + 12328,true,62791173fbf323ee5cfd96f3,270,6111,dxclwds,2022-05-09T13:05:31Z,open,"[{""sku"": ""B00004TKVY"", ""name"": ""Gravel bike - \""Aisle of Man\"""", ""price"": 1800, ""weight"": 6, ""category"": ""gravelbikes"", ""position"": 0, ""quantity"": 1, ""attributes"": {""color"": [""black,white""], ""material"": ""titanium""}, ""returnedQuantity"": 0, ""remainingQuantity"": 1}]","{}",1850.00,"{""ShippingCost"": 50, ""PaymentMethod"": ""creditcard"", ""ShippingMethod"": ""Standard""}",0001-01-01T00:00:00Z,0001-01-01T00:00:00Z,,"null","{""ShippingCost"": {""price"": 50}}",2022-05-09T13:13:28Z,"STORE-001","[""SORRY5QMUJRWA""]" schema: format: csv type: string @@ -8509,8 +8959,7 @@ paths: schema: properties: upFile: - description: The file with the information about the data that should - be imported. + description: The file containing the data that is being imported. format: csv type: string responses: @@ -8529,7 +8978,7 @@ paths: Retrieve all users in your account. operationId: getUsers parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -8556,12 +9005,29 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_39' + $ref: '#/components/schemas/inline_response_200_41' description: OK summary: List users in account tags: - management /v1/users/{userId}: + delete: + description: Delete a specific user. + operationId: deleteUser + parameters: + - description: The ID of the user. + in: path + name: userId + required: true + schema: + type: integer + responses: + "204": + content: {} + description: No Content + summary: Delete user + tags: + - management get: description: | Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile. @@ -8583,13 +9049,81 @@ paths: summary: Get user tags: - management + put: + description: Update the details of a specific user. + operationId: updateUser + parameters: + - description: The ID of the user. + in: path + name: userId + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateUser' + description: body + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: OK + summary: Update user + tags: + - management + x-codegen-request-body-name: body + /v1/users/delete: + post: + description: | + Delete a specific user by their email address. + operationId: deleteUserByEmail + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeleteUserRequest' + description: body + required: true + responses: + "204": + content: {} + description: No Content + summary: Delete user by email address + tags: + - management + x-codegen-request-body-name: body + /v1/users/deactivate: + post: + description: | + Deactivate a specific user by their email address. + operationId: deactivateUserByEmail + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DeactivateUserRequest' + description: body + required: true + responses: + "204": + content: {} + description: No Content + summary: Deactivate user by email address + tags: + - management + x-codegen-request-body-name: body /v1/changes: get: description: | Retrieve the audit logs displayed in **Accounts > Audit logs**. operationId: getChanges parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -8629,7 +9163,7 @@ paths: type: integer - description: 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. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdBefore schema: @@ -8637,7 +9171,7 @@ paths: type: string - description: 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. + any time zone setting. Talon.One will convert to UTC internally. in: query name: createdAfter schema: @@ -8668,11 +9202,61 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_40' + $ref: '#/components/schemas/inline_response_200_42' description: OK summary: Get audit logs for an account tags: - management + /v2/invites: + post: + description: | + Create a new user in the account and send an invitation to their email address. + + **Note**: The invitation token is valid for 24 hours after the email has been sent. You can resend an invitation to a user with the [Resend invitation email](https://docs.talon.one/management-api#tag/Accounts-and-users/operation/createInviteEmail) endpoint. + operationId: createInviteV2 + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewInvitation' + description: body + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/User' + description: Created + summary: Invite user + tags: + - management + x-codegen-request-body-name: body + /v1/invite_emails: + post: + description: | + Resend an email invitation to an existing user. + + **Note:** The invitation token is valid for 24 hours after the email has been sent. + operationId: createInviteEmail + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewInviteEmail' + description: body + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/NewInviteEmail' + description: Created + summary: Resend invitation email + tags: + - management + x-codegen-request-body-name: body /v1/password_recovery_emails: post: description: | @@ -8823,7 +9407,7 @@ paths: List all past exports operationId: getExports parameters: - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -8866,7 +9450,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_41' + $ref: '#/components/schemas/inline_response_200_43' description: OK summary: Get exports tags: @@ -8880,7 +9464,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_42' + $ref: '#/components/schemas/inline_response_200_44' description: OK summary: List roles tags: @@ -8891,7 +9475,10 @@ paths: Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). operationId: getRole parameters: - - description: 'The ID of role. ' + - description: | + ID of role. + + **Note**: To find the ID of a role, use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint. in: path name: roleId required: true @@ -8907,6 +9494,35 @@ paths: summary: Get role tags: - management + /v2/roles/{roleId}: + put: + description: Update a specific role. + operationId: updateRoleV2 + parameters: + - description: 'The ID of role. ' + in: path + name: roleId + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateRoleV2' + description: body + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/RoleV2' + description: OK + summary: Update role + tags: + - management + x-codegen-request-body-name: body /v1/applications/{applicationId}/stores: get: description: List all stores for a specific Application. @@ -8919,7 +9535,7 @@ paths: required: true schema: type: integer - - description: The number of items in this response. + - description: The number of items in the response. in: query name: pageSize schema: @@ -8965,12 +9581,17 @@ paths: name: integrationId schema: type: string + - description: Filter results by `name` or `integrationId`. + in: query + name: query + schema: + type: string responses: "200": content: application/json: schema: - $ref: '#/components/schemas/inline_response_200_43' + $ref: '#/components/schemas/inline_response_200_45' description: OK summary: List stores tags: @@ -9134,6 +9755,402 @@ paths: tags: - management x-codegen-request-body-name: body + /v1/applications/{applicationId}/campaigns/{campaignId}/achievements: + get: + description: List all the achievements for a specific campaign. + operationId: listAchievements + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The ID of the campaign. It is displayed in your Talon.One deployment + URL. + in: path + name: campaignId + required: true + schema: + type: integer + - description: The number of items in the response. + in: query + name: pageSize + schema: + default: 50 + maximum: 50 + minimum: 1 + type: integer + - description: The number of items to skip when paging through large result + sets. + in: query + name: skip + schema: + type: integer + - description: | + Filter by the display name for the achievement in the campaign manager. + + **Note**: If no `title` is provided, all the achievements from the campaign are returned. + in: query + name: title + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_46' + description: OK + summary: List achievements + tags: + - management + post: + description: Create a new achievement in a specific campaign. + operationId: createAchievement + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The ID of the campaign. It is displayed in your Talon.One deployment + URL. + in: path + name: campaignId + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateAchievement' + description: body + required: true + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Achievement' + description: Created + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized + "409": + content: {} + description: Conflict. An achievement with this name or title already exists. + summary: Create achievement + tags: + - management + x-codegen-request-body-name: body + /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}: + delete: + description: Delete the specified achievement. + operationId: deleteAchievement + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The ID of the campaign. It is displayed in your Talon.One deployment + URL. + in: path + name: campaignId + required: true + schema: + type: integer + - description: The ID of the achievement. You can get this ID with the [List + achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) + endpoint. + in: path + name: achievementId + required: true + schema: + type: integer + responses: + "204": + content: {} + description: No Content + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: Delete achievement + tags: + - management + get: + description: Get the details of a specific achievement. + operationId: getAchievement + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The ID of the campaign. It is displayed in your Talon.One deployment + URL. + in: path + name: campaignId + required: true + schema: + type: integer + - description: The ID of the achievement. You can get this ID with the [List + achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) + endpoint. + in: path + name: achievementId + required: true + schema: + type: integer + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Achievement' + description: OK + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: Get achievement + tags: + - management + put: + description: Update the details of a specific achievement. + operationId: updateAchievement + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The ID of the campaign. It is displayed in your Talon.One deployment + URL. + in: path + name: campaignId + required: true + schema: + type: integer + - description: The ID of the achievement. You can get this ID with the [List + achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) + endpoint. + in: path + name: achievementId + required: true + schema: + type: integer + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/UpdateAchievement' + description: body + required: true + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Achievement' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized + "404": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: Update achievement + tags: + - management + x-codegen-request-body-name: body + /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export: + get: + description: | + Download a CSV file containing a list of all the customers who have participated in and are currently participating in the given achievement. + + The CSV file contains the following columns: + - `profileIntegrationID`: The integration ID of the customer profile participating in the achievement. + - `title`: The display name of the achievement in the Campaign Manager. + - `target`: The required number of actions or the transactional milestone to complete the achievement. + - `progress`: The current progress of the customer in the achievement. + - `status`: The status of the achievement. Can be one of: ['inprogress', 'completed', 'expired']. + - `startDate`: The date on which the customer profile started the achievement in RFC3339. + - `endDate`: The date on which the achievement ends and resets for the customer profile in RFC3339. + - `completionDate`: The date on which the customer profile completed the achievement in RFC3339. + operationId: exportAchievements + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The ID of the campaign. It is displayed in your Talon.One deployment + URL. + in: path + name: campaignId + required: true + schema: + type: integer + - description: The ID of the achievement. You can get this ID with the [List + achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) + endpoint. + in: path + name: achievementId + required: true + schema: + type: integer + responses: + "200": + content: + application/csv: + example: | + profileIntegrationID,title,target,progress,status,startDate,endDate,completionDate + user1231,CoffeeFree10Orders,10.00,5,inprogress,2023-12-10T11:42:25+01:00,2024-01-10T11:42:25+01:00, + user341,CoffeeFree10Orders,10.00,10,completed,2023-12-10T11:42:25+01:00,2024-01-10T11:42:25+01:00,2023-12-20T10:24:34+01:00 + schema: + format: csv + type: string + description: OK + "400": + content: + application/csv: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Bad request + "401": + content: + application/csv: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized + "404": + content: + application/csv: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Not found + summary: Export achievement customer data + tags: + - management + /v1/applications/{applicationId}/achievement_progress/{integrationId}: + get: + description: | + For the given customer profile, list all the achievements that match your filter criteria. + operationId: getCustomerProfileAchievementProgress + parameters: + - description: The ID of the Application. It is displayed in your Talon.One + deployment URL. + in: path + name: applicationId + required: true + schema: + type: integer + - description: The identifier of the profile. + in: path + name: integrationId + required: true + schema: + type: string + - description: The number of items in the response. + in: query + name: pageSize + schema: + default: 50 + maximum: 50 + minimum: 1 + type: integer + - description: The number of items to skip when paging through large result + sets. + in: query + name: skip + schema: + type: integer + - description: The ID of the achievement. You can get this ID with the [List + achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) + endpoint. + in: query + name: achievementId + schema: + type: integer + - description: Filter results by the `title` of an achievement. + in: query + name: title + schema: + type: string + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/inline_response_200_47' + description: OK + "400": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Bad request + "401": + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorResponseWithStatus' + description: Unauthorized + summary: List customer achievements + tags: + - management components: schemas: ErrorResponse: @@ -9288,7 +10305,7 @@ components: EmailEntity: properties: email: - description: The email address associated with your account. + description: The email address associated with the user profile. example: john.doe@example.com format: email type: string @@ -9599,7 +10616,7 @@ components: email: john.doe@example.com properties: email: - description: The email address associated with your account. + description: The email address associated with the user profile. example: john.doe@example.com format: email type: string @@ -9860,9 +10877,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -9896,9 +10916,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -10044,12 +11067,13 @@ components: NewCampaignGroup: properties: name: - description: The name of this campaign access group. + description: The name of the campaign access group. + example: Europe access group minLength: 1 type: string description: description: A longer description of the campaign access group. - example: My campaign access group. + example: A group that gives access to all the campaigns for the Europe market. type: string subscribedApplicationsIds: description: A list of IDs of the Applications that this campaign access @@ -10076,6 +11100,22 @@ components: type: object CampaignGroup: description: "" + example: + accountId: 3886 + created: 2020-06-10T09:05:27.993483Z + name: Europe access group + subscribedApplicationsIds: + - 1 + - 2 + - 3 + modified: 2021-09-12T10:12:42Z + description: A group that gives access to all the campaigns for the Europe + market. + id: 6 + campaignIds: + - 4 + - 6 + - 8 properties: id: description: Internal ID of this entity. @@ -10096,12 +11136,13 @@ components: example: 3886 type: integer name: - description: The name of this campaign access group. + description: The name of the campaign access group. + example: Europe access group minLength: 1 type: string description: description: A longer description of the campaign access group. - example: My campaign access group. + example: A group that gives access to all the campaigns for the Europe market. type: string subscribedApplicationsIds: description: A list of IDs of the Applications that this campaign access @@ -10134,12 +11175,13 @@ components: description: "" properties: name: - description: The name of this campaign access group. + description: The name of the campaign access group. + example: Europe access group minLength: 1 type: string description: description: A longer description of the campaign access group. - example: My campaign access group. + example: A group that gives access to all the campaigns for the Europe market. type: string subscribedApplicationsIds: description: A list of IDs of the Applications that this campaign access @@ -10230,6 +11272,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -10251,12 +11294,6 @@ components: items: type: integer type: array - evaluationGroupId: - description: The ID of the campaign evaluation group the campaign belongs - to. - example: 2 - title: Evaluation Group ID - type: integer type: default: advanced description: | @@ -10283,6 +11320,12 @@ components: items: type: integer type: array + evaluationGroupId: + description: The ID of the campaign evaluation group the campaign belongs + to. + example: 2 + title: Evaluation Group ID + type: integer required: - features - limits @@ -10471,6 +11514,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -10592,6 +11636,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -10613,12 +11658,6 @@ components: items: type: integer type: array - evaluationGroupId: - description: The ID of the campaign evaluation group the campaign belongs - to. - example: 2 - title: Evaluation Group ID - type: integer type: default: advanced description: | @@ -10652,133 +11691,6 @@ components: - state - tags type: object - BaseCampaignForNotification: - properties: - name: - description: A user-facing name for this campaign. - example: Summer promotions - minLength: 1 - title: Campaign Name - type: string - description: - description: A detailed description of the campaign. - example: Campaign for all summer 2021 promotions - title: Campaign Description - type: string - startTime: - description: Timestamp when the campaign will become active. - example: 2021-07-20T22:00:00Z - format: date-time - type: string - endTime: - description: Timestamp when the campaign will become inactive. - example: 2021-09-22T22:00:00Z - format: date-time - type: string - attributes: - description: Arbitrary properties associated with this campaign. - properties: {} - type: object - state: - default: enabled - description: | - A disabled or archived campaign is not evaluated for rules or coupons. - enum: - - enabled - - disabled - - archived - - draft - - scheduled - - running - - expired - example: enabled - type: string - activeRulesetId: - description: | - [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this - campaign applies on customer session evaluation. - example: 6 - type: integer - tags: - description: A list of tags for the campaign. - example: - - summer - items: - maxLength: 50 - minLength: 1 - type: string - maxItems: 50 - type: array - features: - description: The features enabled in this campaign. - example: - - coupons - - referrals - items: - enum: - - coupons - - referrals - - loyalty - - giveaways - - strikethrough - type: string - type: array - couponSettings: - $ref: '#/components/schemas/CodeGeneratorSettings' - referralSettings: - $ref: '#/components/schemas/CodeGeneratorSettings' - limits: - description: | - The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. - items: - $ref: '#/components/schemas/LimitConfig' - type: array - campaignGroups: - description: | - The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. - example: - - 1 - - 3 - items: - type: integer - type: array - evaluationGroupId: - description: The ID of the campaign evaluation group the campaign belongs - to. - example: 2 - type: integer - type: - default: advanced - description: | - The campaign type. Possible type values: - - `cartItem`: Type of campaign that can apply effects only to cart items. - - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. - enum: - - cartItem - - advanced - example: advanced - type: string - linkedStoreIds: - description: | - A list of store IDs that are linked to the campaign. - - **Note:** Campaigns with linked store IDs will only be evaluated when there is a - [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) - that references a linked store. - example: - - 1 - - 2 - - 3 - items: - type: integer - type: array - required: - - features - - limits - - name - - state - - tags - type: object Campaign: description: "" example: @@ -10793,7 +11705,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -10850,6 +11761,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -11004,6 +11916,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -11025,12 +11938,6 @@ components: items: type: integer type: array - evaluationGroupId: - description: The ID of the campaign evaluation group the campaign belongs - to. - example: 2 - title: Evaluation Group ID - type: integer type: default: advanced description: | @@ -11179,12 +12086,22 @@ components: description: The ID of the Campaign Template this Campaign was created from. example: 3 type: integer + frontendState: + description: A campaign state described exactly as in the Campaign Manager. + enum: + - expired + - scheduled + - running + - draft + example: running + type: string required: - applicationId - budgets - created - description - features + - frontendState - id - limits - name @@ -11193,144 +12110,39 @@ components: - type - userId type: object - CampaignForNotification: - description: "" + CampaignBudget: + example: + limit: 1000.0 + action: createCoupon + counter: 42.0 properties: - id: - description: Unique ID for this entity. - example: 4 - type: integer - created: - description: The exact moment this entity was created. - example: 2020-06-10T09:05:27.993483Z - format: date-time - type: string - applicationId: - description: The ID of the application that owns this entity. - example: 322 - type: integer - userId: - description: The ID of the user associated with this entity. - example: 388 - type: integer - name: - description: A user-facing name for this campaign. - example: Summer promotions - minLength: 1 - title: Campaign Name - type: string - description: - description: A detailed description of the campaign. - example: Campaign for all summer 2021 promotions - title: Campaign Description - type: string - startTime: - description: Timestamp when the campaign will become active. - example: 2021-07-20T22:00:00Z - format: date-time - type: string - endTime: - description: Timestamp when the campaign will become inactive. - example: 2021-09-22T22:00:00Z - format: date-time - type: string - attributes: - description: Arbitrary properties associated with this campaign. - properties: {} - type: object - state: - default: enabled - description: | - A disabled or archived campaign is not evaluated for rules or coupons. - enum: - - enabled - - disabled - - archived - - draft - - scheduled - - running - - expired - example: enabled - type: string - activeRulesetId: - description: | - [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this - campaign applies on customer session evaluation. - example: 6 - type: integer - tags: - description: A list of tags for the campaign. - example: - - summer - items: - maxLength: 50 - minLength: 1 - type: string - maxItems: 50 - type: array - features: - description: The features enabled in this campaign. - example: - - coupons - - referrals - items: - enum: - - coupons - - referrals - - loyalty - - giveaways - - strikethrough - type: string - type: array - couponSettings: - $ref: '#/components/schemas/CodeGeneratorSettings' - referralSettings: - $ref: '#/components/schemas/CodeGeneratorSettings' - limits: - description: | - The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. - items: - $ref: '#/components/schemas/LimitConfig' - type: array - campaignGroups: - description: | - The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. - example: - - 1 - - 3 - items: - type: integer - type: array - evaluationGroupId: - description: The ID of the campaign evaluation group the campaign belongs - to. - example: 2 - type: integer - type: - default: advanced + action: description: | - The campaign type. Possible type values: - - `cartItem`: Type of campaign that can apply effects only to cart items. - - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. - enum: - - cartItem - - advanced - example: advanced + The limitable action to which this limit applies. For example: + - `setDiscount` + - `setDiscountEffect` + - `redeemCoupon` + - `createCoupon` + example: createCoupon type: string - linkedStoreIds: - description: | - A list of store IDs that are linked to the campaign. - - **Note:** Campaigns with linked store IDs will only be evaluated when there is a - [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) - that references a linked store. - example: - - 1 - - 2 - - 3 - items: - type: integer - type: array + limit: + description: The value to set for the limit. + example: 1000.0 + minimum: 0 + type: number + counter: + description: The number of occurrences of the limited action in the context + of the campaign. + example: 42.0 + minimum: 0 + type: number + required: + - action + - counter + - limit + type: object + AdditionalCampaignProperties: + properties: budgets: description: | A list of all the budgets that are defined by this campaign and their usage. @@ -11453,177 +12265,18 @@ components: description: The ID of the Campaign Template this Campaign was created from. example: 3 type: integer - required: - - applicationId - - budgets - - created - - description - - features - - id - - limits - - name - - state - - tags - - type - - userId - type: object - CampaignBudget: - example: - limit: 1000.0 - action: createCoupon - counter: 42.0 - properties: - action: - description: | - The limitable action to which this limit applies. For example: - - `setDiscount` - - `setDiscountEffect` - - `redeemCoupon` - - `createCoupon` - example: createCoupon - type: string - limit: - description: The value to set for the limit. - example: 1000.0 - minimum: 0 - type: number - counter: - description: The number of occurrences of the limited action in the context - of the campaign. - example: 42.0 - minimum: 0 - type: number - required: - - action - - counter - - limit - type: object - AdditionalCampaignProperties: - properties: - budgets: - description: | - A list of all the budgets that are defined by this campaign and their usage. - - **Note:** Budgets that are not defined do not appear in this list and their usage is - not counted until they are defined. - items: - $ref: '#/components/schemas/CampaignBudget' - type: array - couponRedemptionCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Number of coupons redeemed in the campaign. - example: 163 - type: integer - referralRedemptionCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Number of referral codes redeemed in the campaign. - example: 3 - type: integer - discountCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total amount of discounts redeemed in the campaign. - example: 288.0 - type: number - discountEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of times discounts were redeemed in this campaign. - example: 343 - type: integer - couponCreationCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of coupons created by rules in this campaign. - example: 16 - type: integer - customEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of custom effects triggered by rules in this campaign. - example: 0 - type: integer - referralCreationCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of referrals created by rules in this campaign. - example: 8 - type: integer - addFreeItemEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. - example: 0 - type: integer - awardedGiveawaysCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of giveaways awarded by rules in this campaign. - example: 9 - type: integer - createdLoyaltyPointsCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty points created by rules in this campaign. - example: 9.0 - type: number - createdLoyaltyPointsEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty point creation effects triggered by rules in this campaign. - example: 2 - type: integer - redeemedLoyaltyPointsCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty points redeemed by rules in this campaign. - example: 8.0 - type: number - redeemedLoyaltyPointsEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty point redemption effects triggered by rules in this campaign. - example: 9 - type: integer - callApiEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of webhooks triggered by rules in this campaign. - example: 0 - type: integer - reservecouponEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of reserve coupon effects triggered by rules in this campaign. - example: 9 - type: integer - lastActivity: - description: Timestamp of the most recent event received by this campaign. - example: 2022-11-10T23:00:00Z - format: date-time - type: string - updated: - description: | - 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. - format: date-time - type: string - createdBy: - description: Name of the user who created this campaign if available. - example: John Doe - type: string - updatedBy: - description: Name of the user who last updated this campaign if available. - example: Jane Doe + frontendState: + description: A campaign state described exactly as in the Campaign Manager. + enum: + - expired + - scheduled + - running + - draft + example: running type: string - templateId: - description: The ID of the Campaign Template this Campaign was created from. - example: 3 - type: integer required: - budgets + - frontendState type: object NewRuleset: properties: @@ -13091,7 +13744,7 @@ components: minLength: 3 type: string isReservationMandatory: - default: true + default: false description: Whether the reservation effect actually created a new reservation. example: false title: Is reservation mandatory @@ -13319,7 +13972,7 @@ components: properties: {} type: object isReservationMandatory: - default: true + default: false description: Whether the reservation effect actually created a new reservation. example: false title: Is reservation mandatory @@ -13545,7 +14198,7 @@ components: title: Batch ID type: string isReservationMandatory: - default: true + default: false description: Whether the reservation effect actually created a new reservation. example: false title: Is reservation mandatory @@ -13722,7 +14375,7 @@ components: title: Batch ID type: string isReservationMandatory: - default: true + default: false description: Whether the reservation effect actually created a new reservation. example: false title: Is reservation mandatory @@ -13747,6 +14400,26 @@ components: - usageLimit - value type: object + GetIntegrationCouponRequest: + properties: + campaignIds: + description: A list of IDs of the campaigns to get coupons from. + example: + - 1 + - 2 + - 3 + items: + type: integer + type: array + limit: + description: The maximum number of coupons included in the response. + maximum: 1E+3 + minimum: 1 + type: integer + required: + - campaignIds + - limit + type: object InventoryCoupon: description: "" example: @@ -13906,7 +14579,7 @@ components: title: Batch ID type: string isReservationMandatory: - default: true + default: false description: Whether the reservation effect actually created a new reservation. example: false title: Is reservation mandatory @@ -13926,9 +14599,11 @@ components: description: | 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. + - `active`: The coupon can be used. It is a reserved coupon that is not pending, used, or expired, and it has a non-exhausted limit counter. + + **Note:** This coupon state is returned for [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule), but the coupon cannot be used until the campaign is **running**. - `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. + - `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. example: active @@ -14332,6 +15007,126 @@ components: - url - webhookId type: object + MessageLogEntries: + properties: + nextCursor: + description: | + The next value in the database. + + **Note:** If this value is not present, it means that there are no more values in the database for this combination of request parameters. + example: SmJlNERRMHdyNWFsTmRDZDVYU0c= + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + data: + description: List of message logs. + items: + $ref: '#/components/schemas/MessageLogEntry' + type: array + required: + - data + type: object + MessageLogEntry: + description: Message Log. + properties: + id: + description: Unique identifier of the message. + example: 123e4567-e89b-12d3-a456-426614174000 + type: string + service: + description: Name of the service that generated the log entry. + example: NotificationService + type: string + changeType: + description: Type of change that triggered the notification. + example: Update + type: string + notificationId: + description: ID of the notification. + example: 101 + type: integer + notificationName: + description: The name of the notification. + example: My campaign notification + type: string + request: + $ref: '#/components/schemas/MessageLogRequest' + response: + $ref: '#/components/schemas/MessageLogResponse' + createdAt: + description: Timestamp when the log entry was created. + example: 2021-07-20T22:00:00Z + format: date-time + type: string + entityType: + description: | + The entity type the log is related to. + enum: + - application + - loyalty_program + - webhook + example: loyalty_program + type: string + url: + description: The target URL of the request. + example: www.my-company.com/my-endpoint-name + type: string + applicationId: + description: Identifier of the Application. + example: 5 + minimum: 1 + type: integer + loyaltyProgramId: + description: Identifier of the loyalty program. + example: 2 + minimum: 1 + type: integer + required: + - createdAt + - id + - service + type: object + MessageLogRequest: + description: Details of the request. + properties: + createdAt: + description: Timestamp when the request was made. + example: 2021-07-20T21:59:00Z + format: date-time + type: string + request: + description: Raw request data. + example: SGVsbG8sIHdvcmxkIQ== + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + required: + - createdAt + - request + type: object + MessageLogResponse: + description: Details of the response. + properties: + createdAt: + description: Timestamp when the response was received. + example: 2021-07-20T22:00:50Z + format: date-time + type: string + response: + description: Raw response data. + example: UmVzcG9uc2UgY29udGVudA== + format: byte + pattern: ^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$ + type: string + status: + description: HTTP status code of the response. + example: 200 + type: integer + required: + - createdAt + - response + - status + type: object WebhookActivationLogEntry: description: Log of activated webhooks. example: @@ -14385,8 +15180,8 @@ components: lastAccessed: 2021-09-12T10:14:42Z id: 6 state: invited - latestFeedTimestamp: 2020-06-01T00:00:00Z authMethod: basic_auth + latestFeedTimestamp: 2020-06-01T00:00:00Z lastSignedIn: 2021-09-12T10:12:42Z email: john.doe@example.com policy: @@ -14407,7 +15202,7 @@ components: format: date-time type: string email: - description: The email address associated with your account. + description: The email address associated with the user profile. example: john.doe@example.com format: email type: string @@ -14415,62 +15210,65 @@ components: description: The ID of the account that owns this entity. example: 3886 type: integer - inviteToken: - description: Invite token, empty if the user as already accepted their invite. - example: Gy9b8w1irmQtEPo5RmbMmSPheL5h4 + name: + description: Name of the user. + example: John Doe type: string state: - description: Current user state. + description: State of the user. enum: - invited - active - deactivated example: invited type: string - name: - description: Full name - example: John Doe + inviteToken: + description: | + Invitation token of the user. + + **Note**: If the user has already accepted their invitation, this is `null`. + example: Gy9b8w1irmQtEPo5RmbMmSPheL5h4 type: string + isAdmin: + description: Indicates whether the user is an `admin`. + example: false + type: boolean policy: - description: User ACL Policy + description: Access level of the user. example: Role: 127 properties: {} type: object - latestFeedTimestamp: - description: Latest timestamp the user has been notified for feed. - example: 2020-06-01T00:00:00Z - format: date-time - type: string roles: - description: Contains a list of all roles the user is a member of. + description: A list of the IDs of the roles assigned to the user. example: - 71 items: type: integer type: array - applicationNotificationSubscriptions: - properties: {} - type: object authMethod: - description: The Authentication method for this user. + description: Authentication method for this user. example: basic_auth type: string - isAdmin: - description: An indication of whether the user has admin permissions. - example: false - type: boolean + applicationNotificationSubscriptions: + description: Application notifications that the user is subscribed to. + properties: {} + type: object lastSignedIn: - description: Date and time when the user last signed in to Talon.One. + description: Timestamp when the user last signed in to Talon.One. example: 2021-09-12T10:12:42Z format: date-time type: string lastAccessed: - description: Date and time of the user's last activity after signing in - to Talon.One. + description: Timestamp of the user's last activity after signing in to Talon.One. example: 2021-09-12T10:14:42Z format: date-time type: string + latestFeedTimestamp: + description: Timestamp when the user was notified for feed. + example: 2020-06-01T00:00:00Z + format: date-time + type: string required: - accountId - created @@ -14482,35 +15280,64 @@ components: - policy - state type: object + DeactivateUserRequest: + description: "" + example: + email: john.doe@example.com + properties: + email: + description: The email address associated with the user profile. + example: john.doe@example.com + format: email + type: string + required: + - email + type: object + DeleteUserRequest: + description: "" + example: + email: john.doe@example.com + properties: + email: + description: The email address associated with the user profile. + example: john.doe@example.com + format: email + type: string + required: + - email + type: object NewInvitation: description: Parameters for inviting a new user. + example: + roles: + - 0 + - 0 + name: John Doe + isAdmin: false + acl: acl + email: john.doe@example.com properties: name: - description: Name of the user being invited. + description: Name of the user. example: John Doe type: string email: + description: Email address of the user. example: john.doe@example.com format: email type: string - acl: - description: | - 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}` - example: '{"Role":0}' - type: string isAdmin: - description: | - An indication of whether the user has admin permissions. We recommend using this flag over using the `acl` with value `{"Role": 127}`. + description: Indicates whether the user is an `admin`. example: false type: boolean roles: - description: An array of role IDs to assign to the new user. + description: A list of the IDs of the roles assigned to the user. items: type: integer type: array + acl: + description: Indicates the access level of the user. + type: string required: - email type: object @@ -14744,9 +15571,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -14814,9 +15644,18 @@ components: example: true title: Sandbox type: boolean + tiersExpirationPolicy: + description: | + The policy that defines which date is used to calculate the expiration date of a customer's current tier. + - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. + - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + enum: + - tier_start_date + - program_join_date + type: string tiersExpireIn: description: | - The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. + The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. @@ -14845,6 +15684,19 @@ components: - one_down - balance_based type: string + programJoinPolicy: + description: | + The policy that defines when the customer joins the loyalty program. + - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. + + **Note**: The customer does not have a program join date. + - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. + - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + enum: + - not_join + - points_activated + - points_earned + type: string accountID: description: The ID of the Talon.One account that owns this program. example: 1 @@ -14894,6 +15746,11 @@ components: `True` if the tier definitions can be updated. example: true type: boolean + canUpdateJoinPolicy: + description: | + Indicates whether the program join policy can be updated. The join policy can be updated when this value is set to `true`. + example: true + type: boolean canUpgradeToAdvancedTiers: default: false description: | @@ -15021,9 +15878,18 @@ components: example: true title: Sandbox type: boolean + tiersExpirationPolicy: + description: | + The policy that defines which date is used to calculate the expiration date of a customer's current tier. + - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. + - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + enum: + - tier_start_date + - program_join_date + type: string tiersExpireIn: description: | - The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. + The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. @@ -15052,6 +15918,19 @@ components: - one_down - balance_based type: string + programJoinPolicy: + description: | + The policy that defines when the customer joins the loyalty program. + - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. + + **Note**: The customer does not have a program join date. + - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. + - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + enum: + - not_join + - points_activated + - points_earned + type: string type: object NewLoyaltyProgram: description: "" @@ -15106,9 +15985,18 @@ components: example: true title: Sandbox type: boolean + tiersExpirationPolicy: + description: | + The policy that defines which date is used to calculate the expiration date of a customer's current tier. + - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. + - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + enum: + - tier_start_date + - program_join_date + type: string tiersExpireIn: description: | - The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. + The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. @@ -15137,6 +16025,19 @@ components: - one_down - balance_based type: string + programJoinPolicy: + description: | + The policy that defines when the customer joins the loyalty program. + - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. + + **Note**: The customer does not have a program join date. + - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. + - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + enum: + - not_join + - points_activated + - points_earned + type: string name: description: The internal name for the Loyalty Program. This is an immutable value. @@ -15222,9 +16123,18 @@ components: example: true title: Sandbox type: boolean + tiersExpirationPolicy: + description: | + The policy that defines which date is used to calculate the expiration date of a customer's current tier. + - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. + - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + enum: + - tier_start_date + - program_join_date + type: string tiersExpireIn: description: | - The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. + The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. @@ -15253,6 +16163,19 @@ components: - one_down - balance_based type: string + programJoinPolicy: + description: | + The policy that defines when the customer joins the loyalty program. + - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. + + **Note**: The customer does not have a program join date. + - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. + - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + enum: + - not_join + - points_activated + - points_earned + type: string tiers: description: The tiers in this loyalty program. items: @@ -15263,7 +16186,8 @@ components: description: List of loyalty ledger transactions. properties: hasMore: - description: true means there is more data in the source collection to request. + description: If `true`, it means that there is more data to request in the + source collection. example: true type: boolean data: @@ -15917,6 +16841,7 @@ components: downgradePolicy: one_down name: bronze id: 11 + joinDate: 2000-01-23T04:56:07.000+00:00 subLedgers: key: pendingBalance: 10.0 @@ -15967,6 +16892,7 @@ components: downgradePolicy: one_down name: bronze id: 11 + joinDate: 2000-01-23T04:56:07.000+00:00 subLedgers: key: pendingBalance: 10.0 @@ -15997,6 +16923,13 @@ components: description: Internal name of loyalty program. example: program1 type: string + joinDate: + description: | + The date on which the customer joined the loyalty program in RFC3339. + + **Note**: This is in the loyalty program's time zone. + format: date-time + type: string ledger: $ref: '#/components/schemas/LedgerInfo' subLedgers: @@ -16125,6 +17058,61 @@ components: - id - name type: object + TimePoint: + description: | + The absolute duration after which the achievement ends and resets for a particular customer profile. + + **Note**: The duration follows the time zone of the Application this achievement belongs to. + example: + month: 11 + dayOfMonth: 23 + hour: 23 + minute: 59 + second: 59 + properties: + month: + description: | + The achievement ends and resets in this month. + + **Note**: Only applicable if the period is set to `Y`. + example: 11 + maximum: 12 + minimum: 1 + type: integer + dayOfMonth: + description: | + The achievement ends and resets on this day of the month. + + **Note**: Only applicable if the period is set to `Y` or `M`. + example: 23 + maximum: 31 + minimum: 1 + type: integer + dayOfWeek: + description: | + The achievement ends and resets on this day of the week. `1` represents `Monday` and `7` represents `Sunday`. + + **Note**: Only applicable if the period is set to `W`. + maximum: 7 + minimum: 1 + type: integer + hour: + description: The achievement ends and resets at this hour. + example: 23 + type: integer + minute: + description: The achievement ends and resets at this minute. + example: 59 + type: integer + second: + description: The achievement ends and resets at this second. + example: 59 + type: integer + required: + - hour + - minute + - second + type: object LoyaltyCard: description: "" example: @@ -16686,6 +17674,7 @@ components: example: rulesetId: 11 amount: 10.25 + campaignId: 324 created: 2000-01-23T04:56:07.000+00:00 customerSessionId: 05c2da0d-48fa-4aa1-b629-898f58f1584d type: addition @@ -16710,6 +17699,10 @@ components: description: ID of the loyalty program. example: 324 type: integer + campaignId: + description: ID of the campaign. + example: 324 + type: integer created: description: Date and time the loyalty transaction occurred. format: date-time @@ -17052,7 +18045,7 @@ components: type: string sandbox: description: | - 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). + An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). example: false title: Sandbox type: boolean @@ -17068,6 +18061,27 @@ components: type: object CustomerInventory: example: + achievements: + - endDate: 2000-01-23T04:56:07.000+00:00 + campaignId: 3 + name: FreeCoffee10Orders + achievementId: 3 + progress: 10.0 + completionDate: 2000-01-23T04:56:07.000+00:00 + title: 50% off on 50th purchase. + startDate: 2000-01-23T04:56:07.000+00:00 + status: completed + target: 10.0 + - endDate: 2000-01-23T04:56:07.000+00:00 + campaignId: 3 + name: FreeCoffee10Orders + achievementId: 3 + progress: 10.0 + completionDate: 2000-01-23T04:56:07.000+00:00 + title: 50% off on 50th purchase. + startDate: 2000-01-23T04:56:07.000+00:00 + status: completed + target: 10.0 coupons: - recipientIntegrationId: URNGV8294NV implicitlyReserved: false @@ -17293,6 +18307,7 @@ components: downgradePolicy: one_down name: bronze id: 11 + joinDate: 2000-01-23T04:56:07.000+00:00 subLedgers: key: pendingBalance: 10.0 @@ -17352,6 +18367,10 @@ components: items: $ref: '#/components/schemas/Giveaway' type: array + achievements: + items: + $ref: '#/components/schemas/AchievementProgress' + type: array type: object NewCustomerSession: description: "" @@ -17446,6 +18465,8 @@ components: state: open cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -17465,6 +18486,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -17534,7 +18557,7 @@ components: title: Referral code entered in session type: string loyaltyCards: - description: Any loyalty cards used. + description: Identifier of a loyalty card. example: - loyalty-card-1 items: @@ -17875,6 +18898,8 @@ components: applicationId: 322 cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -17894,6 +18919,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -17985,7 +19012,7 @@ components: title: Referral code entered in session type: string loyaltyCards: - description: Any loyalty cards used. + description: Identifier of a loyalty card. example: - loyalty-card-1 items: @@ -18109,6 +19136,8 @@ components: CartItem: example: remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -18171,6 +19200,8 @@ components: example: shoes title: Item category type: string + product: + $ref: '#/components/schemas/Product' weight: description: Weight of item in grams. example: 1130.0 @@ -18568,6 +19599,7 @@ components: downgradePolicy: one_down name: bronze id: 11 + joinDate: 2000-01-23T04:56:07.000+00:00 subLedgers: key: pendingBalance: 10.0 @@ -18751,7 +19783,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -18808,6 +19839,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -18892,7 +19924,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -18949,6 +19980,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -19116,6 +20148,8 @@ components: applicationId: 322 cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -19135,6 +20169,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -19361,7 +20397,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -19418,6 +20453,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -19502,7 +20538,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -19559,6 +20594,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -19753,6 +20789,7 @@ components: downgradePolicy: one_down name: bronze id: 11 + joinDate: 2000-01-23T04:56:07.000+00:00 subLedgers: key: pendingBalance: 10.0 @@ -20031,7 +21068,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -20088,6 +21124,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -20172,7 +21209,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -20229,6 +21265,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -20423,6 +21460,7 @@ components: downgradePolicy: one_down name: bronze id: 11 + joinDate: 2000-01-23T04:56:07.000+00:00 subLedgers: key: pendingBalance: 10.0 @@ -20779,6 +21817,8 @@ components: applicationId: 322 cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -20798,6 +21838,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -20921,7 +21963,7 @@ components: type: string sandbox: description: | - 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). + An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). example: false title: Sandbox type: boolean @@ -21013,7 +22055,7 @@ components: type: string sandbox: description: | - 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). + An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). example: false title: Sandbox type: boolean @@ -21110,6 +22152,8 @@ components: applicationId: 322 cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -21129,6 +22173,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -21686,7 +22732,7 @@ components: description: "" properties: email: - description: The email address associated with your account. + description: The email address associated with the user profile. example: john.doe@example.com format: email type: string @@ -21706,7 +22752,7 @@ components: description: "" properties: email: - description: The email address associated with your account. + description: The email address associated with the user profile. example: john.doe@example.com format: email type: string @@ -21727,26 +22773,45 @@ components: - password type: object UpdateUser: + example: + applicationNotificationSubscriptions: '{}' + roles: + - 1 + - 3 + name: John Doe + state: deactivated + isAdmin: false + policy: "" properties: name: - description: The user name. + description: Name of the user. example: John Doe type: string - policy: - description: The `Access Control List` json defining the role of the user. - This represents the access control on the user level. - example: "" - type: string state: - description: New state ("deactivated" or "active") for the user. Only usable - by admins for the user. + description: | + The state of the user. + - `deactivated`: The user has been deactivated. + - `active`: The user is active. + + **Note**: Only `admin` users can update the state of another user. enum: - deactivated - active example: deactivated type: string + isAdmin: + description: Indicates whether the user is an `admin`. + example: false + type: boolean + policy: + description: Indicates the access level of the user. + example: "" + type: string roles: - description: List of roles to assign to the user. + description: | + A list of the IDs of the roles assigned to the user. + + **Note**: Use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint to find the ID of a role. example: - 1 - 3 @@ -21754,12 +22819,9 @@ components: type: integer type: array applicationNotificationSubscriptions: + description: Application notifications that the user is subscribed to. properties: {} type: object - isAdmin: - description: An indication of whether the user has admin permissions. - example: false - type: boolean type: object ChangeProfilePassword: properties: @@ -21776,13 +22838,18 @@ components: - password type: object NewInviteEmail: + example: + email: john.doe@example.com + token: Gy9b8w1irmQtEPo5RmbMmSPheL5h4 properties: email: + description: Email address of the user. + example: john.doe@example.com format: email - minLength: 1 type: string token: - minLength: 1 + description: Invitation token of the user. + example: Gy9b8w1irmQtEPo5RmbMmSPheL5h4 type: string required: - email @@ -21861,6 +22928,12 @@ components: items: $ref: '#/components/schemas/LoyaltyProgram' type: array + achievements: + description: The achievements, linked to the campaigns, belonging to the + application. + items: + $ref: '#/components/schemas/Achievement' + type: array attributes: description: The attributes that the application is subscribed to. items: @@ -21935,7 +23008,6 @@ components: also be shown in the rule editor. type: string required: - - description - type type: object TemplateArgDef: @@ -21973,7 +23045,6 @@ components: (`picklist` property) type: boolean required: - - description - title - type - ui @@ -22090,6 +23161,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -22194,6 +23266,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -22476,6 +23549,7 @@ components: - loyalty - giveaways - strikethrough + - achievements type: string type: array couponSettings: @@ -22859,7 +23933,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -22916,6 +23989,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -23990,7 +25064,7 @@ components: type: boolean description: description: A description of the audience. - example: Travel audience 18-25 + example: Travel audience 18-27 type: string required: - name @@ -24002,7 +25076,7 @@ components: name: Travel audience sandbox: true integration: mparticle - description: Travel audience 18-25 + description: Travel audience 18-27 integrationId: 382370BKDB946 createdIn3rdParty: false properties: @@ -24017,7 +25091,7 @@ components: type: boolean description: description: A description of the audience. - example: Travel audience 18-25 + example: Travel audience 18-27 type: string integration: description: | @@ -24070,7 +25144,7 @@ components: name: Travel audience sandbox: true integration: mparticle - description: Travel audience 18-25 + description: Travel audience 18-27 integrationId: 382370BKDB946 id: 6 createdIn3rdParty: false @@ -24099,7 +25173,7 @@ components: type: boolean description: description: A description of the audience. - example: Travel audience 18-25 + example: Travel audience 18-27 type: string integration: description: | @@ -24135,14 +25209,17 @@ components: - name type: object AudienceAnalytics: - description: The audiences and their members count. + description: The audiences and their member count. + example: + membersCount: 1234 + audienceId: 1 properties: audienceId: description: The ID of the audience. example: 1 type: integer membersCount: - description: The count of members under a single audience. + description: The member count of the audience. example: 1234 type: integer type: object @@ -24340,6 +25417,7 @@ components: - Referral - Session - Store + - Achievements type: string name: description: | @@ -24565,7 +25643,7 @@ components: permissions: $ref: '#/components/schemas/RoleV2Permissions' members: - description: A list of user identifiers the role is assigned to. + description: A list of user IDs the role is assigned to. example: - 10 - 12 @@ -24580,6 +25658,53 @@ components: $ref: '#/components/schemas/RoleV2Base' RoleV2: description: "" + example: + accountId: 3886 + created: 2020-06-10T09:05:27.993483Z + permissions: + permissionSets: + - name: Application permission set + logicalOperations: + - getApplicationOperations + - editApplicationOperations + - name: Campaign manager permission set + logicalOperations: + - getCampaignOperations + - createCampaignOperations + - updateCampaignOperations + - name: Campaign read-only permission set + logicalOperations: + - getCampaignOperations + - name: Loyalty program read-only permission set + logicalOperations: + - getLoyaltyProgramOperations + - name: Campaign access group manager permission set + logicalOperations: + - getCampaignAccessGroupOperations + - updateCampaignAccessGroupOperations + - deleteCampaignAccessGroupOperations + roles: + campaignAccessGroups: + "5": Campaign access group manager permission set + loyaltyPrograms: + "10": Loyalty program manager permission set + applications: + "1": + application: Application permission set + "3": + campaign: Campaign manager permission set + "4": + draftCampaign: Campaign read-only permission set + "5": + tools: Tools permission set + members: + - 10 + - 12 + name: Campaign and campaign access group manager + modified: 2021-09-12T10:12:42Z + description: Allows you to create and edit campaigns for specific Applications, + delete specific campaign access groups, and view loyalty programs. + id: 6 properties: id: description: Internal ID of this entity. @@ -24611,7 +25736,7 @@ components: permissions: $ref: '#/components/schemas/RoleV2Permissions' members: - description: A list of user identifiers the role is assigned to. + description: A list of user IDs the role is assigned to. example: - 10 - 12 @@ -24625,6 +25750,49 @@ components: - modified type: object RoleV2Base: + example: + permissions: + permissionSets: + - name: Application permission set + logicalOperations: + - getApplicationOperations + - editApplicationOperations + - name: Campaign manager permission set + logicalOperations: + - getCampaignOperations + - createCampaignOperations + - updateCampaignOperations + - name: Campaign read-only permission set + logicalOperations: + - getCampaignOperations + - name: Loyalty program read-only permission set + logicalOperations: + - getLoyaltyProgramOperations + - name: Campaign access group manager permission set + logicalOperations: + - getCampaignAccessGroupOperations + - updateCampaignAccessGroupOperations + - deleteCampaignAccessGroupOperations + roles: + campaignAccessGroups: + "5": Campaign access group manager permission set + loyaltyPrograms: + "10": Loyalty program manager permission set + applications: + "1": + application: Application permission set + "3": + campaign: Campaign manager permission set + "4": + draftCampaign: Campaign read-only permission set + "5": + tools: Tools permission set + members: + - 10 + - 12 + name: Campaign and campaign access group manager + description: Allows you to create and edit campaigns for specific Applications, + delete specific campaign access groups, and view loyalty programs. properties: name: description: Name of the role. @@ -24638,7 +25806,7 @@ components: permissions: $ref: '#/components/schemas/RoleV2Permissions' members: - description: A list of user identifiers the role is assigned to. + description: A list of user IDs the role is assigned to. example: - 10 - 12 @@ -24647,10 +25815,45 @@ components: type: array type: object RoleV2Permissions: + example: + permissionSets: + - name: Application permission set + logicalOperations: + - getApplicationOperations + - editApplicationOperations + - name: Campaign manager permission set + logicalOperations: + - getCampaignOperations + - createCampaignOperations + - updateCampaignOperations + - name: Campaign read-only permission set + logicalOperations: + - getCampaignOperations + - name: Loyalty program read-only permission set + logicalOperations: + - getLoyaltyProgramOperations + - name: Campaign access group manager permission set + logicalOperations: + - getCampaignAccessGroupOperations + - updateCampaignAccessGroupOperations + - deleteCampaignAccessGroupOperations + roles: + campaignAccessGroups: + "5": Campaign access group manager permission set + loyaltyPrograms: + "10": Loyalty program manager permission set + applications: + "1": + application: Application permission set + "3": + campaign: Campaign manager permission set + "4": + draftCampaign: Campaign read-only permission set + "5": + tools: Tools permission set properties: permissionSets: - description: List of grouped logical operations to use as a reference in - the roles section. Each group of logical operations has a name. + description: List of grouped logical operations referenced by roles. example: - name: Application permission set logicalOperations: @@ -24674,12 +25877,26 @@ components: - deleteCampaignAccessGroupOperations items: $ref: '#/components/schemas/RoleV2PermissionSet' - maxItems: 100 + maxItems: 500 type: array roles: $ref: '#/components/schemas/RoleV2RolesGroup' type: object RoleV2RolesGroup: + example: + campaignAccessGroups: + "5": Campaign access group manager permission set + loyaltyPrograms: + "10": Loyalty program manager permission set + applications: + "1": + application: Application permission set + "3": + campaign: Campaign manager permission set + "4": + draftCampaign: Campaign read-only permission set + "5": + tools: Tools permission set properties: applications: additionalProperties: @@ -25011,11 +26228,11 @@ components: description: "" properties: title: - description: Title for API Key. + description: Title of the API key. example: My generated key type: string expires: - description: The date the API key expired. + description: The date the API key expires. example: 2023-08-24T14:00:00Z format: date-time type: string @@ -25033,8 +26250,25 @@ components: - customer_engagement - customer_data - salesforce + - emarsys example: none type: string + type: + description: | + The API key type. Can be empty or `staging`. + + Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. + + When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. + enum: + - staging + example: staging + type: string + timeOffset: + description: | + A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + example: 100000 + type: integer id: description: ID of the API Key. example: 34 @@ -25069,11 +26303,11 @@ components: description: "" properties: title: - description: Title for API Key. + description: Title of the API key. example: My generated key type: string expires: - description: The date the API key expired. + description: The date the API key expires. example: 2023-08-24T14:00:00Z format: date-time type: string @@ -25091,8 +26325,25 @@ components: - customer_engagement - customer_data - salesforce + - emarsys example: none type: string + type: + description: | + The API key type. Can be empty or `staging`. + + Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. + + When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. + enum: + - staging + example: staging + type: string + timeOffset: + description: | + A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + example: 100000 + type: integer id: description: ID of the API Key. example: 34 @@ -25131,11 +26382,11 @@ components: CreateApplicationAPIKey: properties: title: - description: Title for API Key. + description: Title of the API key. example: My generated key type: string expires: - description: The date the API key expired. + description: The date the API key expires. example: 2023-08-24T14:00:00Z format: date-time type: string @@ -25153,12 +26404,39 @@ components: - customer_engagement - customer_data - salesforce + - emarsys example: none type: string + type: + description: | + The API key type. Can be empty or `staging`. + + Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. + + When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. + enum: + - staging + example: staging + type: string + timeOffset: + description: | + A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + example: 100000 + type: integer required: - expires - title type: object + UpdateApplicationAPIKey: + properties: + timeOffset: + description: | + A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + example: 100000 + type: integer + required: + - timeOffset + type: object CreateManagementKey: properties: name: @@ -25329,10 +26607,40 @@ components: - id - name type: object + NotificationListItem: + properties: + notificationId: + description: The ID of the notification. + example: 1 + type: integer + notificationName: + description: The name of the notification. + example: My campaign notification + type: string + entityId: + description: | + The ID of the entity to which this notification belongs. + For example, in case of a loyalty notification, this value is the ID of the loyalty program. + example: 1 + type: integer + enabled: + description: Indicates whether the notification is activated. + example: true + type: boolean + required: + - enabled + - entityId + - notificationId + - notificationName + type: object Notifications: items: $ref: '#/components/schemas/Notification' type: array + NotificationListItems: + items: + $ref: '#/components/schemas/NotificationListItem' + type: array SamlConnection: description: "" properties: @@ -25434,6 +26742,20 @@ components: - signOnURL - x509certificate type: object + SamlConnectionInternal: + properties: + name: + description: ID of the SAML service. + minLength: 1 + type: string + metadataDocument: + description: Identity Provider metadata XML document. + minLength: 1 + type: string + required: + - metadataDocument + - name + type: object SamlConnectionMetadata: properties: name: @@ -25496,15 +26818,20 @@ components: type: object SamlLoginEndpoint: properties: + id: + description: ID of the SAML login endpoint. + example: 2 + type: integer name: description: ID of the SAML service. minLength: 1 type: string loginURL: - description: Single Sign-On URL. + description: The single sign-on URL. minLength: 1 type: string required: + - id - loginURL - name type: object @@ -26051,6 +27378,37 @@ components: - transactionUUID - value type: object + ChangeLoyaltyTierLevelEffectProps: + description: | + The properties specific to the "changeLoyaltyTierLevel" effect. + This is triggered whenever the user's loyalty tier is upgraded due to a validated rule that contained an "addLoyaltyPoints" effect. + properties: + ruleTitle: + description: The title of the rule that triggered the tier upgrade. + type: string + programId: + description: The ID of the loyalty program where these points were added. + type: integer + subLedgerId: + description: The ID of the subledger within the loyalty program where these + points were added. + type: string + previousTierName: + description: The name of the tier from which the user was upgraded. + type: string + newTierName: + description: The name of the tier to which the user has been upgraded. + type: string + expiryDate: + description: The expiration date of the new tier. + format: date-time + type: string + required: + - newTierName + - programId + - ruleTitle + - subLedgerId + type: object AddFreeItemEffectProps: description: The properties specific to the "addFreeItem" effect. This gets triggered whenever a validated rule contained an "add free item" effect. @@ -26380,6 +27738,45 @@ components: example: 150 type: integer type: object + IncreaseAchievementProgressEffectProps: + description: The properties specific to the "increaseAchievementProgress" effect. + This gets triggered whenever a validated rule contained an "increase customer + progress" effect. + properties: + achievementId: + description: The internal ID of the achievement. + example: 10 + type: integer + achievementName: + description: The name of the achievement. + example: FreeCoffee10Orders + type: string + progressTrackerId: + description: The internal ID of the achievement progress tracker. + type: integer + delta: + description: The value by which the customer's current progress in the achievement + is increased. + type: number + value: + description: The current progress of the customer in the achievement. + type: number + target: + description: The required number of actions or the transactional milestone + to complete the achievement. + type: number + isJustCompleted: + description: Indicates if the customer has completed the achievement in + the current session. + type: boolean + required: + - achievementId + - achievementName + - delta + - isJustCompleted + - target + - value + type: object ErrorEffectProps: description: Whenever an error occurred during evaluation, we return an error effect. This should never happen for rules created in the rule builder. @@ -26456,6 +27853,8 @@ components: state: open cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -26475,6 +27874,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -26791,7 +28192,7 @@ components: action: description: | Defines the action to perform: - - `add`: Adds the customer profile to the audience. + - `add`: Adds the customer profile to the audience. If the customer profile does not exist, it will be created. - `delete`: Removes the customer profile from the audience. enum: - add @@ -27109,8 +28510,8 @@ components: NewPicklist: properties: type: - description: The type of allowed values in the picklist. If type time is - chosen, it must be an RFC3339 timestamp string. + description: The type of allowed values in the picklist. If the type `time` + is chosen, it must be an RFC3339 timestamp string. enum: - string - boolean @@ -27126,7 +28527,7 @@ components: - Coat items: type: string - maxItems: 20 + maxItems: 50 type: array required: - type @@ -27145,8 +28546,8 @@ components: format: date-time type: string type: - description: The type of allowed values in the picklist. If type time is - chosen, it must be an RFC3339 timestamp string. + description: The type of allowed values in the picklist. If the type `time` + is chosen, it must be an RFC3339 timestamp string. enum: - string - boolean @@ -27162,7 +28563,7 @@ components: - Coat items: type: string - maxItems: 20 + maxItems: 50 type: array modifiedBy: description: ID of the user who last updated this effect if available. @@ -27192,8 +28593,8 @@ components: description: "" properties: type: - description: The type of allowed values in the picklist. If type time is - chosen, it must be an RFC3339 timestamp string. + description: The type of allowed values in the picklist. If the type `time` + is chosen, it must be an RFC3339 timestamp string. enum: - string - boolean @@ -27209,7 +28610,7 @@ components: - Coat items: type: string - maxItems: 20 + maxItems: 50 type: array required: - type @@ -27891,6 +29292,7 @@ components: status: description: | The current status of this request. Possible values: + - `pending verification` - `pending` - `completed` - `failed` @@ -28094,7 +29496,7 @@ components: description: A notification regarding a campaign whose state changed. properties: campaign: - $ref: '#/components/schemas/CampaignForNotification' + $ref: '#/components/schemas/Campaign' oldState: description: | The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] @@ -28116,7 +29518,7 @@ components: description: A notification regarding a campaign whose ruleset was changed. properties: campaign: - $ref: '#/components/schemas/CampaignStateNotification' + $ref: '#/components/schemas/Campaign' oldRuleset: $ref: '#/components/schemas/Ruleset' ruleset: @@ -28128,9 +29530,9 @@ components: description: A notification regarding a campaign which was edited. properties: campaign: - $ref: '#/components/schemas/CampaignStateNotification' + $ref: '#/components/schemas/Campaign' oldCampaign: - $ref: '#/components/schemas/CampaignStateNotification' + $ref: '#/components/schemas/Campaign' ruleset: $ref: '#/components/schemas/Ruleset' required: @@ -28141,7 +29543,7 @@ components: description: A notification regarding a campaign that was created. properties: campaign: - $ref: '#/components/schemas/CampaignStateNotification' + $ref: '#/components/schemas/Campaign' ruleset: $ref: '#/components/schemas/Ruleset' evaluationPosition: @@ -28176,7 +29578,7 @@ components: description: A notification regarding a campaign that was deleted. properties: campaign: - $ref: '#/components/schemas/CampaignStateNotification' + $ref: '#/components/schemas/Campaign' deletedAt: description: Time when the campaign was deleted. example: 2022-11-10T23:00:00Z @@ -28186,289 +29588,6 @@ components: - campaign - deletedAt type: object - CampaignStateNotification: - description: Campaign data and its state changes. - properties: - id: - description: Unique ID for this entity. - example: 4 - type: integer - created: - description: The exact moment this entity was created. - example: 2020-06-10T09:05:27.993483Z - format: date-time - type: string - applicationId: - description: The ID of the application that owns this entity. - example: 322 - type: integer - userId: - description: The ID of the user associated with this entity. - example: 388 - type: integer - name: - description: A user-facing name for this campaign. - example: Summer promotions - minLength: 1 - title: Campaign Name - type: string - description: - description: A detailed description of the campaign. - example: Campaign for all summer 2021 promotions - title: Campaign Description - type: string - startTime: - description: Timestamp when the campaign will become active. - example: 2021-07-20T22:00:00Z - format: date-time - type: string - endTime: - description: Timestamp when the campaign will become inactive. - example: 2021-09-22T22:00:00Z - format: date-time - type: string - attributes: - description: Arbitrary properties associated with this campaign. - properties: {} - type: object - state: - default: enabled - description: | - A disabled or archived campaign is not evaluated for rules or coupons. - enum: - - enabled - - disabled - - archived - example: enabled - type: string - activeRulesetId: - description: | - [ID of Ruleset](https://docs.talon.one/management-api#operation/getRulesets) this - campaign applies on customer session evaluation. - example: 6 - type: integer - tags: - description: A list of tags for the campaign. - example: - - summer - items: - maxLength: 50 - minLength: 1 - type: string - maxItems: 50 - type: array - features: - description: The features enabled in this campaign. - example: - - coupons - - referrals - items: - enum: - - coupons - - referrals - - loyalty - - giveaways - - strikethrough - type: string - type: array - couponSettings: - $ref: '#/components/schemas/CodeGeneratorSettings' - referralSettings: - $ref: '#/components/schemas/CodeGeneratorSettings' - limits: - description: | - The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. - items: - $ref: '#/components/schemas/LimitConfig' - type: array - campaignGroups: - description: | - The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. - example: - - 1 - - 3 - items: - type: integer - type: array - evaluationGroupId: - description: The ID of the campaign evaluation group the campaign belongs - to. - example: 2 - title: Evaluation Group ID - type: integer - type: - default: advanced - description: | - The campaign type. Possible type values: - - `cartItem`: Type of campaign that can apply effects only to cart items. - - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. - enum: - - cartItem - - advanced - example: advanced - title: Type - type: string - linkedStoreIds: - description: | - A list of store IDs that you want to link to the campaign. - - **Note:** Campaigns with linked store IDs will only be evaluated when there is a - [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) - that references a linked store. - example: - - 1 - - 2 - - 3 - items: - type: integer - type: array - budgets: - description: | - A list of all the budgets that are defined by this campaign and their usage. - - **Note:** Budgets that are not defined do not appear in this list and their usage is - not counted until they are defined. - items: - $ref: '#/components/schemas/CampaignBudget' - type: array - couponRedemptionCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Number of coupons redeemed in the campaign. - example: 163 - type: integer - referralRedemptionCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Number of referral codes redeemed in the campaign. - example: 3 - type: integer - discountCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total amount of discounts redeemed in the campaign. - example: 288.0 - type: number - discountEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of times discounts were redeemed in this campaign. - example: 343 - type: integer - couponCreationCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of coupons created by rules in this campaign. - example: 16 - type: integer - customEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of custom effects triggered by rules in this campaign. - example: 0 - type: integer - referralCreationCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of referrals created by rules in this campaign. - example: 8 - type: integer - addFreeItemEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of times the [add free item effect](https://docs.talon.one/docs/dev/integration-api/api-effects#addfreeitem) can be triggered in this campaign. - example: 0 - type: integer - awardedGiveawaysCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of giveaways awarded by rules in this campaign. - example: 9 - type: integer - createdLoyaltyPointsCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty points created by rules in this campaign. - example: 9.0 - type: number - createdLoyaltyPointsEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty point creation effects triggered by rules in this campaign. - example: 2 - type: integer - redeemedLoyaltyPointsCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty points redeemed by rules in this campaign. - example: 8.0 - type: number - redeemedLoyaltyPointsEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of loyalty point redemption effects triggered by rules in this campaign. - example: 9 - type: integer - callApiEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of webhooks triggered by rules in this campaign. - example: 0 - type: integer - reservecouponEffectCount: - description: | - This property is **deprecated**. The count should be available under *budgets* property. - Total number of reserve coupon effects triggered by rules in this campaign. - example: 9 - type: integer - lastActivity: - description: Timestamp of the most recent event received by this campaign. - example: 2022-11-10T23:00:00Z - format: date-time - type: string - updated: - description: | - 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. - format: date-time - type: string - createdBy: - description: Name of the user who created this campaign if available. - example: John Doe - type: string - updatedBy: - description: Name of the user who last updated this campaign if available. - example: Jane Doe - type: string - templateId: - description: The ID of the Campaign Template this Campaign was created from. - example: 3 - type: integer - frontendState: - description: A campaign state described exactly as in the Campaign Manager. - enum: - - expired - - scheduled - - running - - draft - - disabled - example: running - type: string - required: - - applicationId - - budgets - - created - - description - - features - - frontendState - - id - - limits - - name - - state - - tags - - type - - userId - type: object CampaignEvaluationTreeChangedNotification: description: Notification about an Application whose campaign evaluation tree changed. @@ -28670,7 +29789,9 @@ components: description: "" example: webhook: - headers: 'content-type: application/json' + headers: + - 'content-type: application/json' + - 'content-type: application/json' url: www.my-company.com/my-endpoint-name enabled: true enabled: true @@ -28701,6 +29822,28 @@ components: type: object BaseNotificationPolicy: type: object + ExpiringCouponsNotificationPolicy: + properties: + name: + description: Notification name. + example: Notification to Google + minLength: 1 + type: string + triggers: + items: + $ref: '#/components/schemas/ExpiringCouponsNotificationTrigger' + maxItems: 3 + minItems: 1 + type: array + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: true + type: boolean + required: + - name + - triggers + type: object ExpiringPointsNotificationPolicy: properties: name: @@ -28714,6 +29857,33 @@ components: maxItems: 3 minItems: 1 type: array + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: true + type: boolean + required: + - name + - triggers + type: object + CardExpiringPointsNotificationPolicy: + properties: + name: + description: Notification name. + example: Notification to Google + minLength: 1 + type: string + triggers: + items: + $ref: '#/components/schemas/CardExpiringPointsNotificationTrigger' + maxItems: 3 + minItems: 1 + type: array + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: true + type: boolean required: - name - triggers @@ -28758,6 +29928,11 @@ components: maxItems: 4 minItems: 1 type: array + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: true + type: boolean required: - name - scopes @@ -28779,6 +29954,11 @@ components: example: Christmas Sale minLength: 1 type: string + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: false + type: boolean required: - name type: object @@ -28789,6 +29969,11 @@ components: example: Christmas Sale minLength: 1 type: string + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: false + type: boolean required: - name type: object @@ -28799,6 +29984,11 @@ components: example: Christmas Sale minLength: 1 type: string + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: false + type: boolean required: - name type: object @@ -28819,6 +30009,11 @@ components: example: Notification to Google minLength: 1 type: string + batchingEnabled: + default: true + description: Indicates whether batching is activated. + example: false + type: boolean triggers: items: $ref: '#/components/schemas/TierWillDowngradeNotificationTrigger' @@ -28829,6 +30024,23 @@ components: - name - triggers type: object + ExpiringCouponsNotificationTrigger: + properties: + amount: + description: The amount of period. + minimum: 0 + type: integer + period: + description: Notification period indicated by a letter; "w" means week, + "d" means day. + enum: + - w + - d + type: string + required: + - amount + - period + type: object ExpiringPointsNotificationTrigger: properties: amount: @@ -28846,6 +30058,23 @@ components: - amount - period type: object + CardExpiringPointsNotificationTrigger: + properties: + amount: + description: The amount of period. + minimum: 1 + type: integer + period: + description: Notification period indicated by a letter; "w" means week, + "d" means day. + enum: + - w + - d + type: string + required: + - amount + - period + type: object TierWillDowngradeNotificationTrigger: properties: amount: @@ -28874,7 +30103,9 @@ components: description: "" example: webhook: - headers: 'content-type: application/json' + headers: + - 'content-type: application/json' + - 'content-type: application/json' created: 2020-06-10T09:05:27.993483Z modified: 2021-09-12T10:12:42Z id: 6 @@ -28904,7 +30135,9 @@ components: - campaign - loyalty_added_deducted_points - coupon + - expiring_coupons - expiring_points + - card_expiring_points - pending_to_active_points - strikethrough_pricing - tier_downgrade @@ -28921,7 +30154,9 @@ components: BaseNotificationWebhook: description: "" example: - headers: 'content-type: application/json' + headers: + - 'content-type: application/json' + - 'content-type: application/json' created: 2020-06-10T09:05:27.993483Z modified: 2021-09-12T10:12:42Z id: 6 @@ -28948,8 +30183,8 @@ components: type: string headers: description: List of API HTTP headers for the given webhook-based notification. - example: 'content-type: application/json' items: + example: 'content-type: application/json' pattern: ^[^:,]+:[^,]*$ type: string type: array @@ -28967,7 +30202,9 @@ components: type: object NewNotificationWebhook: example: - headers: 'content-type: application/json' + headers: + - 'content-type: application/json' + - 'content-type: application/json' url: www.my-company.com/my-endpoint-name enabled: true properties: @@ -28977,8 +30214,8 @@ components: type: string headers: description: List of API HTTP headers for the given webhook-based notification. - example: 'content-type: application/json' items: + example: 'content-type: application/json' pattern: ^[^:,]+:[^,]*$ type: string type: array @@ -29001,6 +30238,85 @@ components: required: - enabled type: object + NewNotificationTest: + properties: + type: + description: The notification type. + enum: + - campaign + - loyalty_added_deducted_points + - coupon + - expiring_coupons + - expiring_points + - pending_to_active_points + - strikethrough_pricing + - tier_downgrade + - tier_upgrade + - tier_will_downgrade + - card_expiring_points + example: loyalty_added_deducted_points + type: string + queryParams: + additionalProperties: + type: string + description: Array of query parameters. + example: + param1: value1 + param2: value2 + type: object + headers: + additionalProperties: + type: string + description: List of API HTTP headers for the given webhook-based notification. + example: + content-type: application/json + type: object + verb: + description: API method for this notification. + enum: + - POST + - PUT + - GET + - DELETE + - PATCH + example: POST + type: string + url: + description: API URL for the given notification. + example: www.my-company.com/my-endpoint-name + type: string + payload: + description: API payload of this notification. + example: "{\n\t\"message\": \"${message}\"\n}" + type: string + required: + - payload + - type + - url + - verb + type: object + NotificationTest: + properties: + httpResponse: + description: The returned http response. + example: | + HTTP/1.1 200 OK + Content-Type: application/json + Content-Length: 256 + + { + "message": "Hello, world!", + "status": "success" + } + type: string + httpStatus: + description: The returned http status code. + example: 200 + type: integer + required: + - httpResponse + - httpStatus + type: object OutgoingIntegrationTypes: properties: data: @@ -29762,7 +31078,8 @@ components: - value type: object AddItemCatalogAction: - description: The specific properties of the "ADD" catalog sync action. + description: | + The specific properties of the "ADD" catalog sync action. properties: sku: description: The unique SKU of the item to add. @@ -29779,17 +31096,28 @@ components: color: blue properties: {} type: object + product: + $ref: '#/components/schemas/Product' replaceIfExists: default: false - description: Indicates whether to replace the attributes of the item if - the same SKU exists. + description: | + Indicates whether to replace the attributes of the item if the same SKU exists. + + **Note**: When set to `true`: + - If you do not provide a new `price` value, the existing `price` value is retained. + - If you do not provide a new `product` value, the `product` value is set to `null`. example: false type: boolean required: - sku type: object PatchItemCatalogAction: - description: The specific properties of the "PATCH" catalog sync action. + description: | + The specific properties of the "PATCH" catalog sync action. + + **Note:** + - If you do not provide a new `price` value, the existing `price` value is retained. + - If you do not provide a new `product` value, the `product` value is set to `null`. properties: sku: description: The unique SKU of the item to patch. @@ -29802,6 +31130,8 @@ components: description: The attributes of the item to patch. properties: {} type: object + product: + $ref: '#/components/schemas/Product' createIfNotExists: default: false description: Indicates whether to create an item if the SKU does not exist. @@ -29853,6 +31183,8 @@ components: CatalogItem: description: "" example: + product: + name: sample_product catalogid: 6 created: 2020-06-10T09:05:27.993483Z price: 99.99 @@ -29898,6 +31230,8 @@ components: items: $ref: '#/components/schemas/ItemAttribute' type: array + product: + $ref: '#/components/schemas/Product' required: - catalogid - created @@ -29905,6 +31239,20 @@ components: - sku - version type: object + Product: + description: The specific properties of the product this item belongs to, if + available. + example: + name: sample_product + properties: + name: + description: The name of the product. + example: sample_product + maxLength: 50 + type: string + required: + - name + type: object ItemAttribute: description: "" example: @@ -30005,19 +31353,6 @@ components: - datetime - total type: object - AccountDashboardStatisticApiCalls: - properties: - total: - description: Total number of API calls received. - type: number - datetime: - description: Values aggregated for the specified date. - format: date-time - type: string - required: - - datetime - - total - type: object AccountDashboardStatisticCampaigns: properties: live: @@ -30056,11 +31391,6 @@ components: items: $ref: '#/components/schemas/AccountDashboardStatisticReferrals' type: array - apiCalls: - description: Aggregated statistic for the number of account API calls. - items: - $ref: '#/components/schemas/AccountDashboardStatisticApiCalls' - type: array campaigns: $ref: '#/components/schemas/AccountDashboardStatisticCampaigns' required: @@ -30117,8 +31447,10 @@ components: properties: {} type: object integrationId: - description: The integration ID of the store. You choose this ID when you - create a store. + description: | + The integration ID of the store. You choose this ID when you create a store. + + **Note**: You cannot edit the `integrationId` after the store has been created. example: STORE-001 format: string maxLength: 1000 @@ -30174,8 +31506,10 @@ components: properties: {} type: object integrationId: - description: The integration ID of the store. You choose this ID when you - create a store. + description: | + The integration ID of the store. You choose this ID when you create a store. + + **Note**: You cannot edit the `integrationId` after the store has been created. example: STORE-001 format: string maxLength: 1000 @@ -30232,6 +31566,439 @@ components: - campaignIds - operation type: object + CreateAchievement: + example: + period: 1Y + name: Order50Discount + periodEndOverride: + month: 11 + dayOfMonth: 23 + hour: 23 + minute: 59 + second: 59 + description: 50% off for every 50th purchase in a year. + title: 50% off on 50th purchase. + target: 50.0 + properties: + name: + description: | + The internal name of the achievement used in API requests. + + **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. + example: Order50Discount + maxLength: 1000 + minLength: 1 + pattern: ^[a-zA-Z]\w+$ + type: string + title: + description: The display name for the achievement in the Campaign Manager. + example: 50% off on 50th purchase. + type: string + description: + description: A description of the achievement. + example: 50% off for every 50th purchase in a year. + format: string + type: string + target: + description: The required number of actions or the transactional milestone + to complete the achievement. + example: 50.0 + type: number + period: + description: | + The relative duration after which the achievement ends and resets for a particular customer profile. + + **Note**: The `period` does not start when the achievement is created. + + The period is a **positive real number** followed by one letter indicating the time unit. + + Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. + + Available units: + + - `s`: seconds + - `m`: minutes + - `h`: hours + - `D`: days + - `W`: weeks + - `M`: months + - `Y`: years + + You can also round certain units down to the beginning of period and up to the end of period.: + - `_D` for rounding down days only. Signifies the start of the day. + Example: `30D_D` + - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + Example: `23W_U` + + **Note**: You can either use the round down and round up option or set an absolute period. + example: 1Y + type: string + periodEndOverride: + $ref: '#/components/schemas/TimePoint' + required: + - description + - name + - period + - target + - title + type: object + AchievementAdditionalProperties: + properties: + campaignId: + description: ID of the campaign, to which the achievement belongs to + example: 1 + type: integer + userId: + description: ID of the user that created this achievement. + example: 1234 + type: integer + createdBy: + description: | + Name of the user that created the achievement. + + **Note**: This is not available if the user has been deleted. + example: John Doe + type: string + hasProgress: + description: Indicates if a customer has made progress in the achievement. + type: boolean + required: + - campaignId + - createdBy + - userId + type: object + Achievement: + description: "" + example: + period: 1Y + createdBy: John Doe + created: 2020-06-10T09:05:27.993483Z + campaignId: 1 + name: Order50Discount + periodEndOverride: + month: 11 + dayOfMonth: 23 + hour: 23 + minute: 59 + second: 59 + description: 50% off for every 50th purchase in a year. + id: 6 + title: 50% off on 50th purchase. + userId: 1234 + hasProgress: true + target: 50.0 + properties: + id: + description: Internal ID of this entity. + example: 6 + type: integer + created: + description: The time this entity was created. + example: 2020-06-10T09:05:27.993483Z + format: date-time + type: string + name: + description: | + The internal name of the achievement used in API requests. + + **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. + example: Order50Discount + maxLength: 1000 + minLength: 1 + pattern: ^[a-zA-Z]\w+$ + type: string + title: + description: The display name for the achievement in the Campaign Manager. + example: 50% off on 50th purchase. + type: string + description: + description: A description of the achievement. + example: 50% off for every 50th purchase in a year. + format: string + type: string + target: + description: The required number of actions or the transactional milestone + to complete the achievement. + example: 50.0 + type: number + period: + description: | + The relative duration after which the achievement ends and resets for a particular customer profile. + + **Note**: The `period` does not start when the achievement is created. + + The period is a **positive real number** followed by one letter indicating the time unit. + + Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. + + Available units: + + - `s`: seconds + - `m`: minutes + - `h`: hours + - `D`: days + - `W`: weeks + - `M`: months + - `Y`: years + + You can also round certain units down to the beginning of period and up to the end of period.: + - `_D` for rounding down days only. Signifies the start of the day. + Example: `30D_D` + - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + Example: `23W_U` + + **Note**: You can either use the round down and round up option or set an absolute period. + example: 1Y + type: string + periodEndOverride: + $ref: '#/components/schemas/TimePoint' + campaignId: + description: ID of the campaign, to which the achievement belongs to + example: 1 + type: integer + userId: + description: ID of the user that created this achievement. + example: 1234 + type: integer + createdBy: + description: | + Name of the user that created the achievement. + + **Note**: This is not available if the user has been deleted. + example: John Doe + type: string + hasProgress: + description: Indicates if a customer has made progress in the achievement. + type: boolean + required: + - campaignId + - created + - createdBy + - description + - id + - name + - period + - target + - title + - userId + type: object + UpdateAchievement: + example: + period: 1Y + name: Order50Discount + periodEndOverride: + month: 11 + dayOfMonth: 23 + hour: 23 + minute: 59 + second: 59 + description: 50% off for every 50th purchase in a year. + title: 50% off on 50th purchase. + target: 50.0 + properties: + name: + description: | + The internal name of the achievement used in API requests. + example: Order50Discount + maxLength: 1000 + minLength: 1 + pattern: ^[a-zA-Z]\w+$ + type: string + title: + description: The display name for the achievement in the Campaign Manager. + example: 50% off on 50th purchase. + type: string + description: + description: A description of the achievement. + example: 50% off for every 50th purchase in a year. + format: string + type: string + target: + description: The required number of actions or the transactional milestone + to complete the achievement. + example: 50.0 + type: number + period: + description: | + The relative duration after which the achievement ends and resets for a particular customer profile. + example: 1Y + type: string + periodEndOverride: + $ref: '#/components/schemas/TimePoint' + type: object + AchievementProgress: + example: + endDate: 2000-01-23T04:56:07.000+00:00 + campaignId: 3 + name: FreeCoffee10Orders + achievementId: 3 + progress: 10.0 + completionDate: 2000-01-23T04:56:07.000+00:00 + title: 50% off on 50th purchase. + startDate: 2000-01-23T04:56:07.000+00:00 + status: completed + target: 10.0 + properties: + achievementId: + description: The internal ID of the achievement. + example: 3 + type: integer + name: + description: | + The internal name of the achievement used in API requests. + example: FreeCoffee10Orders + maxLength: 1000 + minLength: 1 + pattern: ^[a-zA-Z]\w+$ + type: string + title: + description: The display name of the achievement in the Campaign Manager. + example: 50% off on 50th purchase. + type: string + campaignId: + description: The ID of the campaign the achievement belongs to. + example: 3 + type: integer + status: + description: The status of the achievement. + enum: + - inprogress + - completed + - expired + example: completed + type: string + target: + description: The required number of actions or the transactional milestone + to complete the achievement. + example: 10.0 + type: number + progress: + description: The current progress of the customer in the achievement. + example: 10.0 + type: number + startDate: + description: Timestamp at which the customer started the achievement. + format: date-time + type: string + completionDate: + description: Timestamp at which point the customer completed the achievement. + format: date-time + type: string + endDate: + description: Timestamp at which point the achievement ends and resets for + the customer. + format: date-time + type: string + required: + - achievementId + - campaignId + - endDate + - name + - progress + - startDate + - status + - title + type: object + ApplicationAnalyticsDataPoint: + properties: + startTime: + description: The start of the aggregation time frame in UTC. + example: 2024-02-01T00:00:00Z + format: date-time + type: string + endTime: + description: The end of the aggregation time frame in UTC. + format: date-time + type: string + totalRevenue: + $ref: '#/components/schemas/ApplicationAnalyticsDataPoint_totalRevenue' + sessionsCount: + $ref: '#/components/schemas/ApplicationAnalyticsDataPoint_sessionsCount' + avgItemsPerSession: + $ref: '#/components/schemas/ApplicationAnalyticsDataPoint_avgItemsPerSession' + avgSessionValue: + $ref: '#/components/schemas/ApplicationAnalyticsDataPoint_avgSessionValue' + totalDiscounts: + description: The total value of discounts given for cart items in influenced + sessions. + example: 10.0 + type: number + couponsCount: + description: The number of times a coupon was successfully redeemed in influenced + sessions. + example: 12.0 + type: number + type: object + ApplicationCampaignAnalytics: + properties: + startTime: + description: The start of the aggregation time frame in UTC. + example: 2024-02-01T00:00:00Z + format: date-time + type: string + endTime: + description: The end of the aggregation time frame in UTC. + format: date-time + type: string + campaignId: + description: The ID of the campaign. + example: 1 + type: integer + campaignName: + description: The name of the campaign. + example: Summer promotions + type: string + campaignTags: + description: A list of tags for the campaign. + example: + - summer + items: + maxLength: 50 + minLength: 1 + type: string + maxItems: 50 + type: array + campaignState: + default: enabled + description: | + The state of the campaign. + + **Note:** A disabled or archived campaign is not evaluated for rules or coupons. + enum: + - enabled + - disabled + - archived + example: enabled + type: string + campaignActiveRulesetId: + description: | + The [ID of the ruleset](https://docs.talon.one/management-api#operation/getRulesets) this + campaign applies on customer session evaluation. + example: 2 + type: integer + campaignStartTime: + description: Date and time when the campaign becomes active. + example: 2021-07-20T22:00:00Z + format: date-time + type: string + campaignEndTime: + description: Date and time when the campaign becomes inactive. + example: 2021-10-01T02:00:00Z + format: date-time + type: string + totalRevenue: + $ref: '#/components/schemas/ApplicationCampaignAnalytics_totalRevenue' + sessionsCount: + $ref: '#/components/schemas/ApplicationCampaignAnalytics_sessionsCount' + avgItemsPerSession: + $ref: '#/components/schemas/ApplicationCampaignAnalytics_avgItemsPerSession' + avgSessionValue: + $ref: '#/components/schemas/ApplicationCampaignAnalytics_avgSessionValue' + totalDiscounts: + $ref: '#/components/schemas/ApplicationCampaignAnalytics_totalDiscounts' + couponsCount: + $ref: '#/components/schemas/ApplicationCampaignAnalytics_couponsCount' + type: object inline_response_201: example: data: @@ -30526,9 +32293,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -30562,9 +32332,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -30635,9 +32408,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -30671,9 +32447,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -30727,7 +32506,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -30784,6 +32562,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -30868,7 +32647,6 @@ components: - coupons - referrals createdLoyaltyPointsCount: 9.0 - evaluationGroupId: 2 couponSettings: couponPattern: SUMMER-####-#### validCharacters: @@ -30925,6 +32703,7 @@ components: activeRulesetId: 6 reservecouponEffectCount: 9 updatedBy: Jane Doe + frontendState: running created: 2020-06-10T09:05:27.993483Z referralCreationCount: 8 couponRedemptionCount: 163 @@ -31505,6 +33284,51 @@ components: - data - hasMore inline_response_200_11: + example: + data: + - accountId: 3886 + created: 2020-06-10T09:05:27.993483Z + name: Europe access group + subscribedApplicationsIds: + - 1 + - 2 + - 3 + modified: 2021-09-12T10:12:42Z + description: A group that gives access to all the campaigns for the Europe + market. + id: 6 + campaignIds: + - 4 + - 6 + - 8 + - accountId: 3886 + created: 2020-06-10T09:05:27.993483Z + name: Europe access group + subscribedApplicationsIds: + - 1 + - 2 + - 3 + modified: 2021-09-12T10:12:42Z + description: A group that gives access to all the campaigns for the Europe + market. + id: 6 + campaignIds: + - 4 + - 6 + - 8 + totalResultSize: 1 + properties: + totalResultSize: + example: 1 + type: integer + data: + items: + $ref: '#/components/schemas/CampaignGroup' + type: array + required: + - data + - totalResultSize + inline_response_200_12: example: data: - activeRulesetId: 5 @@ -31783,7 +33607,7 @@ components: required: - data - hasMore - inline_response_200_12: + inline_response_200_13: example: data: - cardBased: true @@ -31811,9 +33635,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -31847,9 +33674,12 @@ components: sandbox: true description: Customers collect 10 points per 1$ spent title: Point collection + canUpdateJoinPolicy: true subscribedApplications: - 132 - 97 + tiersExpirationPolicy: tier_start_date + programJoinPolicy: not_join accountID: 1 defaultValidity: 2W_U defaultPending: immediate @@ -31870,11 +33700,12 @@ components: required: - data - totalResultSize - inline_response_200_13: + inline_response_200_14: example: data: - rulesetId: 11 amount: 10.25 + campaignId: 324 created: 2000-01-23T04:56:07.000+00:00 customerSessionId: 05c2da0d-48fa-4aa1-b629-898f58f1584d type: addition @@ -31892,6 +33723,7 @@ components: startDate: 2022-01-02T15:04:05Z07:00 - rulesetId: 11 amount: 10.25 + campaignId: 324 created: 2000-01-23T04:56:07.000+00:00 customerSessionId: 05c2da0d-48fa-4aa1-b629-898f58f1584d type: addition @@ -31919,7 +33751,7 @@ components: required: - data - hasMore - inline_response_200_14: + inline_response_200_15: example: data: - ledger: @@ -32016,7 +33848,7 @@ components: required: - data - hasMore - inline_response_200_15: + inline_response_200_16: example: data: - amount: 10.25 @@ -32059,7 +33891,7 @@ components: required: - data - hasMore - inline_response_200_16: + inline_response_200_17: example: data: - accountId: 3886 @@ -32104,7 +33936,7 @@ components: type: array required: - data - inline_response_200_17: + inline_response_200_18: example: data: - item: item @@ -32120,57 +33952,6 @@ components: required: - data - hasMore - inline_response_200_18: - example: - data: - - accountId: 3886 - createdBy: 134 - payload: - - KTL-WH-ET-1 - - KTL-BL-ET-1 - created: 2020-06-10T09:05:27.993483Z - campaignId: 7 - subscribedApplicationsIds: - - 1 - - 2 - - 3 - name: My collection - modified: 2021-09-12T10:12:42Z - description: My collection of SKUs - modifiedBy: 48 - id: 6 - applicationId: 1 - - accountId: 3886 - createdBy: 134 - payload: - - KTL-WH-ET-1 - - KTL-BL-ET-1 - created: 2020-06-10T09:05:27.993483Z - campaignId: 7 - subscribedApplicationsIds: - - 1 - - 2 - - 3 - name: My collection - modified: 2021-09-12T10:12:42Z - description: My collection of SKUs - modifiedBy: 48 - id: 6 - applicationId: 1 - hasMore: true - totalResultSize: 1 - properties: - hasMore: - type: boolean - totalResultSize: - example: 1 - type: integer - data: - items: - $ref: '#/components/schemas/Collection' - type: array - required: - - data inline_response_200_19: example: data: @@ -32612,6 +34393,8 @@ components: applicationId: 322 cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -32631,6 +34414,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -32666,6 +34451,8 @@ components: applicationId: 322 cartItems: - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -32685,6 +34472,8 @@ components: category: shoes height: 0.8008281904610115 - remainingQuantity: 1 + product: + name: sample_product quantity: 1 returnedQuantity: 1 length: 1.4658129805029452 @@ -32859,7 +34648,7 @@ components: name: Travel audience sandbox: true integration: mparticle - description: Travel audience 18-25 + description: Travel audience 18-27 integrationId: 382370BKDB946 id: 6 createdIn3rdParty: false @@ -32869,7 +34658,7 @@ components: name: Travel audience sandbox: true integration: mparticle - description: Travel audience 18-25 + description: Travel audience 18-27 integrationId: 382370BKDB946 id: 6 createdIn3rdParty: false @@ -32888,6 +34677,78 @@ components: required: - data inline_response_200_31: + example: + data: + - membersCount: 1234 + audienceId: 1 + - membersCount: 1234 + audienceId: 1 + hasMore: true + properties: + hasMore: + type: boolean + data: + items: + $ref: '#/components/schemas/AudienceAnalytics' + type: array + required: + - data + inline_response_200_32: + example: + data: + - accountId: 31 + closedSessions: 3 + created: 2000-01-23T04:56:07.000+00:00 + sandbox: false + integrationId: URNGV8294NV + attributes: + Language: english + ShippingCountry: DE + totalSales: 299.99 + lastActivity: 2020-02-08T14:15:20Z + id: 6 + loyaltyMemberships: + - joined: 2000-01-23T04:56:07.000+00:00 + loyaltyProgramId: 323414846 + - joined: 2000-01-23T04:56:07.000+00:00 + loyaltyProgramId: 323414846 + audienceMemberships: + - name: Travel audience + id: 2 + - name: Travel audience + id: 2 + - accountId: 31 + closedSessions: 3 + created: 2000-01-23T04:56:07.000+00:00 + sandbox: false + integrationId: URNGV8294NV + attributes: + Language: english + ShippingCountry: DE + totalSales: 299.99 + lastActivity: 2020-02-08T14:15:20Z + id: 6 + loyaltyMemberships: + - joined: 2000-01-23T04:56:07.000+00:00 + loyaltyProgramId: 323414846 + - joined: 2000-01-23T04:56:07.000+00:00 + loyaltyProgramId: 323414846 + audienceMemberships: + - name: Travel audience + id: 2 + - name: Travel audience + id: 2 + hasMore: true + properties: + hasMore: + type: boolean + data: + items: + $ref: '#/components/schemas/CustomerProfile' + type: array + required: + - data + inline_response_200_33: example: data: - friendIntegrationId: friendIntegrationId @@ -32916,7 +34777,7 @@ components: type: array required: - data - inline_response_200_32: + inline_response_200_34: example: data: - created: 2020-06-10T09:05:27.993483Z @@ -32989,10 +34850,12 @@ components: required: - data - totalResultSize - inline_response_200_33: + inline_response_200_35: example: data: - - catalogid: 6 + - product: + name: sample_product + catalogid: 6 created: 2020-06-10T09:05:27.993483Z price: 99.99 attributes: @@ -33005,7 +34868,9 @@ components: id: 6 sku: SKU1241028 version: 5 - - catalogid: 6 + - product: + name: sample_product + catalogid: 6 created: 2020-06-10T09:05:27.993483Z price: 99.99 attributes: @@ -33032,7 +34897,7 @@ components: type: array required: - data - inline_response_200_34: + inline_response_200_36: example: data: - accountId: 3886 @@ -33067,7 +34932,7 @@ components: required: - data - totalResultSize - inline_response_200_35: + inline_response_200_37: example: data: - headers: @@ -33118,7 +34983,7 @@ components: required: - data - totalResultSize - inline_response_200_36: + inline_response_200_38: example: data: - webhookId: 1 @@ -33143,7 +35008,7 @@ components: required: - data - totalResultSize - inline_response_200_37: + inline_response_200_39: example: data: - requestTime: 2021-07-20T22:00:00Z @@ -33184,7 +35049,7 @@ components: required: - data - totalResultSize - inline_response_200_38: + inline_response_200_40: example: data: - created: 2020-06-10T09:05:27.993483Z @@ -33209,7 +35074,7 @@ components: required: - data - totalResultSize - inline_response_200_39: + inline_response_200_41: example: data: - created: 2020-06-10T09:05:27.993483Z @@ -33224,8 +35089,8 @@ components: lastAccessed: 2021-09-12T10:14:42Z id: 6 state: invited - latestFeedTimestamp: 2020-06-01T00:00:00Z authMethod: basic_auth + latestFeedTimestamp: 2020-06-01T00:00:00Z lastSignedIn: 2021-09-12T10:12:42Z email: john.doe@example.com policy: @@ -33242,8 +35107,8 @@ components: lastAccessed: 2021-09-12T10:14:42Z id: 6 state: invited - latestFeedTimestamp: 2020-06-01T00:00:00Z authMethod: basic_auth + latestFeedTimestamp: 2020-06-01T00:00:00Z lastSignedIn: 2021-09-12T10:12:42Z email: john.doe@example.com policy: @@ -33260,7 +35125,7 @@ components: required: - data - totalResultSize - inline_response_200_40: + inline_response_200_42: example: data: - new: @@ -33311,7 +35176,7 @@ components: type: array required: - data - inline_response_200_41: + inline_response_200_43: example: data: - filter: '{}' @@ -33338,7 +35203,7 @@ components: required: - data - totalResultSize - inline_response_200_42: + inline_response_200_44: example: data: - accountId: 3886 @@ -33381,7 +35246,7 @@ components: required: - data - totalResultSize - inline_response_200_43: + inline_response_200_45: example: data: - linkedCampaignIds: @@ -33426,6 +35291,202 @@ components: type: array required: - data + inline_response_200_46: + example: + data: + - period: 1Y + createdBy: John Doe + created: 2020-06-10T09:05:27.993483Z + campaignId: 1 + name: Order50Discount + periodEndOverride: + month: 11 + dayOfMonth: 23 + hour: 23 + minute: 59 + second: 59 + description: 50% off for every 50th purchase in a year. + id: 6 + title: 50% off on 50th purchase. + userId: 1234 + hasProgress: true + target: 50.0 + - period: 1Y + createdBy: John Doe + created: 2020-06-10T09:05:27.993483Z + campaignId: 1 + name: Order50Discount + periodEndOverride: + month: 11 + dayOfMonth: 23 + hour: 23 + minute: 59 + second: 59 + description: 50% off for every 50th purchase in a year. + id: 6 + title: 50% off on 50th purchase. + userId: 1234 + hasProgress: true + target: 50.0 + hasMore: true + properties: + hasMore: + type: boolean + data: + items: + $ref: '#/components/schemas/Achievement' + type: array + required: + - data + inline_response_200_47: + example: + data: + - endDate: 2000-01-23T04:56:07.000+00:00 + campaignId: 3 + name: FreeCoffee10Orders + achievementId: 3 + progress: 10.0 + completionDate: 2000-01-23T04:56:07.000+00:00 + title: 50% off on 50th purchase. + startDate: 2000-01-23T04:56:07.000+00:00 + status: completed + target: 10.0 + - endDate: 2000-01-23T04:56:07.000+00:00 + campaignId: 3 + name: FreeCoffee10Orders + achievementId: 3 + progress: 10.0 + completionDate: 2000-01-23T04:56:07.000+00:00 + title: 50% off on 50th purchase. + startDate: 2000-01-23T04:56:07.000+00:00 + status: completed + target: 10.0 + hasMore: true + properties: + hasMore: + example: true + type: boolean + data: + items: + $ref: '#/components/schemas/AchievementProgress' + type: array + required: + - data + - hasMore + ApplicationAnalyticsDataPoint_totalRevenue: + description: The total, pre-discount value of all items purchased in a customer + session. + properties: + total: + example: 1.25 + type: number + influenced: + example: 3.25 + type: number + ApplicationAnalyticsDataPoint_sessionsCount: + description: The number of all closed sessions. The `influenced` value includes + only sessions with at least one applied effect. + properties: + total: + example: 15.0 + type: number + influenced: + example: 5.0 + type: number + ApplicationAnalyticsDataPoint_avgItemsPerSession: + description: The number of items from sessions divided by the number of sessions. + The `influenced` value includes only sessions with at least one applied effect. + properties: + total: + example: 1.25 + type: number + influenced: + example: 3.25 + type: number + ApplicationAnalyticsDataPoint_avgSessionValue: + description: The average customer session value, calculated by dividing the + revenue value by the number of sessions. The `influenced` value includes only + sessions with at least one applied effect. + properties: + total: + example: 1.25 + type: number + influenced: + example: 3.25 + type: number + ApplicationCampaignAnalytics_totalRevenue: + description: The total, pre-discount value of all items purchased in a customer + session. + properties: + value: + example: 1.25 + type: number + influence_rate: + example: 3.25 + type: number + trend: + example: 3.25 + type: number + ApplicationCampaignAnalytics_sessionsCount: + description: The number of all closed sessions. The `influenced` value includes + only sessions with at least one applied effect. + properties: + value: + example: 12.0 + type: number + influence_rate: + example: 3.25 + type: number + trend: + example: 3.25 + type: number + ApplicationCampaignAnalytics_avgItemsPerSession: + description: The number of items from sessions divided by the number of sessions. + The `influenced` value includes only sessions with at least one applied effect. + properties: + value: + example: 12.0 + type: number + uplift: + example: 3.25 + type: number + trend: + example: 3.25 + type: number + ApplicationCampaignAnalytics_avgSessionValue: + description: The average customer session value, calculated by dividing the + revenue value by the number of sessions. The `influenced` value includes only + sessions with at least one applied effect. + properties: + value: + example: 12.0 + type: number + uplift: + example: 3.25 + type: number + trend: + example: 3.25 + type: number + ApplicationCampaignAnalytics_totalDiscounts: + description: The total value of discounts given for cart items in influenced + sessions. + properties: + value: + example: 10.0 + type: number + trend: + example: 3.25 + type: number + ApplicationCampaignAnalytics_couponsCount: + description: The number of times a coupon was successfully redeemed in influenced + sessions. + properties: + value: + example: 10.0 + type: number + trend: + example: 3.25 + type: number securitySchemes: api_key_v1: description: | diff --git a/api_integration.go b/api_integration.go index ba015149..4ff55b57 100644 --- a/api_integration.go +++ b/api_integration.go @@ -738,7 +738,7 @@ DeleteAudienceMembershipsV2 Delete audience memberships Remove all members from this audience. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). + - @param audienceId The ID of the audience. @return apiDeleteAudienceMembershipsV2Request */ @@ -866,7 +866,7 @@ Delete an audience created by a third-party integration. **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). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). + - @param audienceId The ID of the audience. @return apiDeleteAudienceV2Request */ @@ -1271,6 +1271,7 @@ type apiGetCustomerInventoryRequest struct { coupons *bool loyalty *bool giveaways *bool + achievements *bool } func (r apiGetCustomerInventoryRequest) Profile(profile bool) apiGetCustomerInventoryRequest { @@ -1298,6 +1299,11 @@ func (r apiGetCustomerInventoryRequest) Giveaways(giveaways bool) apiGetCustomer return r } +func (r apiGetCustomerInventoryRequest) Achievements(achievements bool) apiGetCustomerInventoryRequest { + r.achievements = &achievements + return r +} + /* GetCustomerInventory List customer data Return the customer inventory regarding entities referencing this customer profile's `integrationId`. @@ -1360,6 +1366,9 @@ func (r apiGetCustomerInventoryRequest) Execute() (CustomerInventory, *_nethttp. if r.giveaways != nil { localVarQueryParams.Add("giveaways", parameterToString(*r.giveaways, "")) } + if r.achievements != nil { + localVarQueryParams.Add("achievements", parameterToString(*r.achievements, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3508,19 +3517,24 @@ func (r apiSyncCatalogRequest) Body(body CatalogSyncRequest) apiSyncCatalogReque /* SyncCatalog Sync cart item catalog -Perform one or more of the following sync actions on this cart item catalog, up to 1000 actions: +Perform one or more of the following actions for a given cart item catalog: + +- Adding an item to the catalog. +- Adding several items to the catalog. +- Editing the attributes of an item in the catalog. +- Editing the attributes of several items in the catalog. +- Removing an item from the catalog. +- Removing several items from the catalog. + +You can add, update, or delete up to 1000 cart items in a single request. Each item synced to a catalog must have a unique `SKU`. -- 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. +**Important**: Syncing items with duplicate `SKU` values in a single request returns an error message with a `400` status code. -**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). +For more information, read [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) +Use [cart item attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes) to filter items and select the ones you want to edit or delete when editing or deleting more than one item at a time. @@ -3567,11 +3581,59 @@ Synchronization actions are sent as `PUT` requests. See the structure for each a "payload": { "attributes": { "color": "Navy blue", - "type": "shoe" + "type": "shoes" + }, + "replaceIfExists": true, + "sku": "SKU1241028", + "price": 100, + "product": { + "name": "sneakers" + } + }, + "type": "ADD" + } + ] + } + ``` +
+ +
+ +
+ + Adding several items to the catalog +
+ + ```json + { + "actions": [ + { + "payload": { + "attributes": { + "color": "Navy blue", + "type": "shoes" + }, + "replaceIfExists": true, + "sku": "SKU1241027", + "price": 100, + "product": { + "name": "sneakers" + } + }, + "type": "ADD" + }, + { + "payload": { + "attributes": { + "color": "Navy blue", + "type": "shoes" }, "replaceIfExists": true, "sku": "SKU1241028", - "price": 100 + "price": 100, + "product": { + "name": "sneakers" + } }, "type": "ADD" } @@ -3597,7 +3659,10 @@ Synchronization actions are sent as `PUT` requests. See the structure for each a "origin": "germany" }, "createIfNotExists": false, - "sku": "SKU1241028" + "sku": "SKU1241028", + "product": { + "name": "sneakers" + } }, "type": "PATCH" } @@ -3610,7 +3675,7 @@ Synchronization actions are sent as `PUT` requests. See the structure for each a
- Editing the attributes of several items at once + Editing the attributes of several items in the catalog
```json @@ -3663,7 +3728,7 @@ Synchronization actions are sent as `PUT` requests. See the structure for each a
- Removing several items from the catalog at once + Removing several items from the catalog
```json @@ -4091,7 +4156,7 @@ UpdateAudienceCustomersAttributes Update profile attributes for all customers in Update the specified profile attributes to the provided values for all customers in the specified audience. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). + - @param audienceId The ID of the audience. @return apiUpdateAudienceCustomersAttributesRequest */ @@ -4229,7 +4294,7 @@ Update the name of the given audience created by a third-party integration. Send To update the audience's members, use the [Update customer profile](#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param audienceId The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). + - @param audienceId The ID of the audience. @return apiUpdateAudienceV2Request */ @@ -4383,12 +4448,11 @@ func (r apiUpdateCustomerProfileAudiencesRequest) Body(body CustomerProfileAudie /* UpdateCustomerProfileAudiences Update multiple customer profiles' audiences -Update the specified customer profiles with the specified audiences. Use this endpoint -when customers join or leave audiences. +Add customer profiles to or remove them from an audience. -The limit of customer profiles per request is 1000. +The endpoint supports 1000 audience actions (`add` or `remove`) per request. -**Note:** You can also add customer profiles to or remove them from an audience using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect. +**Note:** You can also do this using the [Update audience](https://docs.talon.one/docs/product/rules/effects/using-effects#updating-an-audience) effect. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @@ -4897,6 +4961,7 @@ type apiUpdateCustomerSessionV2Request struct { customerSessionId string body *IntegrationRequest dry *bool + now *time.Time } func (r apiUpdateCustomerSessionV2Request) Body(body IntegrationRequest) apiUpdateCustomerSessionV2Request { @@ -4909,6 +4974,11 @@ func (r apiUpdateCustomerSessionV2Request) Dry(dry bool) apiUpdateCustomerSessio return r } +func (r apiUpdateCustomerSessionV2Request) Now(now time.Time) apiUpdateCustomerSessionV2Request { + r.now = &now + return r +} + /* UpdateCustomerSessionV2 Update customer session Update or create a [customer session](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). @@ -4996,6 +5066,9 @@ func (r apiUpdateCustomerSessionV2Request) Execute() (IntegrationStateV2, *_neth if r.dry != nil { localVarQueryParams.Add("dry", parameterToString(*r.dry, "")) } + if r.now != nil { + localVarQueryParams.Add("now", parameterToString(*r.now, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} diff --git a/api_management.go b/api_management.go index 2d5cb985..d5802c68 100644 --- a/api_management.go +++ b/api_management.go @@ -693,6 +693,182 @@ func (r apiCreateAccountCollectionRequest) Execute() (Collection, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, nil } +type apiCreateAchievementRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + body *CreateAchievement +} + +func (r apiCreateAchievementRequest) Body(body CreateAchievement) apiCreateAchievementRequest { + r.body = &body + return r +} + +/* +CreateAchievement Create achievement +Create a new achievement in a specific campaign. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + +@return apiCreateAchievementRequest +*/ +func (a *ManagementApiService) CreateAchievement(ctx _context.Context, applicationId int32, campaignId int32) apiCreateAchievementRequest { + return apiCreateAchievementRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + } +} + +/* +Execute executes the request + + @return Achievement +*/ +func (r apiCreateAchievementRequest) Execute() (Achievement, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue Achievement + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateAchievement") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/achievements" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 201 { + var v Achievement + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type apiCreateAdditionalCostRequest struct { ctx _context.Context apiService *ManagementApiService @@ -1801,29 +1977,29 @@ func (r apiCreateCouponsForMultipleRecipientsRequest) Execute() (InlineResponse2 return localVarReturnValue, localVarHTTPResponse, nil } -type apiCreatePasswordRecoveryEmailRequest struct { +type apiCreateInviteEmailRequest struct { ctx _context.Context apiService *ManagementApiService - body *NewPasswordEmail + body *NewInviteEmail } -func (r apiCreatePasswordRecoveryEmailRequest) Body(body NewPasswordEmail) apiCreatePasswordRecoveryEmailRequest { +func (r apiCreateInviteEmailRequest) Body(body NewInviteEmail) apiCreateInviteEmailRequest { r.body = &body return r } /* -CreatePasswordRecoveryEmail Request a password reset -Send an email with a password recovery link to the email address of an existing account. +CreateInviteEmail Resend invitation email +Resend an email invitation to an existing user. -**Note:** The password recovery link expires 30 minutes after this endpoint is triggered. +**Note:** The invitation token is valid for 24 hours after the email has been sent. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiCreatePasswordRecoveryEmailRequest +@return apiCreateInviteEmailRequest */ -func (a *ManagementApiService) CreatePasswordRecoveryEmail(ctx _context.Context) apiCreatePasswordRecoveryEmailRequest { - return apiCreatePasswordRecoveryEmailRequest{ +func (a *ManagementApiService) CreateInviteEmail(ctx _context.Context) apiCreateInviteEmailRequest { + return apiCreateInviteEmailRequest{ apiService: a, ctx: ctx, } @@ -1832,24 +2008,24 @@ func (a *ManagementApiService) CreatePasswordRecoveryEmail(ctx _context.Context) /* Execute executes the request - @return NewPasswordEmail + @return NewInviteEmail */ -func (r apiCreatePasswordRecoveryEmailRequest) Execute() (NewPasswordEmail, *_nethttp.Response, error) { +func (r apiCreateInviteEmailRequest) Execute() (NewInviteEmail, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue NewPasswordEmail + localVarReturnValue NewInviteEmail ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreatePasswordRecoveryEmail") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateInviteEmail") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/password_recovery_emails" + localVarPath := localBasePath + "/v1/invite_emails" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -1927,8 +2103,8 @@ func (r apiCreatePasswordRecoveryEmailRequest) Execute() (NewPasswordEmail, *_ne body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 204 { - var v NewPasswordEmail + if localVarHTTPResponse.StatusCode == 201 { + var v NewInviteEmail err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1951,41 +2127,29 @@ func (r apiCreatePasswordRecoveryEmailRequest) Execute() (NewPasswordEmail, *_ne return localVarReturnValue, localVarHTTPResponse, nil } -type apiCreateSessionRequest struct { +type apiCreateInviteV2Request struct { ctx _context.Context apiService *ManagementApiService - body *LoginParams + body *NewInvitation } -func (r apiCreateSessionRequest) Body(body LoginParams) apiCreateSessionRequest { +func (r apiCreateInviteV2Request) Body(body NewInvitation) apiCreateInviteV2Request { r.body = &body return r } /* -CreateSession 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. - -
+CreateInviteV2 Invite user +Create a new user in the account and send an invitation to their email address. -

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. - -
+**Note**: The invitation token is valid for 24 hours after the email has been sent. You can resend an invitation to a user with the [Resend invitation email](https://docs.talon.one/management-api#tag/Accounts-and-users/operation/createInviteEmail) endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiCreateSessionRequest +@return apiCreateInviteV2Request */ -func (a *ManagementApiService) CreateSession(ctx _context.Context) apiCreateSessionRequest { - return apiCreateSessionRequest{ +func (a *ManagementApiService) CreateInviteV2(ctx _context.Context) apiCreateInviteV2Request { + return apiCreateInviteV2Request{ apiService: a, ctx: ctx, } @@ -1994,24 +2158,24 @@ func (a *ManagementApiService) CreateSession(ctx _context.Context) apiCreateSess /* Execute executes the request - @return Session + @return User */ -func (r apiCreateSessionRequest) Execute() (Session, *_nethttp.Response, error) { +func (r apiCreateInviteV2Request) Execute() (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Session + localVarReturnValue User ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateSession") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateInviteV2") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/sessions" + localVarPath := localBasePath + "/v2/invites" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -2090,7 +2254,7 @@ func (r apiCreateSessionRequest) Execute() (Session, *_nethttp.Response, error) error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 201 { - var v Session + var v User err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2113,56 +2277,55 @@ func (r apiCreateSessionRequest) Execute() (Session, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiCreateStoreRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - body *NewStore +type apiCreatePasswordRecoveryEmailRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *NewPasswordEmail } -func (r apiCreateStoreRequest) Body(body NewStore) apiCreateStoreRequest { +func (r apiCreatePasswordRecoveryEmailRequest) Body(body NewPasswordEmail) apiCreatePasswordRecoveryEmailRequest { r.body = &body return r } /* -CreateStore Create store -Create a new store in a specific Application. +CreatePasswordRecoveryEmail Request a password reset +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. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiCreateStoreRequest +@return apiCreatePasswordRecoveryEmailRequest */ -func (a *ManagementApiService) CreateStore(ctx _context.Context, applicationId int32) apiCreateStoreRequest { - return apiCreateStoreRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) CreatePasswordRecoveryEmail(ctx _context.Context) apiCreatePasswordRecoveryEmailRequest { + return apiCreatePasswordRecoveryEmailRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return Store + @return NewPasswordEmail */ -func (r apiCreateStoreRequest) Execute() (Store, *_nethttp.Response, error) { +func (r apiCreatePasswordRecoveryEmailRequest) Execute() (NewPasswordEmail, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Store + localVarReturnValue NewPasswordEmail ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateStore") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreatePasswordRecoveryEmail") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/stores" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/password_recovery_emails" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -2240,28 +2403,8 @@ func (r apiCreateStoreRequest) Execute() (Store, *_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 201 { - var v Store - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 204 { + var v NewPasswordEmail err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -2284,69 +2427,74 @@ func (r apiCreateStoreRequest) Execute() (Store, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiDeductLoyaltyCardPointsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyCardId string - body *DeductLoyaltyPoints +type apiCreateSessionRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *LoginParams } -func (r apiDeductLoyaltyCardPointsRequest) Body(body DeductLoyaltyPoints) apiDeductLoyaltyCardPointsRequest { +func (r apiCreateSessionRequest) Body(body LoginParams) apiCreateSessionRequest { r.body = &body return r } /* -DeductLoyaltyCardPoints Deduct points from card -Deduct points from the given loyalty card in the specified card-based loyalty program. +CreateSession 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. + +
+ +

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. + +
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. -@return apiDeductLoyaltyCardPointsRequest +@return apiCreateSessionRequest */ -func (a *ManagementApiService) DeductLoyaltyCardPoints(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiDeductLoyaltyCardPointsRequest { - return apiDeductLoyaltyCardPointsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, +func (a *ManagementApiService) CreateSession(ctx _context.Context) apiCreateSessionRequest { + return apiCreateSessionRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request + + @return Session */ -func (r apiDeductLoyaltyCardPointsRequest) Execute() (*_nethttp.Response, error) { +func (r apiCreateSessionRequest) Execute() (Session, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue Session ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeductLoyaltyCardPoints") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateSession") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) + localVarPath := localBasePath + "/v1/sessions" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return nil, reportError("loyaltyCardId must have less than 108 elements") - } - if r.body == nil { - return nil, reportError("body is required and must be specified") + return localVarReturnValue, nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -2398,18 +2546,18 @@ func (r apiDeductLoyaltyCardPointsRequest) Execute() (*_nethttp.Response, error) } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -2417,89 +2565,91 @@ func (r apiDeductLoyaltyCardPointsRequest) Execute() (*_nethttp.Response, error) body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 201 { + var v Session err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type apiDeleteAccountCollectionRequest struct { - ctx _context.Context - apiService *ManagementApiService - collectionId int32 +type apiCreateStoreRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + body *NewStore +} + +func (r apiCreateStoreRequest) Body(body NewStore) apiCreateStoreRequest { + r.body = &body + return r } /* -DeleteAccountCollection Delete account-level collection -Delete a given account-level collection. +CreateStore Create store +Create a new store in a specific Application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiDeleteAccountCollectionRequest +@return apiCreateStoreRequest */ -func (a *ManagementApiService) DeleteAccountCollection(ctx _context.Context, collectionId int32) apiDeleteAccountCollectionRequest { - return apiDeleteAccountCollectionRequest{ - apiService: a, - ctx: ctx, - collectionId: collectionId, +func (a *ManagementApiService) CreateStore(ctx _context.Context, applicationId int32) apiCreateStoreRequest { + return apiCreateStoreRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request + + @return Store */ -func (r apiDeleteAccountCollectionRequest) Execute() (*_nethttp.Response, error) { +func (r apiCreateStoreRequest) Execute() (Store, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue Store ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteAccountCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.CreateStore") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections/{collectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/stores" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2515,6 +2665,8 @@ func (r apiDeleteAccountCollectionRequest) Execute() (*_nethttp.Response, error) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -2545,18 +2697,18 @@ func (r apiDeleteAccountCollectionRequest) Execute() (*_nethttp.Response, error) } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -2564,73 +2716,105 @@ func (r apiDeleteAccountCollectionRequest) Execute() (*_nethttp.Response, error) body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { + if localVarHTTPResponse.StatusCode == 201 { + var v Store + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiDeleteCampaignRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 +type apiDeactivateUserByEmailRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *DeactivateUserRequest +} + +func (r apiDeactivateUserByEmailRequest) Body(body DeactivateUserRequest) apiDeactivateUserByEmailRequest { + r.body = &body + return r } /* -DeleteCampaign Delete campaign -Delete the given campaign. +DeactivateUserByEmail Deactivate user by email address +Deactivate a specific user by their email address. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiDeleteCampaignRequest +@return apiDeactivateUserByEmailRequest */ -func (a *ManagementApiService) DeleteCampaign(ctx _context.Context, applicationId int32, campaignId int32) apiDeleteCampaignRequest { - return apiDeleteCampaignRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, +func (a *ManagementApiService) DeactivateUserByEmail(ctx _context.Context) apiDeactivateUserByEmailRequest { + return apiDeactivateUserByEmailRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request */ -func (r apiDeleteCampaignRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeactivateUserByEmailRequest) Execute() (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCampaign") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeactivateUserByEmail") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath := localBasePath + "/v1/users/deactivate" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2646,6 +2830,8 @@ func (r apiDeleteCampaignRequest) Execute() (*_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -2701,62 +2887,73 @@ func (r apiDeleteCampaignRequest) Execute() (*_nethttp.Response, error) { return localVarHTTPResponse, nil } -type apiDeleteCollectionRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - collectionId int32 +type apiDeductLoyaltyCardPointsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string + body *DeductLoyaltyPoints +} + +func (r apiDeductLoyaltyCardPointsRequest) Body(body DeductLoyaltyPoints) apiDeductLoyaltyCardPointsRequest { + r.body = &body + return r } /* -DeleteCollection Delete campaign-level collection -Delete a given campaign-level collection. +DeductLoyaltyCardPoints Deduct points from card +Deduct points from the given loyalty card in the specified card-based loyalty program. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. + - @param 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. + - @param 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. -@return apiDeleteCollectionRequest +@return apiDeductLoyaltyCardPointsRequest */ -func (a *ManagementApiService) DeleteCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiDeleteCollectionRequest { - return apiDeleteCollectionRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, - collectionId: collectionId, +func (a *ManagementApiService) DeductLoyaltyCardPoints(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiDeductLoyaltyCardPointsRequest { + return apiDeductLoyaltyCardPointsRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, } } /* Execute executes the request */ -func (r apiDeleteCollectionRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeductLoyaltyCardPointsRequest) Execute() (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodDelete + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeductLoyaltyCardPoints") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/deduct_points" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if strlen(r.loyaltyCardId) > 108 { + return nil, reportError("loyaltyCardId must have less than 108 elements") + } + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -2772,6 +2969,8 @@ func (r apiDeleteCollectionRequest) Execute() (*_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -2821,6 +3020,16 @@ func (r apiDeleteCollectionRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -2829,6 +3038,16 @@ func (r apiDeleteCollectionRequest) Execute() (*_nethttp.Response, error) { return localVarHTTPResponse, newErr } newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v } return localVarHTTPResponse, newErr } @@ -2836,38 +3055,32 @@ func (r apiDeleteCollectionRequest) Execute() (*_nethttp.Response, error) { return localVarHTTPResponse, nil } -type apiDeleteCouponRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - couponId string +type apiDeleteAccountCollectionRequest struct { + ctx _context.Context + apiService *ManagementApiService + collectionId int32 } /* -DeleteCoupon Delete coupon -Delete the specified coupon. +DeleteAccountCollection Delete account-level collection +Delete a given account-level collection. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param 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. + - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. -@return apiDeleteCouponRequest +@return apiDeleteAccountCollectionRequest */ -func (a *ManagementApiService) DeleteCoupon(ctx _context.Context, applicationId int32, campaignId int32, couponId string) apiDeleteCouponRequest { - return apiDeleteCouponRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, - couponId: couponId, +func (a *ManagementApiService) DeleteAccountCollection(ctx _context.Context, collectionId int32) apiDeleteAccountCollectionRequest { + return apiDeleteAccountCollectionRequest{ + apiService: a, + ctx: ctx, + collectionId: collectionId, } } /* Execute executes the request */ -func (r apiDeleteCouponRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeleteAccountCollectionRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -2876,15 +3089,13 @@ func (r apiDeleteCouponRequest) Execute() (*_nethttp.Response, error) { localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCoupon") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteAccountCollection") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"couponId"+"}", _neturl.QueryEscape(parameterToString(r.couponId, "")), -1) + localVarPath := localBasePath + "/v1/collections/{collectionId}" + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -2900,7 +3111,7 @@ func (r apiDeleteCouponRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -2956,119 +3167,53 @@ func (r apiDeleteCouponRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarHTTPResponse, newErr } return localVarHTTPResponse, nil } -type apiDeleteCouponsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - value *string - createdBefore *time.Time - createdAfter *time.Time - startsAfter *time.Time - startsBefore *time.Time - expiresAfter *time.Time - expiresBefore *time.Time - valid *string - batchId *string - usable *string - referralId *int32 - recipientIntegrationId *string - exactMatch *bool -} - -func (r apiDeleteCouponsRequest) Value(value string) apiDeleteCouponsRequest { - r.value = &value - return r -} - -func (r apiDeleteCouponsRequest) CreatedBefore(createdBefore time.Time) apiDeleteCouponsRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiDeleteCouponsRequest) CreatedAfter(createdAfter time.Time) apiDeleteCouponsRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiDeleteCouponsRequest) StartsAfter(startsAfter time.Time) apiDeleteCouponsRequest { - r.startsAfter = &startsAfter - return r -} - -func (r apiDeleteCouponsRequest) StartsBefore(startsBefore time.Time) apiDeleteCouponsRequest { - r.startsBefore = &startsBefore - return r -} - -func (r apiDeleteCouponsRequest) ExpiresAfter(expiresAfter time.Time) apiDeleteCouponsRequest { - r.expiresAfter = &expiresAfter - return r -} - -func (r apiDeleteCouponsRequest) ExpiresBefore(expiresBefore time.Time) apiDeleteCouponsRequest { - r.expiresBefore = &expiresBefore - return r -} - -func (r apiDeleteCouponsRequest) Valid(valid string) apiDeleteCouponsRequest { - r.valid = &valid - return r -} - -func (r apiDeleteCouponsRequest) BatchId(batchId string) apiDeleteCouponsRequest { - r.batchId = &batchId - return r -} - -func (r apiDeleteCouponsRequest) Usable(usable string) apiDeleteCouponsRequest { - r.usable = &usable - return r -} - -func (r apiDeleteCouponsRequest) ReferralId(referralId int32) apiDeleteCouponsRequest { - r.referralId = &referralId - return r -} - -func (r apiDeleteCouponsRequest) RecipientIntegrationId(recipientIntegrationId string) apiDeleteCouponsRequest { - r.recipientIntegrationId = &recipientIntegrationId - return r -} - -func (r apiDeleteCouponsRequest) ExactMatch(exactMatch bool) apiDeleteCouponsRequest { - r.exactMatch = &exactMatch - return r +type apiDeleteAchievementRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + achievementId int32 } /* -DeleteCoupons Delete coupons -Deletes all the coupons matching the specified criteria. +DeleteAchievement Delete achievement +Delete the specified achievement. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param achievementId The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. -@return apiDeleteCouponsRequest +@return apiDeleteAchievementRequest */ -func (a *ManagementApiService) DeleteCoupons(ctx _context.Context, applicationId int32, campaignId int32) apiDeleteCouponsRequest { - return apiDeleteCouponsRequest{ +func (a *ManagementApiService) DeleteAchievement(ctx _context.Context, applicationId int32, campaignId int32, achievementId int32) apiDeleteAchievementRequest { + return apiDeleteAchievementRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, + achievementId: achievementId, } } /* Execute executes the request */ -func (r apiDeleteCouponsRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeleteAchievementRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -3077,69 +3222,31 @@ func (r apiDeleteCouponsRequest) Execute() (*_nethttp.Response, error) { localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCoupons") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteAchievement") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"achievementId"+"}", _neturl.QueryEscape(parameterToString(r.achievementId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.value != nil { - localVarQueryParams.Add("value", parameterToString(*r.value, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.startsAfter != nil { - localVarQueryParams.Add("startsAfter", parameterToString(*r.startsAfter, "")) - } - if r.startsBefore != nil { - localVarQueryParams.Add("startsBefore", parameterToString(*r.startsBefore, "")) - } - if r.expiresAfter != nil { - localVarQueryParams.Add("expiresAfter", parameterToString(*r.expiresAfter, "")) - } - if r.expiresBefore != nil { - localVarQueryParams.Add("expiresBefore", parameterToString(*r.expiresBefore, "")) - } - if r.valid != nil { - localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) - } - if r.batchId != nil { - localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) - } - if r.usable != nil { - localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) - } - if r.referralId != nil { - localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) - } - if r.recipientIntegrationId != nil { - localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) - } - if r.exactMatch != nil { - localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) - } - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -3195,41 +3302,60 @@ func (r apiDeleteCouponsRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarHTTPResponse, newErr } return localVarHTTPResponse, nil } -type apiDeleteLoyaltyCardRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyCardId string +type apiDeleteCampaignRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 } /* -DeleteLoyaltyCard Delete loyalty card -Delete the given loyalty card. +DeleteCampaign Delete campaign +Delete the given campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiDeleteLoyaltyCardRequest +@return apiDeleteCampaignRequest */ -func (a *ManagementApiService) DeleteLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiDeleteLoyaltyCardRequest { - return apiDeleteLoyaltyCardRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, +func (a *ManagementApiService) DeleteCampaign(ctx _context.Context, applicationId int32, campaignId int32) apiDeleteCampaignRequest { + return apiDeleteCampaignRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request */ -func (r apiDeleteLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeleteCampaignRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -3238,23 +3364,19 @@ func (r apiDeleteLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteLoyaltyCard") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCampaign") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return nil, reportError("loyaltyCardId must have less than 108 elements") - } - // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3265,7 +3387,7 @@ func (r apiDeleteLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -3321,63 +3443,44 @@ func (r apiDeleteLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } return localVarHTTPResponse, newErr } return localVarHTTPResponse, nil } -type apiDeleteReferralRequest struct { +type apiDeleteCollectionRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 campaignId int32 - referralId string + collectionId int32 } /* -DeleteReferral Delete referral -Delete the specified referral. +DeleteCollection Delete campaign-level collection +Delete a given campaign-level collection. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param referralId The ID of the referral code. + - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. -@return apiDeleteReferralRequest +@return apiDeleteCollectionRequest */ -func (a *ManagementApiService) DeleteReferral(ctx _context.Context, applicationId int32, campaignId int32, referralId string) apiDeleteReferralRequest { - return apiDeleteReferralRequest{ +func (a *ManagementApiService) DeleteCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiDeleteCollectionRequest { + return apiDeleteCollectionRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, - referralId: referralId, + collectionId: collectionId, } } /* Execute executes the request */ -func (r apiDeleteReferralRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeleteCollectionRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -3386,15 +3489,15 @@ func (r apiDeleteReferralRequest) Execute() (*_nethttp.Response, error) { localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteReferral") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCollection") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"referralId"+"}", _neturl.QueryEscape(parameterToString(r.referralId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -3410,7 +3513,7 @@ func (r apiDeleteReferralRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -3466,41 +3569,53 @@ func (r apiDeleteReferralRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } return localVarHTTPResponse, newErr } return localVarHTTPResponse, nil } -type apiDeleteStoreRequest struct { +type apiDeleteCouponRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - storeId string + campaignId int32 + couponId string } /* -DeleteStore Delete store -Delete the specified store. +DeleteCoupon Delete coupon +Delete the specified coupon. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param 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. -@return apiDeleteStoreRequest +@return apiDeleteCouponRequest */ -func (a *ManagementApiService) DeleteStore(ctx _context.Context, applicationId int32, storeId string) apiDeleteStoreRequest { - return apiDeleteStoreRequest{ +func (a *ManagementApiService) DeleteCoupon(ctx _context.Context, applicationId int32, campaignId int32, couponId string) apiDeleteCouponRequest { + return apiDeleteCouponRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - storeId: storeId, + campaignId: campaignId, + couponId: couponId, } } /* Execute executes the request */ -func (r apiDeleteStoreRequest) Execute() (*_nethttp.Response, error) { +func (r apiDeleteCouponRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} @@ -3509,14 +3624,15 @@ func (r apiDeleteStoreRequest) Execute() (*_nethttp.Response, error) { localVarFileBytes []byte ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteStore") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCoupon") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/stores/{storeId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"storeId"+"}", _neturl.QueryEscape(parameterToString(r.storeId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"couponId"+"}", _neturl.QueryEscape(parameterToString(r.couponId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -3532,7 +3648,7 @@ func (r apiDeleteStoreRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -3588,63 +3704,179 @@ func (r apiDeleteStoreRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - } return localVarHTTPResponse, newErr } return localVarHTTPResponse, nil } -type apiDestroySessionRequest struct { - ctx _context.Context - apiService *ManagementApiService +type apiDeleteCouponsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + value *string + createdBefore *time.Time + createdAfter *time.Time + startsAfter *time.Time + startsBefore *time.Time + expiresAfter *time.Time + expiresBefore *time.Time + valid *string + batchId *string + usable *string + referralId *int32 + recipientIntegrationId *string + exactMatch *bool } -/* -DestroySession Destroy session -Destroys the session. - - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). +func (r apiDeleteCouponsRequest) Value(value string) apiDeleteCouponsRequest { + r.value = &value + return r +} -@return apiDestroySessionRequest -*/ -func (a *ManagementApiService) DestroySession(ctx _context.Context) apiDestroySessionRequest { - return apiDestroySessionRequest{ - apiService: a, - ctx: ctx, - } +func (r apiDeleteCouponsRequest) CreatedBefore(createdBefore time.Time) apiDeleteCouponsRequest { + r.createdBefore = &createdBefore + return r } -/* -Execute executes the request -*/ -func (r apiDestroySessionRequest) Execute() (*_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodDelete - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - ) +func (r apiDeleteCouponsRequest) CreatedAfter(createdAfter time.Time) apiDeleteCouponsRequest { + r.createdAfter = &createdAfter + return r +} - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DestroySession") +func (r apiDeleteCouponsRequest) StartsAfter(startsAfter time.Time) apiDeleteCouponsRequest { + r.startsAfter = &startsAfter + return r +} + +func (r apiDeleteCouponsRequest) StartsBefore(startsBefore time.Time) apiDeleteCouponsRequest { + r.startsBefore = &startsBefore + return r +} + +func (r apiDeleteCouponsRequest) ExpiresAfter(expiresAfter time.Time) apiDeleteCouponsRequest { + r.expiresAfter = &expiresAfter + return r +} + +func (r apiDeleteCouponsRequest) ExpiresBefore(expiresBefore time.Time) apiDeleteCouponsRequest { + r.expiresBefore = &expiresBefore + return r +} + +func (r apiDeleteCouponsRequest) Valid(valid string) apiDeleteCouponsRequest { + r.valid = &valid + return r +} + +func (r apiDeleteCouponsRequest) BatchId(batchId string) apiDeleteCouponsRequest { + r.batchId = &batchId + return r +} + +func (r apiDeleteCouponsRequest) Usable(usable string) apiDeleteCouponsRequest { + r.usable = &usable + return r +} + +func (r apiDeleteCouponsRequest) ReferralId(referralId int32) apiDeleteCouponsRequest { + r.referralId = &referralId + return r +} + +func (r apiDeleteCouponsRequest) RecipientIntegrationId(recipientIntegrationId string) apiDeleteCouponsRequest { + r.recipientIntegrationId = &recipientIntegrationId + return r +} + +func (r apiDeleteCouponsRequest) ExactMatch(exactMatch bool) apiDeleteCouponsRequest { + r.exactMatch = &exactMatch + return r +} + +/* +DeleteCoupons Delete coupons +Deletes all the coupons matching the specified criteria. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + +@return apiDeleteCouponsRequest +*/ +func (a *ManagementApiService) DeleteCoupons(ctx _context.Context, applicationId int32, campaignId int32) apiDeleteCouponsRequest { + return apiDeleteCouponsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + } +} + +/* +Execute executes the request +*/ +func (r apiDeleteCouponsRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteCoupons") if err != nil { return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/sessions" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.startsAfter != nil { + localVarQueryParams.Add("startsAfter", parameterToString(*r.startsAfter, "")) + } + if r.startsBefore != nil { + localVarQueryParams.Add("startsBefore", parameterToString(*r.startsBefore, "")) + } + if r.expiresAfter != nil { + localVarQueryParams.Add("expiresAfter", parameterToString(*r.expiresAfter, "")) + } + if r.expiresBefore != nil { + localVarQueryParams.Add("expiresBefore", parameterToString(*r.expiresBefore, "")) + } + if r.valid != nil { + localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) + } + if r.batchId != nil { + localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) + } + if r.usable != nil { + localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) + } + if r.referralId != nil { + localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) + } + if r.recipientIntegrationId != nil { + localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) + } + if r.exactMatch != nil { + localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3717,58 +3949,60 @@ func (r apiDestroySessionRequest) Execute() (*_nethttp.Response, error) { return localVarHTTPResponse, nil } -type apiExportAccountCollectionItemsRequest struct { - ctx _context.Context - apiService *ManagementApiService - collectionId int32 +type apiDeleteLoyaltyCardRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string } /* -ExportAccountCollectionItems Export account-level collection's items -Download a CSV file containing items from a given account-level collection. - -**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - +DeleteLoyaltyCard Delete loyalty card +Delete the given loyalty card. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + - @param 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. + - @param 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. -@return apiExportAccountCollectionItemsRequest +@return apiDeleteLoyaltyCardRequest */ -func (a *ManagementApiService) ExportAccountCollectionItems(ctx _context.Context, collectionId int32) apiExportAccountCollectionItemsRequest { - return apiExportAccountCollectionItemsRequest{ - apiService: a, - ctx: ctx, - collectionId: collectionId, +func (a *ManagementApiService) DeleteLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiDeleteLoyaltyCardRequest { + return apiDeleteLoyaltyCardRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - - @return string */ -func (r apiExportAccountCollectionItemsRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiDeleteLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportAccountCollectionItems") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteLoyaltyCard") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections/{collectionId}/export" - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if strlen(r.loyaltyCardId) > 108 { + return nil, reportError("loyaltyCardId must have less than 108 elements") + } + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -3779,7 +4013,7 @@ func (r apiExportAccountCollectionItemsRequest) Execute() (string, *_nethttp.Res } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -3816,18 +4050,18 @@ func (r apiExportAccountCollectionItemsRequest) Execute() (string, *_nethttp.Res } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -3835,105 +4069,80 @@ func (r apiExportAccountCollectionItemsRequest) Execute() (string, *_nethttp.Res body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v string - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 401 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type apiExportCollectionItemsRequest struct { +type apiDeleteReferralRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 campaignId int32 - collectionId int32 + referralId string } /* -ExportCollectionItems Export campaign-level collection's items -Download a CSV file containing items from a given campaign-level collection. - -**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - +DeleteReferral Delete referral +Delete the specified referral. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. + - @param referralId The ID of the referral code. -@return apiExportCollectionItemsRequest +@return apiDeleteReferralRequest */ -func (a *ManagementApiService) ExportCollectionItems(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiExportCollectionItemsRequest { - return apiExportCollectionItemsRequest{ +func (a *ManagementApiService) DeleteReferral(ctx _context.Context, applicationId int32, campaignId int32, referralId string) apiDeleteReferralRequest { + return apiDeleteReferralRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, - collectionId: collectionId, + referralId: referralId, } } /* Execute executes the request - - @return string */ -func (r apiExportCollectionItemsRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiDeleteReferralRequest) Execute() (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodDelete localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCollectionItems") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteReferral") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"referralId"+"}", _neturl.QueryEscape(parameterToString(r.referralId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -3949,7 +4158,3181 @@ func (r apiExportCollectionItemsRequest) Execute() (string, *_nethttp.Response, } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type apiDeleteStoreRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + storeId string +} + +/* +DeleteStore Delete store +Delete the specified store. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. + +@return apiDeleteStoreRequest +*/ +func (a *ManagementApiService) DeleteStore(ctx _context.Context, applicationId int32, storeId string) apiDeleteStoreRequest { + return apiDeleteStoreRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + storeId: storeId, + } +} + +/* +Execute executes the request +*/ +func (r apiDeleteStoreRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteStore") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/stores/{storeId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"storeId"+"}", _neturl.QueryEscape(parameterToString(r.storeId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type apiDeleteUserRequest struct { + ctx _context.Context + apiService *ManagementApiService + userId int32 +} + +/* +DeleteUser Delete user +Delete a specific user. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param userId The ID of the user. + +@return apiDeleteUserRequest +*/ +func (a *ManagementApiService) DeleteUser(ctx _context.Context, userId int32) apiDeleteUserRequest { + return apiDeleteUserRequest{ + apiService: a, + ctx: ctx, + userId: userId, + } +} + +/* +Execute executes the request +*/ +func (r apiDeleteUserRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteUser") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.QueryEscape(parameterToString(r.userId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type apiDeleteUserByEmailRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *DeleteUserRequest +} + +func (r apiDeleteUserByEmailRequest) Body(body DeleteUserRequest) apiDeleteUserByEmailRequest { + r.body = &body + return r +} + +/* +DeleteUserByEmail Delete user by email address +Delete a specific user by their email address. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return apiDeleteUserByEmailRequest +*/ +func (a *ManagementApiService) DeleteUserByEmail(ctx _context.Context) apiDeleteUserByEmailRequest { + return apiDeleteUserByEmailRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request +*/ +func (r apiDeleteUserByEmailRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DeleteUserByEmail") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/users/delete" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type apiDestroySessionRequest struct { + ctx _context.Context + apiService *ManagementApiService +} + +/* +DestroySession Destroy session +Destroys the session. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return apiDestroySessionRequest +*/ +func (a *ManagementApiService) DestroySession(ctx _context.Context) apiDestroySessionRequest { + return apiDestroySessionRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request +*/ +func (r apiDestroySessionRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodDelete + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.DestroySession") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/sessions" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + +type apiExportAccountCollectionItemsRequest struct { + ctx _context.Context + apiService *ManagementApiService + collectionId int32 +} + +/* +ExportAccountCollectionItems Export account-level collection's items +Download a CSV file containing items from a given account-level collection. + +**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + +@return apiExportAccountCollectionItemsRequest +*/ +func (a *ManagementApiService) ExportAccountCollectionItems(ctx _context.Context, collectionId int32) apiExportAccountCollectionItemsRequest { + return apiExportAccountCollectionItemsRequest{ + apiService: a, + ctx: ctx, + collectionId: collectionId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportAccountCollectionItemsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportAccountCollectionItems") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/collections/{collectionId}/export" + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportAchievementsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + achievementId int32 +} + +/* +ExportAchievements Export achievement customer data +Download a CSV file containing a list of all the customers who have participated in and are currently participating in the given achievement. + +The CSV file contains the following columns: +- `profileIntegrationID`: The integration ID of the customer profile participating in the achievement. +- `title`: The display name of the achievement in the Campaign Manager. +- `target`: The required number of actions or the transactional milestone to complete the achievement. +- `progress`: The current progress of the customer in the achievement. +- `status`: The status of the achievement. Can be one of: ['inprogress', 'completed', 'expired']. +- `startDate`: The date on which the customer profile started the achievement in RFC3339. +- `endDate`: The date on which the achievement ends and resets for the customer profile in RFC3339. +- `completionDate`: The date on which the customer profile completed the achievement in RFC3339. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param achievementId The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. + +@return apiExportAchievementsRequest +*/ +func (a *ManagementApiService) ExportAchievements(ctx _context.Context, applicationId int32, campaignId int32, achievementId int32) apiExportAchievementsRequest { + return apiExportAchievementsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + achievementId: achievementId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportAchievementsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportAchievements") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"achievementId"+"}", _neturl.QueryEscape(parameterToString(r.achievementId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportAudiencesMembershipsRequest struct { + ctx _context.Context + apiService *ManagementApiService + audienceId int32 +} + +/* +ExportAudiencesMemberships Export audience members +Download a CSV file containing the integration IDs of the members of an audience. + +**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 file contains the following column: +- `profileintegrationid`: The integration ID of the customer profile. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param audienceId The ID of the audience. + +@return apiExportAudiencesMembershipsRequest +*/ +func (a *ManagementApiService) ExportAudiencesMemberships(ctx _context.Context, audienceId int32) apiExportAudiencesMembershipsRequest { + return apiExportAudiencesMembershipsRequest{ + apiService: a, + ctx: ctx, + audienceId: audienceId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportAudiencesMembershipsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportAudiencesMemberships") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/audiences/{audienceId}/memberships/export" + localVarPath = strings.Replace(localVarPath, "{"+"audienceId"+"}", _neturl.QueryEscape(parameterToString(r.audienceId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportCollectionItemsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + collectionId int32 +} + +/* +ExportCollectionItems Export campaign-level collection's items +Download a CSV file containing items from a given campaign-level collection. + +**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. + +@return apiExportCollectionItemsRequest +*/ +func (a *ManagementApiService) ExportCollectionItems(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiExportCollectionItemsRequest { + return apiExportCollectionItemsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + collectionId: collectionId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportCollectionItemsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCollectionItems") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportCouponsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId *float32 + sort *string + value *string + createdBefore *time.Time + createdAfter *time.Time + valid *string + usable *string + referralId *int32 + recipientIntegrationId *string + batchId *string + exactMatch *bool + dateFormat *string + campaignState *string + valuesOnly *bool +} + +func (r apiExportCouponsRequest) CampaignId(campaignId float32) apiExportCouponsRequest { + r.campaignId = &campaignId + return r +} + +func (r apiExportCouponsRequest) Sort(sort string) apiExportCouponsRequest { + r.sort = &sort + return r +} + +func (r apiExportCouponsRequest) Value(value string) apiExportCouponsRequest { + r.value = &value + return r +} + +func (r apiExportCouponsRequest) CreatedBefore(createdBefore time.Time) apiExportCouponsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiExportCouponsRequest) CreatedAfter(createdAfter time.Time) apiExportCouponsRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiExportCouponsRequest) Valid(valid string) apiExportCouponsRequest { + r.valid = &valid + return r +} + +func (r apiExportCouponsRequest) Usable(usable string) apiExportCouponsRequest { + r.usable = &usable + return r +} + +func (r apiExportCouponsRequest) ReferralId(referralId int32) apiExportCouponsRequest { + r.referralId = &referralId + return r +} + +func (r apiExportCouponsRequest) RecipientIntegrationId(recipientIntegrationId string) apiExportCouponsRequest { + r.recipientIntegrationId = &recipientIntegrationId + return r +} + +func (r apiExportCouponsRequest) BatchId(batchId string) apiExportCouponsRequest { + r.batchId = &batchId + return r +} + +func (r apiExportCouponsRequest) ExactMatch(exactMatch bool) apiExportCouponsRequest { + r.exactMatch = &exactMatch + return r +} + +func (r apiExportCouponsRequest) DateFormat(dateFormat string) apiExportCouponsRequest { + r.dateFormat = &dateFormat + return r +} + +func (r apiExportCouponsRequest) CampaignState(campaignState string) apiExportCouponsRequest { + r.campaignState = &campaignState + return r +} + +func (r apiExportCouponsRequest) ValuesOnly(valuesOnly bool) apiExportCouponsRequest { + r.valuesOnly = &valuesOnly + return r +} + +/* +ExportCoupons Export coupons +Download a CSV file containing the coupons that match the given properties. + +**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + +The CSV file can contain the following columns: + + - `accountid`: The ID of your deployment. + + - `applicationid`: The ID of the Application this coupon is related to. + + - `attributes`: A json object describing _custom_ referral attribute names and their values. + + - `batchid`: The ID of the batch this coupon is part of. + + - `campaignid`: The ID of the campaign this coupon is related to. + + - `counter`: The number of times this coupon has been redeemed. + + - `created`: The creation date of the coupon code. + + - `deleted`: Whether the coupon code is deleted. + + - `deleted_changelogid`: The ID of the delete event in the logs. + + - `discount_counter`: The amount of discount given by this coupon. + + - `discount_limitval`: The maximum discount amount that can be given be this coupon. + + - `expirydate`: The end date in RFC3339 of the code redemption period. + + - `id`: The internal ID of the coupon code. + + - `importid`: The ID of the import job that created this coupon. + + - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. + + - `limits`: The limits set on this coupon. + + - `limitval`: The maximum number of redemptions of this code. + + - `recipientintegrationid`: The integration ID of the customer considered as recipient of the coupon. + Only the customer with this integration ID can redeem the corresponding coupon code. + Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). + + - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). + + - `reservation`: Whether the coupon is reserved. + + - `reservation_counter`: How many times this coupon has been reserved. + + - `reservation_limitval`: The maximum of number of reservations this coupon can have. + + - `startdate`: The start date in RFC3339 of the code redemption period. + + - `value`: The coupon code. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + +@return apiExportCouponsRequest +*/ +func (a *ManagementApiService) ExportCoupons(ctx _context.Context, applicationId int32) apiExportCouponsRequest { + return apiExportCouponsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportCouponsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCoupons") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/export_coupons" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.campaignId != nil { + localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.valid != nil { + localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) + } + if r.usable != nil { + localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) + } + if r.referralId != nil { + localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) + } + if r.recipientIntegrationId != nil { + localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) + } + if r.batchId != nil { + localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) + } + if r.exactMatch != nil { + localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) + } + if r.dateFormat != nil { + localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + } + if r.campaignState != nil { + localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) + } + if r.valuesOnly != nil { + localVarQueryParams.Add("valuesOnly", parameterToString(*r.valuesOnly, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportCustomerSessionsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + createdBefore *time.Time + createdAfter *time.Time + profileIntegrationId *string + dateFormat *string + customerSessionState *string +} + +func (r apiExportCustomerSessionsRequest) CreatedBefore(createdBefore time.Time) apiExportCustomerSessionsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiExportCustomerSessionsRequest) CreatedAfter(createdAfter time.Time) apiExportCustomerSessionsRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiExportCustomerSessionsRequest) ProfileIntegrationId(profileIntegrationId string) apiExportCustomerSessionsRequest { + r.profileIntegrationId = &profileIntegrationId + return r +} + +func (r apiExportCustomerSessionsRequest) DateFormat(dateFormat string) apiExportCustomerSessionsRequest { + r.dateFormat = &dateFormat + return r +} + +func (r apiExportCustomerSessionsRequest) CustomerSessionState(customerSessionState string) apiExportCustomerSessionsRequest { + r.customerSessionState = &customerSessionState + return r +} + +/* +ExportCustomerSessions Export customer sessions +Download a CSV file containing the customer sessions that match the request. + +**Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). + +**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + +- `id`: The internal ID of the session. +- `firstsession`: Whether this is a first session. +- `integrationid`: The integration ID of the session. +- `applicationid`: The ID of the Application. +- `profileid`: The internal ID of the customer profile. +- `profileintegrationid`: The integration ID of the customer profile. +- `created`: The timestamp when the session was created. +- `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session. +- `cartitems`: The cart items in the session. +- `discounts`: The discounts in the session. +- `total`: The total value of cart items and additional costs in the session, before any discounts are applied. +- `attributes`: The attributes set in the session. +- `closedat`: Timestamp when the session was closed. +- `cancelledat`: Timestamp when the session was cancelled. +- `referral`: The referral code in the session. +- `identifiers`: The identifiers in the session. +- `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. +- `updated`: Timestamp of the last session update. +- `store_integration_id`: The integration ID of the store. +- `coupons`: Coupon codes in the session. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + +@return apiExportCustomerSessionsRequest +*/ +func (a *ManagementApiService) ExportCustomerSessions(ctx _context.Context, applicationId int32) apiExportCustomerSessionsRequest { + return apiExportCustomerSessionsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportCustomerSessionsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCustomerSessions") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/export_customer_sessions" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.profileIntegrationId != nil { + localVarQueryParams.Add("profileIntegrationId", parameterToString(*r.profileIntegrationId, "")) + } + if r.dateFormat != nil { + localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + } + if r.customerSessionState != nil { + localVarQueryParams.Add("customerSessionState", parameterToString(*r.customerSessionState, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportCustomersTiersRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId string + subledgerIds *[]string + tierNames *[]string +} + +func (r apiExportCustomersTiersRequest) SubledgerIds(subledgerIds []string) apiExportCustomersTiersRequest { + r.subledgerIds = &subledgerIds + return r +} + +func (r apiExportCustomersTiersRequest) TierNames(tierNames []string) apiExportCustomersTiersRequest { + r.tierNames = &tierNames + return r +} + +/* +ExportCustomersTiers Export customers' tier data +Download a CSV file containing the tier information for customers of the specified loyalty program. + +The generated file contains the following columns: + +- `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. +- `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. +- `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. +- `tiername`: The name of the tier. +- `startdate`: The tier start date in RFC3339. +- `expirydate`: The tier expiry date in RFC3339. + +You can filter the results by providing the following optional input parameters: + +- `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. +- `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param loyaltyProgramId The identifier for the loyalty program. + +@return apiExportCustomersTiersRequest +*/ +func (a *ManagementApiService) ExportCustomersTiers(ctx _context.Context, loyaltyProgramId string) apiExportCustomersTiersRequest { + return apiExportCustomersTiersRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportCustomersTiersRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCustomersTiers") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.subledgerIds != nil { + localVarQueryParams.Add("subledgerIds", parameterToString(*r.subledgerIds, "csv")) + } + if r.tierNames != nil { + localVarQueryParams.Add("tierNames", parameterToString(*r.tierNames, "csv")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportEffectsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId *float32 + createdBefore *time.Time + createdAfter *time.Time + dateFormat *string +} + +func (r apiExportEffectsRequest) CampaignId(campaignId float32) apiExportEffectsRequest { + r.campaignId = &campaignId + return r +} + +func (r apiExportEffectsRequest) CreatedBefore(createdBefore time.Time) apiExportEffectsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiExportEffectsRequest) CreatedAfter(createdAfter time.Time) apiExportEffectsRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiExportEffectsRequest) DateFormat(dateFormat string) apiExportEffectsRequest { + r.dateFormat = &dateFormat + return r +} + +/* +ExportEffects Export triggered effects +Download a CSV file containing the triggered effects that match the given attributes. + +**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + +The generated file can contain the following columns: + +- `applicationid`: The ID of the Application. +- `campaignid`: The ID of the campaign. +- `couponid`: The ID of the coupon, when applicable to the effect. +- `created`: The timestamp of the effect. +- `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/entities/events). +- `eventid`: The internal ID of the effect. +- `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). +- `profileintegrationid`: The ID of the customer profile, when applicable. +- `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. +- `ruleindex`: The index of the rule. +- `rulesetid`: The ID of the rule set. +- `sessionid`: The internal ID of the session that triggered the effect. +- `profileid`: The internal ID of the customer profile. +- `sessionintegrationid`: The integration ID of the session. +- `total_revenue`: The total revenue. +- `store_integration_id`: The integration ID of the store. You choose this ID when you create a store. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + +@return apiExportEffectsRequest +*/ +func (a *ManagementApiService) ExportEffects(ctx _context.Context, applicationId int32) apiExportEffectsRequest { + return apiExportEffectsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportEffectsRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportEffects") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/export_effects" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.campaignId != nil { + localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.dateFormat != nil { + localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportLoyaltyBalanceRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId string + endDate *time.Time +} + +func (r apiExportLoyaltyBalanceRequest) EndDate(endDate time.Time) apiExportLoyaltyBalanceRequest { + r.endDate = &endDate + return r +} + +/* +ExportLoyaltyBalance Export customer loyalty balance to CSV +⚠️ 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/). + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param loyaltyProgramId The identifier for the loyalty program. + +@return apiExportLoyaltyBalanceRequest +*/ +func (a *ManagementApiService) ExportLoyaltyBalance(ctx _context.Context, loyaltyProgramId string) apiExportLoyaltyBalanceRequest { + return apiExportLoyaltyBalanceRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportLoyaltyBalanceRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyBalance") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.endDate != nil { + localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportLoyaltyBalancesRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId string + endDate *time.Time +} + +func (r apiExportLoyaltyBalancesRequest) EndDate(endDate time.Time) apiExportLoyaltyBalancesRequest { + r.endDate = &endDate + return r +} + +/* +ExportLoyaltyBalances Export customer loyalty balances +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. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param loyaltyProgramId The identifier for the loyalty program. + +@return apiExportLoyaltyBalancesRequest +*/ +func (a *ManagementApiService) ExportLoyaltyBalances(ctx _context.Context, loyaltyProgramId string) apiExportLoyaltyBalancesRequest { + return apiExportLoyaltyBalancesRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyBalances") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.endDate != nil { + localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportLoyaltyCardBalancesRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + endDate *time.Time +} + +func (r apiExportLoyaltyCardBalancesRequest) EndDate(endDate time.Time) apiExportLoyaltyCardBalancesRequest { + r.endDate = &endDate + return r +} + +/* +ExportLoyaltyCardBalances Export all card transaction logs +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. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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. + +@return apiExportLoyaltyCardBalancesRequest +*/ +func (a *ManagementApiService) ExportLoyaltyCardBalances(ctx _context.Context, loyaltyProgramId int32) apiExportLoyaltyCardBalancesRequest { + return apiExportLoyaltyCardBalancesRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportLoyaltyCardBalancesRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyCardBalances") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.endDate != nil { + localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportLoyaltyCardLedgerRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string + rangeStart *time.Time + rangeEnd *time.Time + dateFormat *string +} + +func (r apiExportLoyaltyCardLedgerRequest) RangeStart(rangeStart time.Time) apiExportLoyaltyCardLedgerRequest { + r.rangeStart = &rangeStart + return r +} + +func (r apiExportLoyaltyCardLedgerRequest) RangeEnd(rangeEnd time.Time) apiExportLoyaltyCardLedgerRequest { + r.rangeEnd = &rangeEnd + return r +} + +func (r apiExportLoyaltyCardLedgerRequest) DateFormat(dateFormat string) apiExportLoyaltyCardLedgerRequest { + r.dateFormat = &dateFormat + return r +} + +/* +ExportLoyaltyCardLedger Export card's ledger log +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/). + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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. + - @param 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. + +@return apiExportLoyaltyCardLedgerRequest +*/ +func (a *ManagementApiService) ExportLoyaltyCardLedger(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiExportLoyaltyCardLedgerRequest { + return apiExportLoyaltyCardLedgerRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportLoyaltyCardLedgerRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyCardLedger") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if strlen(r.loyaltyCardId) > 108 { + return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") + } + + if r.rangeStart == nil { + return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + } + + if r.rangeEnd == nil { + return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + } + + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) + if r.dateFormat != nil { + localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportLoyaltyLedgerRequest struct { + ctx _context.Context + apiService *ManagementApiService + rangeStart *time.Time + rangeEnd *time.Time + loyaltyProgramId string + integrationId string + dateFormat *string +} + +func (r apiExportLoyaltyLedgerRequest) RangeStart(rangeStart time.Time) apiExportLoyaltyLedgerRequest { + r.rangeStart = &rangeStart + return r +} + +func (r apiExportLoyaltyLedgerRequest) RangeEnd(rangeEnd time.Time) apiExportLoyaltyLedgerRequest { + r.rangeEnd = &rangeEnd + return r +} + +func (r apiExportLoyaltyLedgerRequest) DateFormat(dateFormat string) apiExportLoyaltyLedgerRequest { + r.dateFormat = &dateFormat + return r +} + +/* +ExportLoyaltyLedger Export customer's transaction logs +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. +- `campaignid`: The ID of the campaign. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param loyaltyProgramId The identifier for the loyalty program. + - @param integrationId The identifier of the profile. + +@return apiExportLoyaltyLedgerRequest +*/ +func (a *ManagementApiService) ExportLoyaltyLedger(ctx _context.Context, loyaltyProgramId string, integrationId string) apiExportLoyaltyLedgerRequest { + return apiExportLoyaltyLedgerRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + integrationId: integrationId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportLoyaltyLedgerRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyLedger") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.rangeStart == nil { + return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + } + + if r.rangeEnd == nil { + return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + } + + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) + if r.dateFormat != nil { + localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v string + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiExportPoolGiveawaysRequest struct { + ctx _context.Context + apiService *ManagementApiService + poolId int32 + createdBefore *time.Time + createdAfter *time.Time +} + +func (r apiExportPoolGiveawaysRequest) CreatedBefore(createdBefore time.Time) apiExportPoolGiveawaysRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiExportPoolGiveawaysRequest) CreatedAfter(createdAfter time.Time) apiExportPoolGiveawaysRequest { + r.createdAfter = &createdAfter + return r +} + +/* +ExportPoolGiveaways Export giveaway codes of a giveaway pool +Download a CSV file containing the giveaway codes of a specific giveaway pool. + +**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). + +The CSV file contains the following columns: + +- `id`: The internal ID of the giveaway. +- `poolid`: The internal ID of the giveaway pool. +- `code`: The giveaway code. +- `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). +- `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). +- `attributes`: Any custom attributes associated with the giveaway code (can be empty). +- `used`: An indication of whether the giveaway is already awarded. +- `importid`: The ID of the import which created the giveaway. +- `created`: The creation time of the giveaway code. +- `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. +- `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + +@return apiExportPoolGiveawaysRequest +*/ +func (a *ManagementApiService) ExportPoolGiveaways(ctx _context.Context, poolId int32) apiExportPoolGiveawaysRequest { + return apiExportPoolGiveawaysRequest{ + apiService: a, + ctx: ctx, + poolId: poolId, + } +} + +/* +Execute executes the request + + @return string +*/ +func (r apiExportPoolGiveawaysRequest) Execute() (string, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue string + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportPoolGiveaways") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/giveaways/pools/{poolId}/export" + localVarPath = strings.Replace(localVarPath, "{"+"poolId"+"}", _neturl.QueryEscape(parameterToString(r.poolId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/csv"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -4015,17 +7398,7 @@ func (r apiExportCollectionItemsRequest) Execute() (string, *_nethttp.Response, newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { + if localVarHTTPResponse.StatusCode == 400 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -4049,162 +7422,76 @@ func (r apiExportCollectionItemsRequest) Execute() (string, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportCouponsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId *float32 - sort *string - value *string - createdBefore *time.Time - createdAfter *time.Time - valid *string - usable *string - referralId *int32 - recipientIntegrationId *string - batchId *string - exactMatch *bool - dateFormat *string - campaignState *string - valuesOnly *bool +type apiExportReferralsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId *float32 + createdBefore *time.Time + createdAfter *time.Time + valid *string + usable *string + batchId *string + dateFormat *string } -func (r apiExportCouponsRequest) CampaignId(campaignId float32) apiExportCouponsRequest { +func (r apiExportReferralsRequest) CampaignId(campaignId float32) apiExportReferralsRequest { r.campaignId = &campaignId return r } -func (r apiExportCouponsRequest) Sort(sort string) apiExportCouponsRequest { - r.sort = &sort - return r -} - -func (r apiExportCouponsRequest) Value(value string) apiExportCouponsRequest { - r.value = &value - return r -} - -func (r apiExportCouponsRequest) CreatedBefore(createdBefore time.Time) apiExportCouponsRequest { +func (r apiExportReferralsRequest) CreatedBefore(createdBefore time.Time) apiExportReferralsRequest { r.createdBefore = &createdBefore return r } -func (r apiExportCouponsRequest) CreatedAfter(createdAfter time.Time) apiExportCouponsRequest { +func (r apiExportReferralsRequest) CreatedAfter(createdAfter time.Time) apiExportReferralsRequest { r.createdAfter = &createdAfter return r } -func (r apiExportCouponsRequest) Valid(valid string) apiExportCouponsRequest { +func (r apiExportReferralsRequest) Valid(valid string) apiExportReferralsRequest { r.valid = &valid return r } -func (r apiExportCouponsRequest) Usable(usable string) apiExportCouponsRequest { +func (r apiExportReferralsRequest) Usable(usable string) apiExportReferralsRequest { r.usable = &usable return r } -func (r apiExportCouponsRequest) ReferralId(referralId int32) apiExportCouponsRequest { - r.referralId = &referralId - return r -} - -func (r apiExportCouponsRequest) RecipientIntegrationId(recipientIntegrationId string) apiExportCouponsRequest { - r.recipientIntegrationId = &recipientIntegrationId - return r -} - -func (r apiExportCouponsRequest) BatchId(batchId string) apiExportCouponsRequest { +func (r apiExportReferralsRequest) BatchId(batchId string) apiExportReferralsRequest { r.batchId = &batchId return r } -func (r apiExportCouponsRequest) ExactMatch(exactMatch bool) apiExportCouponsRequest { - r.exactMatch = &exactMatch - return r -} - -func (r apiExportCouponsRequest) DateFormat(dateFormat string) apiExportCouponsRequest { +func (r apiExportReferralsRequest) DateFormat(dateFormat string) apiExportReferralsRequest { r.dateFormat = &dateFormat return r } -func (r apiExportCouponsRequest) CampaignState(campaignState string) apiExportCouponsRequest { - r.campaignState = &campaignState - return r -} - -func (r apiExportCouponsRequest) ValuesOnly(valuesOnly bool) apiExportCouponsRequest { - r.valuesOnly = &valuesOnly - return r -} - -/* -ExportCoupons Export coupons -Download a CSV file containing the coupons that match the given properties. - -**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - -The CSV file can contain the following columns: - - - `accountid`: The ID of your deployment. - - - `applicationid`: The ID of the Application this coupon is related to. - - - `attributes`: A json object describing _custom_ referral attribute names and their values. - - - `batchid`: The ID of the batch this coupon is part of. - - - `campaignid`: The ID of the campaign this coupon is related to. - - - `counter`: The number of times this coupon has been redeemed. - - - `created`: The creation date of the coupon code. - - - `deleted`: Whether the coupon code is deleted. - - - `deleted_changelogid`: The ID of the delete event in the logs. - - - `discount_counter`: The amount of discount given by this coupon. - - - `discount_limitval`: The maximum discount amount that can be given be this coupon. - - - `expirydate`: The end date in RFC3339 of the code redemption period. - - - `id`: The internal ID of the coupon code. - - - `importid`: The ID of the import job that created this coupon. - - - `is_reservation_mandatory`: Whether this coupon requires a reservation to be redeemed. - - - `limits`: The limits set on this coupon. - - - `limitval`: The maximum number of redemptions of this code. - - - `recipientintegrationid`: The integration ID of the customer considered as recipient of the coupon. - Only the customer with this integration ID can redeem the corresponding coupon code. - Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - - - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - - - `reservation`: Whether the coupon is reserved. - - - `reservation_counter`: How many times this coupon has been reserved. +/* +ExportReferrals Export referrals +Download a CSV file containing the referrals that match the given parameters. - - `reservation_limitval`: The maximum of number of reservations this coupon can have. +**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/). - - `startdate`: The start date in RFC3339 of the code redemption period. +The CSV file contains the following columns: - - `value`: The coupon code. +- `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. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiExportCouponsRequest +@return apiExportReferralsRequest */ -func (a *ManagementApiService) ExportCoupons(ctx _context.Context, applicationId int32) apiExportCouponsRequest { - return apiExportCouponsRequest{ +func (a *ManagementApiService) ExportReferrals(ctx _context.Context, applicationId int32) apiExportReferralsRequest { + return apiExportReferralsRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -4216,7 +7503,7 @@ Execute executes the request @return string */ -func (r apiExportCouponsRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiExportReferralsRequest) Execute() (string, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} @@ -4226,12 +7513,12 @@ func (r apiExportCouponsRequest) Execute() (string, *_nethttp.Response, error) { localVarReturnValue string ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCoupons") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportReferrals") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/export_coupons" + localVarPath := localBasePath + "/v1/applications/{applicationId}/export_referrals" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -4241,12 +7528,6 @@ func (r apiExportCouponsRequest) Execute() (string, *_nethttp.Response, error) { if r.campaignId != nil { localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.value != nil { - localVarQueryParams.Add("value", parameterToString(*r.value, "")) - } if r.createdBefore != nil { localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) } @@ -4259,27 +7540,12 @@ func (r apiExportCouponsRequest) Execute() (string, *_nethttp.Response, error) { if r.usable != nil { localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) } - if r.referralId != nil { - localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) - } - if r.recipientIntegrationId != nil { - localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) - } if r.batchId != nil { localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) } - if r.exactMatch != nil { - localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) - } if r.dateFormat != nil { localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) } - if r.campaignState != nil { - localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) - } - if r.valuesOnly != nil { - localVarQueryParams.Add("valuesOnly", parameterToString(*r.valuesOnly, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4370,78 +7636,71 @@ func (r apiExportCouponsRequest) Execute() (string, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportCustomerSessionsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - createdBefore *time.Time - createdAfter *time.Time - profileIntegrationId *string - dateFormat *string - customerSessionState *string +type apiGetAccessLogsWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + rangeStart *time.Time + rangeEnd *time.Time + path *string + method *string + status *string + pageSize *int32 + skip *int32 + sort *string } -func (r apiExportCustomerSessionsRequest) CreatedBefore(createdBefore time.Time) apiExportCustomerSessionsRequest { - r.createdBefore = &createdBefore +func (r apiGetAccessLogsWithoutTotalCountRequest) RangeStart(rangeStart time.Time) apiGetAccessLogsWithoutTotalCountRequest { + r.rangeStart = &rangeStart return r } -func (r apiExportCustomerSessionsRequest) CreatedAfter(createdAfter time.Time) apiExportCustomerSessionsRequest { - r.createdAfter = &createdAfter +func (r apiGetAccessLogsWithoutTotalCountRequest) RangeEnd(rangeEnd time.Time) apiGetAccessLogsWithoutTotalCountRequest { + r.rangeEnd = &rangeEnd return r } -func (r apiExportCustomerSessionsRequest) ProfileIntegrationId(profileIntegrationId string) apiExportCustomerSessionsRequest { - r.profileIntegrationId = &profileIntegrationId +func (r apiGetAccessLogsWithoutTotalCountRequest) Path(path string) apiGetAccessLogsWithoutTotalCountRequest { + r.path = &path return r } -func (r apiExportCustomerSessionsRequest) DateFormat(dateFormat string) apiExportCustomerSessionsRequest { - r.dateFormat = &dateFormat +func (r apiGetAccessLogsWithoutTotalCountRequest) Method(method string) apiGetAccessLogsWithoutTotalCountRequest { + r.method = &method return r } -func (r apiExportCustomerSessionsRequest) CustomerSessionState(customerSessionState string) apiExportCustomerSessionsRequest { - r.customerSessionState = &customerSessionState +func (r apiGetAccessLogsWithoutTotalCountRequest) Status(status string) apiGetAccessLogsWithoutTotalCountRequest { + r.status = &status return r } -/* -ExportCustomerSessions Export customer sessions -Download a CSV file containing the customer sessions that match the request. +func (r apiGetAccessLogsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetAccessLogsWithoutTotalCountRequest { + r.pageSize = &pageSize + return r +} -**Important:** Archived sessions cannot be exported. See the [retention policy](https://docs.talon.one/docs/product/server-infrastructure-and-data-retention#data-retention-policy). +func (r apiGetAccessLogsWithoutTotalCountRequest) Skip(skip int32) apiGetAccessLogsWithoutTotalCountRequest { + r.skip = &skip + return r +} -**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/). +func (r apiGetAccessLogsWithoutTotalCountRequest) Sort(sort string) apiGetAccessLogsWithoutTotalCountRequest { + r.sort = &sort + return r +} -- `id`: The internal ID of the session. -- `firstsession`: Whether this is a first session. -- `integrationid`: The integration ID of the session. -- `applicationid`: The ID of the Application. -- `profileid`: The internal ID of the customer profile. -- `profileintegrationid`: The integration ID of the customer profile. -- `created`: The timestamp when the session was created. -- `state`: The [state](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions#customer-session-states) of the session. -- `cartitems`: The cart items in the session. -- `discounts`: The discounts in the session. -- `total`: The total value of cart items and additional costs in the session, before any discounts are applied. -- `attributes`: The attributes set in the session. -- `closedat`: Timestamp when the session was closed. -- `cancelledat`: Timestamp when the session was cancelled. -- `referral`: The referral code in the session. -- `identifiers`: The identifiers in the session. -- `additional_costs`: The [additional costs](https://docs.talon.one/docs/product/account/dev-tools/managing-additional-costs) in the session. -- `updated`: Timestamp of the last session update. -- `store_integration_id`: The integration ID of the store. -- `coupons`: Coupon codes in the session. +/* +GetAccessLogsWithoutTotalCount Get access logs for Application +Retrieve the list of API calls sent to the specified Application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiExportCustomerSessionsRequest +@return apiGetAccessLogsWithoutTotalCountRequest */ -func (a *ManagementApiService) ExportCustomerSessions(ctx _context.Context, applicationId int32) apiExportCustomerSessionsRequest { - return apiExportCustomerSessionsRequest{ +func (a *ManagementApiService) GetAccessLogsWithoutTotalCount(ctx _context.Context, applicationId int32) apiGetAccessLogsWithoutTotalCountRequest { + return apiGetAccessLogsWithoutTotalCountRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -4451,44 +7710,57 @@ func (a *ManagementApiService) ExportCustomerSessions(ctx _context.Context, appl /* Execute executes the request - @return string + @return InlineResponse20019 */ -func (r apiExportCustomerSessionsRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAccessLogsWithoutTotalCountRequest) Execute() (InlineResponse20019, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue InlineResponse20019 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCustomerSessions") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccessLogsWithoutTotalCount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/export_customer_sessions" + localVarPath := localBasePath + "/v1/applications/{applicationId}/access_logs/no_total" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + if r.rangeStart == nil { + return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + + if r.rangeEnd == nil { + return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") } - if r.profileIntegrationId != nil { - localVarQueryParams.Add("profileIntegrationId", parameterToString(*r.profileIntegrationId, "")) + + if r.path != nil { + localVarQueryParams.Add("path", parameterToString(*r.path, "")) } - if r.dateFormat != nil { - localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + if r.method != nil { + localVarQueryParams.Add("method", parameterToString(*r.method, "")) } - if r.customerSessionState != nil { - localVarQueryParams.Add("customerSessionState", parameterToString(*r.customerSessionState, "")) + if r.status != nil { + localVarQueryParams.Add("status", parameterToString(*r.status, "")) + } + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4500,7 +7772,7 @@ func (r apiExportCustomerSessionsRequest) Execute() (string, *_nethttp.Response, } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -4557,7 +7829,7 @@ func (r apiExportCustomerSessionsRequest) Execute() (string, *_nethttp.Response, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string + var v InlineResponse20019 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4580,88 +7852,56 @@ func (r apiExportCustomerSessionsRequest) Execute() (string, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportCustomersTiersRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId string - subledgerIds *[]string - tierNames *[]string -} - -func (r apiExportCustomersTiersRequest) SubledgerIds(subledgerIds []string) apiExportCustomersTiersRequest { - r.subledgerIds = &subledgerIds - return r -} - -func (r apiExportCustomersTiersRequest) TierNames(tierNames []string) apiExportCustomersTiersRequest { - r.tierNames = &tierNames - return r +type apiGetAccountRequest struct { + ctx _context.Context + apiService *ManagementApiService + accountId int32 } /* -ExportCustomersTiers Export customers' tier data -Download a CSV file containing the tier information for customers of the specified loyalty program. - -The generated file contains the following columns: - -- `programid`: The identifier of the loyalty program. It is displayed in your Talon.One deployment URL. -- `subledgerid`: The ID of the subledger associated with the loyalty program. This column is empty if the loyalty program has no subledger. In this case, refer to the export file name to get the ID of the loyalty program. -- `customerprofileid`: The ID used to integrate customer profiles with the loyalty program. -- `tiername`: The name of the tier. -- `startdate`: The tier start date in RFC3339. -- `expirydate`: The tier expiry date in RFC3339. - -You can filter the results by providing the following optional input parameters: - -- `subledgerId` (optional): Filter results by subledger ID. If no value is provided, all subledger data for the specified loyalty program will be exported. -- `tierName` (optional): Filter results by tier name. If no value is provided, all tier data for the specified loyalty program will be exported. +GetAccount Get account details +Return the details of your companies Talon.One account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId The identifier for the loyalty program. + - @param 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. -@return apiExportCustomersTiersRequest +@return apiGetAccountRequest */ -func (a *ManagementApiService) ExportCustomersTiers(ctx _context.Context, loyaltyProgramId string) apiExportCustomersTiersRequest { - return apiExportCustomersTiersRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetAccount(ctx _context.Context, accountId int32) apiGetAccountRequest { + return apiGetAccountRequest{ + apiService: a, + ctx: ctx, + accountId: accountId, } } /* Execute executes the request - @return string + @return Account */ -func (r apiExportCustomersTiersRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAccountRequest) Execute() (Account, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue Account ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportCustomersTiers") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_customers_tiers" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/accounts/{accountId}" + localVarPath = strings.Replace(localVarPath, "{"+"accountId"+"}", _neturl.QueryEscape(parameterToString(r.accountId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.subledgerIds != nil { - localVarQueryParams.Add("subledgerIds", parameterToString(*r.subledgerIds, "csv")) - } - if r.tierNames != nil { - localVarQueryParams.Add("tierNames", parameterToString(*r.tierNames, "csv")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4672,7 +7912,7 @@ func (r apiExportCustomersTiersRequest) Execute() (string, *_nethttp.Response, e } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -4729,7 +7969,7 @@ func (r apiExportCustomersTiersRequest) Execute() (string, *_nethttp.Response, e error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string + var v Account err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4752,113 +7992,56 @@ func (r apiExportCustomersTiersRequest) Execute() (string, *_nethttp.Response, e return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportEffectsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId *float32 - createdBefore *time.Time - createdAfter *time.Time - dateFormat *string -} - -func (r apiExportEffectsRequest) CampaignId(campaignId float32) apiExportEffectsRequest { - r.campaignId = &campaignId - return r -} - -func (r apiExportEffectsRequest) CreatedBefore(createdBefore time.Time) apiExportEffectsRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiExportEffectsRequest) CreatedAfter(createdAfter time.Time) apiExportEffectsRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiExportEffectsRequest) DateFormat(dateFormat string) apiExportEffectsRequest { - r.dateFormat = &dateFormat - return r +type apiGetAccountAnalyticsRequest struct { + ctx _context.Context + apiService *ManagementApiService + accountId int32 } /* -ExportEffects Export triggered effects -Download a CSV file containing the triggered effects that match the given attributes. - -**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - -The generated file can contain the following columns: - -- `applicationid`: The ID of the Application. -- `campaignid`: The ID of the campaign. -- `couponid`: The ID of the coupon, when applicable to the effect. -- `created`: The timestamp of the effect. -- `event_type`: The name of the event. See the [docs](https://docs.talon.one/docs/dev/concepts/entities/events). -- `eventid`: The internal ID of the effect. -- `name`: The effect name. See the [docs](https://docs.talon.one/docs/dev/integration-api/api-effects). -- `profileintegrationid`: The ID of the customer profile, when applicable. -- `props`: The [properties](https://docs.talon.one/docs/dev/integration-api/api-effects) of the effect. -- `ruleindex`: The index of the rule. -- `rulesetid`: The ID of the rule set. -- `sessionid`: The internal ID of the session that triggered the effect. -- `profileid`: The internal ID of the customer profile. -- `sessionintegrationid`: The integration ID of the session. -- `total_revenue`: The total revenue. -- `store_integration_id`: The integration ID of the store. You choose this ID when you create a store. +GetAccountAnalytics Get account analytics +Return the analytics of your Talon.One account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param 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. -@return apiExportEffectsRequest +@return apiGetAccountAnalyticsRequest */ -func (a *ManagementApiService) ExportEffects(ctx _context.Context, applicationId int32) apiExportEffectsRequest { - return apiExportEffectsRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetAccountAnalytics(ctx _context.Context, accountId int32) apiGetAccountAnalyticsRequest { + return apiGetAccountAnalyticsRequest{ + apiService: a, + ctx: ctx, + accountId: accountId, } } /* Execute executes the request - @return string + @return AccountAnalytics */ -func (r apiExportEffectsRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAccountAnalyticsRequest) Execute() (AccountAnalytics, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue AccountAnalytics ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportEffects") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccountAnalytics") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/export_effects" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/accounts/{accountId}/analytics" + localVarPath = strings.Replace(localVarPath, "{"+"accountId"+"}", _neturl.QueryEscape(parameterToString(r.accountId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.campaignId != nil { - localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.dateFormat != nil { - localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -4869,7 +8052,7 @@ func (r apiExportEffectsRequest) Execute() (string, *_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -4926,7 +8109,7 @@ func (r apiExportEffectsRequest) Execute() (string, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string + var v AccountAnalytics err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -4949,70 +8132,55 @@ func (r apiExportEffectsRequest) Execute() (string, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportLoyaltyBalanceRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId string - endDate *time.Time -} - -func (r apiExportLoyaltyBalanceRequest) EndDate(endDate time.Time) apiExportLoyaltyBalanceRequest { - r.endDate = &endDate - return r +type apiGetAccountCollectionRequest struct { + ctx _context.Context + apiService *ManagementApiService + collectionId int32 } /* -ExportLoyaltyBalance Export customer loyalty balance to CSV -⚠️ 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/). - +GetAccountCollection Get account-level collection +Retrieve a given account-level collection. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId The identifier for the loyalty program. + - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. -@return apiExportLoyaltyBalanceRequest +@return apiGetAccountCollectionRequest */ -func (a *ManagementApiService) ExportLoyaltyBalance(ctx _context.Context, loyaltyProgramId string) apiExportLoyaltyBalanceRequest { - return apiExportLoyaltyBalanceRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetAccountCollection(ctx _context.Context, collectionId int32) apiGetAccountCollectionRequest { + return apiGetAccountCollectionRequest{ + apiService: a, + ctx: ctx, + collectionId: collectionId, } } /* Execute executes the request - @return string + @return Collection */ -func (r apiExportLoyaltyBalanceRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAccountCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue Collection ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyBalance") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccountCollection") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balance" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/collections/{collectionId}" + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.endDate != nil { - localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5023,7 +8191,7 @@ func (r apiExportLoyaltyBalanceRequest) Execute() (string, *_nethttp.Response, e } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -5080,17 +8248,7 @@ func (r apiExportLoyaltyBalanceRequest) Execute() (string, *_nethttp.Response, e error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus + var v Collection err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -5099,7 +8257,7 @@ func (r apiExportLoyaltyBalanceRequest) Execute() (string, *_nethttp.Response, e newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 401 { + if localVarHTTPResponse.StatusCode == 404 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -5123,78 +8281,63 @@ func (r apiExportLoyaltyBalanceRequest) Execute() (string, *_nethttp.Response, e return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportLoyaltyBalancesRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId string - endDate *time.Time -} - -func (r apiExportLoyaltyBalancesRequest) EndDate(endDate time.Time) apiExportLoyaltyBalancesRequest { - r.endDate = &endDate - return r +type apiGetAchievementRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + achievementId int32 } /* -ExportLoyaltyBalances Export customer loyalty balances -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. - +GetAchievement Get achievement +Get the details of a specific achievement. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId The identifier for the loyalty program. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param achievementId The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. -@return apiExportLoyaltyBalancesRequest +@return apiGetAchievementRequest */ -func (a *ManagementApiService) ExportLoyaltyBalances(ctx _context.Context, loyaltyProgramId string) apiExportLoyaltyBalancesRequest { - return apiExportLoyaltyBalancesRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetAchievement(ctx _context.Context, applicationId int32, campaignId int32, achievementId int32) apiGetAchievementRequest { + return apiGetAchievementRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + achievementId: achievementId, } } /* Execute executes the request - @return string + @return Achievement */ -func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAchievementRequest) Execute() (Achievement, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue Achievement ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyBalances") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAchievement") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_customer_balances" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"achievementId"+"}", _neturl.QueryEscape(parameterToString(r.achievementId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.endDate != nil { - localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5205,7 +8348,7 @@ func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -5262,7 +8405,7 @@ func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string + var v Achievement err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -5271,7 +8414,7 @@ func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 400 { + if localVarHTTPResponse.StatusCode == 401 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -5281,7 +8424,7 @@ func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 401 { + if localVarHTTPResponse.StatusCode == 404 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { @@ -5305,77 +8448,56 @@ func (r apiExportLoyaltyBalancesRequest) Execute() (string, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportLoyaltyCardBalancesRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - endDate *time.Time -} - -func (r apiExportLoyaltyCardBalancesRequest) EndDate(endDate time.Time) apiExportLoyaltyCardBalancesRequest { - r.endDate = &endDate - return r -} - -/* -ExportLoyaltyCardBalances Export all card transaction logs -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. +type apiGetAdditionalCostRequest struct { + ctx _context.Context + apiService *ManagementApiService + additionalCostId int32 +} + +/* +GetAdditionalCost Get additional cost +Returns the additional cost. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param 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**. -@return apiExportLoyaltyCardBalancesRequest +@return apiGetAdditionalCostRequest */ -func (a *ManagementApiService) ExportLoyaltyCardBalances(ctx _context.Context, loyaltyProgramId int32) apiExportLoyaltyCardBalancesRequest { - return apiExportLoyaltyCardBalancesRequest{ +func (a *ManagementApiService) GetAdditionalCost(ctx _context.Context, additionalCostId int32) apiGetAdditionalCostRequest { + return apiGetAdditionalCostRequest{ apiService: a, ctx: ctx, - loyaltyProgramId: loyaltyProgramId, + additionalCostId: additionalCostId, } } /* Execute executes the request - @return string + @return AccountAdditionalCost */ -func (r apiExportLoyaltyCardBalancesRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue AccountAdditionalCost ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyCardBalances") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAdditionalCost") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/export_card_balances" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/additional_costs/{additionalCostId}" + localVarPath = strings.Replace(localVarPath, "{"+"additionalCostId"+"}", _neturl.QueryEscape(parameterToString(r.additionalCostId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.endDate != nil { - localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5386,7 +8508,7 @@ func (r apiExportLoyaltyCardBalancesRequest) Execute() (string, *_nethttp.Respon } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -5443,27 +8565,7 @@ func (r apiExportLoyaltyCardBalancesRequest) Execute() (string, *_nethttp.Respon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus + var v AccountAdditionalCost err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -5486,96 +8588,78 @@ func (r apiExportLoyaltyCardBalancesRequest) Execute() (string, *_nethttp.Respon return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportLoyaltyCardLedgerRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyCardId string - rangeStart *time.Time - rangeEnd *time.Time - dateFormat *string +type apiGetAdditionalCostsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string } -func (r apiExportLoyaltyCardLedgerRequest) RangeStart(rangeStart time.Time) apiExportLoyaltyCardLedgerRequest { - r.rangeStart = &rangeStart +func (r apiGetAdditionalCostsRequest) PageSize(pageSize int32) apiGetAdditionalCostsRequest { + r.pageSize = &pageSize return r } -func (r apiExportLoyaltyCardLedgerRequest) RangeEnd(rangeEnd time.Time) apiExportLoyaltyCardLedgerRequest { - r.rangeEnd = &rangeEnd +func (r apiGetAdditionalCostsRequest) Skip(skip int32) apiGetAdditionalCostsRequest { + r.skip = &skip return r } -func (r apiExportLoyaltyCardLedgerRequest) DateFormat(dateFormat string) apiExportLoyaltyCardLedgerRequest { - r.dateFormat = &dateFormat +func (r apiGetAdditionalCostsRequest) Sort(sort string) apiGetAdditionalCostsRequest { + r.sort = &sort return r } /* -ExportLoyaltyCardLedger Export card's ledger log -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/). +GetAdditionalCosts List additional costs +Returns all the defined additional costs for the account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. -@return apiExportLoyaltyCardLedgerRequest +@return apiGetAdditionalCostsRequest */ -func (a *ManagementApiService) ExportLoyaltyCardLedger(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiExportLoyaltyCardLedgerRequest { - return apiExportLoyaltyCardLedgerRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, +func (a *ManagementApiService) GetAdditionalCosts(ctx _context.Context) apiGetAdditionalCostsRequest { + return apiGetAdditionalCostsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return string + @return InlineResponse20036 */ -func (r apiExportLoyaltyCardLedgerRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20036, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue InlineResponse20036 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyCardLedger") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAdditionalCosts") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/export_log" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) + localVarPath := localBasePath + "/v1/additional_costs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") - } - - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) - if r.dateFormat != nil { - localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5587,7 +8671,7 @@ func (r apiExportLoyaltyCardLedgerRequest) Execute() (string, *_nethttp.Response } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -5644,27 +8728,7 @@ func (r apiExportLoyaltyCardLedgerRequest) Execute() (string, *_nethttp.Response error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v InlineResponse20036 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -5687,109 +8751,123 @@ func (r apiExportLoyaltyCardLedgerRequest) Execute() (string, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportLoyaltyLedgerRequest struct { - ctx _context.Context - apiService *ManagementApiService - rangeStart *time.Time - rangeEnd *time.Time - loyaltyProgramId string - integrationId string - dateFormat *string +type apiGetAllAccessLogsRequest struct { + ctx _context.Context + apiService *ManagementApiService + rangeStart *time.Time + rangeEnd *time.Time + path *string + method *string + status *string + pageSize *int32 + skip *int32 + sort *string } -func (r apiExportLoyaltyLedgerRequest) RangeStart(rangeStart time.Time) apiExportLoyaltyLedgerRequest { +func (r apiGetAllAccessLogsRequest) RangeStart(rangeStart time.Time) apiGetAllAccessLogsRequest { r.rangeStart = &rangeStart return r } -func (r apiExportLoyaltyLedgerRequest) RangeEnd(rangeEnd time.Time) apiExportLoyaltyLedgerRequest { +func (r apiGetAllAccessLogsRequest) RangeEnd(rangeEnd time.Time) apiGetAllAccessLogsRequest { r.rangeEnd = &rangeEnd return r } -func (r apiExportLoyaltyLedgerRequest) DateFormat(dateFormat string) apiExportLoyaltyLedgerRequest { - r.dateFormat = &dateFormat +func (r apiGetAllAccessLogsRequest) Path(path string) apiGetAllAccessLogsRequest { + r.path = &path return r } -/* -ExportLoyaltyLedger Export customer's transaction logs -Download a CSV file containing a customer's transaction logs in the loyalty program. +func (r apiGetAllAccessLogsRequest) Method(method string) apiGetAllAccessLogsRequest { + r.method = &method + return r +} -**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/). +func (r apiGetAllAccessLogsRequest) Status(status string) apiGetAllAccessLogsRequest { + r.status = &status + return r +} -The generated file can contain the following columns: +func (r apiGetAllAccessLogsRequest) PageSize(pageSize int32) apiGetAllAccessLogsRequest { + r.pageSize = &pageSize + return r +} -- `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. +func (r apiGetAllAccessLogsRequest) Skip(skip int32) apiGetAllAccessLogsRequest { + r.skip = &skip + return r +} + +func (r apiGetAllAccessLogsRequest) Sort(sort string) apiGetAllAccessLogsRequest { + r.sort = &sort + return r +} + +/* +GetAllAccessLogs List access logs +Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId The identifier for the loyalty program. - - @param integrationId The identifier of the profile. -@return apiExportLoyaltyLedgerRequest +@return apiGetAllAccessLogsRequest */ -func (a *ManagementApiService) ExportLoyaltyLedger(ctx _context.Context, loyaltyProgramId string, integrationId string) apiExportLoyaltyLedgerRequest { - return apiExportLoyaltyLedgerRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - integrationId: integrationId, +func (a *ManagementApiService) GetAllAccessLogs(ctx _context.Context) apiGetAllAccessLogsRequest { + return apiGetAllAccessLogsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return string + @return InlineResponse20020 */ -func (r apiExportLoyaltyLedgerRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue InlineResponse20020 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportLoyaltyLedger") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAllAccessLogs") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/export_log" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) + localVarPath := localBasePath + "/v1/access_logs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + if r.rangeStart != nil { + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + if r.rangeEnd != nil { + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) } - - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) - if r.dateFormat != nil { - localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) + if r.path != nil { + localVarQueryParams.Add("path", parameterToString(*r.path, "")) + } + if r.method != nil { + localVarQueryParams.Add("method", parameterToString(*r.method, "")) + } + if r.status != nil { + localVarQueryParams.Add("status", parameterToString(*r.status, "")) + } + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5801,7 +8879,7 @@ func (r apiExportLoyaltyLedgerRequest) Execute() (string, *_nethttp.Response, er } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -5858,7 +8936,7 @@ func (r apiExportLoyaltyLedgerRequest) Execute() (string, *_nethttp.Response, er error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string + var v InlineResponse20020 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -5881,90 +8959,51 @@ func (r apiExportLoyaltyLedgerRequest) Execute() (string, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportPoolGiveawaysRequest struct { - ctx _context.Context - apiService *ManagementApiService - poolId int32 - createdBefore *time.Time - createdAfter *time.Time -} - -func (r apiExportPoolGiveawaysRequest) CreatedBefore(createdBefore time.Time) apiExportPoolGiveawaysRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiExportPoolGiveawaysRequest) CreatedAfter(createdAfter time.Time) apiExportPoolGiveawaysRequest { - r.createdAfter = &createdAfter - return r +type apiGetAllRolesRequest struct { + ctx _context.Context + apiService *ManagementApiService } /* -ExportPoolGiveaways Export giveaway codes of a giveaway pool -Download a CSV file containing the giveaway codes of a specific giveaway pool. - -**Tip:** If the exported CSV file is too large to view, you can [split it into multiple files](https://www.makeuseof.com/tag/how-to-split-a-huge-csv-excel-workbook-into-seperate-files/). - -The CSV file contains the following columns: - -- `id`: The internal ID of the giveaway. -- `poolid`: The internal ID of the giveaway pool. -- `code`: The giveaway code. -- `startdate`: The validity start date in RFC3339 of the giveaway (can be empty). -- `enddate`: The validity end date in RFC3339 of the giveaway (can be empty). -- `attributes`: Any custom attributes associated with the giveaway code (can be empty). -- `used`: An indication of whether the giveaway is already awarded. -- `importid`: The ID of the import which created the giveaway. -- `created`: The creation time of the giveaway code. -- `profileintegrationid`: The third-party integration ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded. -- `profileid`: The internal ID of the customer profile that was awarded the giveaway. Can be empty if the giveaway was not awarded or an internal ID does not exist. - +GetAllRoles List roles +List all roles. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. -@return apiExportPoolGiveawaysRequest +@return apiGetAllRolesRequest */ -func (a *ManagementApiService) ExportPoolGiveaways(ctx _context.Context, poolId int32) apiExportPoolGiveawaysRequest { - return apiExportPoolGiveawaysRequest{ +func (a *ManagementApiService) GetAllRoles(ctx _context.Context) apiGetAllRolesRequest { + return apiGetAllRolesRequest{ apiService: a, ctx: ctx, - poolId: poolId, } } /* Execute executes the request - @return string + @return InlineResponse20044 */ -func (r apiExportPoolGiveawaysRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetAllRolesRequest) Execute() (InlineResponse20044, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue InlineResponse20044 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportPoolGiveaways") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAllRoles") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/giveaways/pools/{poolId}/export" - localVarPath = strings.Replace(localVarPath, "{"+"poolId"+"}", _neturl.QueryEscape(parameterToString(r.poolId, "")), -1) + localVarPath := localBasePath + "/v1/roles" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -5975,7 +9014,7 @@ func (r apiExportPoolGiveawaysRequest) Execute() (string, *_nethttp.Response, er } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -6032,17 +9071,7 @@ func (r apiExportPoolGiveawaysRequest) Execute() (string, *_nethttp.Response, er error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus + var v InlineResponse20044 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -6065,76 +9094,22 @@ func (r apiExportPoolGiveawaysRequest) Execute() (string, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiExportReferralsRequest struct { +type apiGetApplicationRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - campaignId *float32 - createdBefore *time.Time - createdAfter *time.Time - valid *string - usable *string - batchId *string - dateFormat *string -} - -func (r apiExportReferralsRequest) CampaignId(campaignId float32) apiExportReferralsRequest { - r.campaignId = &campaignId - return r -} - -func (r apiExportReferralsRequest) CreatedBefore(createdBefore time.Time) apiExportReferralsRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiExportReferralsRequest) CreatedAfter(createdAfter time.Time) apiExportReferralsRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiExportReferralsRequest) Valid(valid string) apiExportReferralsRequest { - r.valid = &valid - return r -} - -func (r apiExportReferralsRequest) Usable(usable string) apiExportReferralsRequest { - r.usable = &usable - return r -} - -func (r apiExportReferralsRequest) BatchId(batchId string) apiExportReferralsRequest { - r.batchId = &batchId - return r -} - -func (r apiExportReferralsRequest) DateFormat(dateFormat string) apiExportReferralsRequest { - r.dateFormat = &dateFormat - return r } /* -ExportReferrals Export referrals -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. - +GetApplication Get Application +Get the application specified by the ID. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiExportReferralsRequest +@return apiGetApplicationRequest */ -func (a *ManagementApiService) ExportReferrals(ctx _context.Context, applicationId int32) apiExportReferralsRequest { - return apiExportReferralsRequest{ +func (a *ManagementApiService) GetApplication(ctx _context.Context, applicationId int32) apiGetApplicationRequest { + return apiGetApplicationRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -6144,51 +9119,30 @@ func (a *ManagementApiService) ExportReferrals(ctx _context.Context, application /* Execute executes the request - @return string + @return Application */ -func (r apiExportReferralsRequest) Execute() (string, *_nethttp.Response, error) { +func (r apiGetApplicationRequest) Execute() (Application, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue string + localVarReturnValue Application ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ExportReferrals") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplication") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/export_referrals" + localVarPath := localBasePath + "/v1/applications/{applicationId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.campaignId != nil { - localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.valid != nil { - localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) - } - if r.usable != nil { - localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) - } - if r.batchId != nil { - localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) - } - if r.dateFormat != nil { - localVarQueryParams.Add("dateFormat", parameterToString(*r.dateFormat, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6199,7 +9153,7 @@ func (r apiExportReferralsRequest) Execute() (string, *_nethttp.Response, error) } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/csv"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -6256,7 +9210,7 @@ func (r apiExportReferralsRequest) Execute() (string, *_nethttp.Response, error) error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v string + var v Application err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -6279,71 +9233,27 @@ func (r apiExportReferralsRequest) Execute() (string, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAccessLogsWithoutTotalCountRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - rangeStart *time.Time - rangeEnd *time.Time - path *string - method *string - status *string - pageSize *int32 - skip *int32 - sort *string -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) RangeStart(rangeStart time.Time) apiGetAccessLogsWithoutTotalCountRequest { - r.rangeStart = &rangeStart - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) RangeEnd(rangeEnd time.Time) apiGetAccessLogsWithoutTotalCountRequest { - r.rangeEnd = &rangeEnd - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) Path(path string) apiGetAccessLogsWithoutTotalCountRequest { - r.path = &path - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) Method(method string) apiGetAccessLogsWithoutTotalCountRequest { - r.method = &method - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) Status(status string) apiGetAccessLogsWithoutTotalCountRequest { - r.status = &status - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetAccessLogsWithoutTotalCountRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) Skip(skip int32) apiGetAccessLogsWithoutTotalCountRequest { - r.skip = &skip - return r -} - -func (r apiGetAccessLogsWithoutTotalCountRequest) Sort(sort string) apiGetAccessLogsWithoutTotalCountRequest { - r.sort = &sort - return r +type apiGetApplicationApiHealthRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 } /* -GetAccessLogsWithoutTotalCount Get access logs for Application -Retrieve the list of API calls sent to the specified Application. +GetApplicationApiHealth Get Application health +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). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetAccessLogsWithoutTotalCountRequest +@return apiGetApplicationApiHealthRequest */ -func (a *ManagementApiService) GetAccessLogsWithoutTotalCount(ctx _context.Context, applicationId int32) apiGetAccessLogsWithoutTotalCountRequest { - return apiGetAccessLogsWithoutTotalCountRequest{ +func (a *ManagementApiService) GetApplicationApiHealth(ctx _context.Context, applicationId int32) apiGetApplicationApiHealthRequest { + return apiGetApplicationApiHealthRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -6353,58 +9263,30 @@ func (a *ManagementApiService) GetAccessLogsWithoutTotalCount(ctx _context.Conte /* Execute executes the request - @return InlineResponse20019 + @return ApplicationApiHealth */ -func (r apiGetAccessLogsWithoutTotalCountRequest) Execute() (InlineResponse20019, *_nethttp.Response, error) { +func (r apiGetApplicationApiHealthRequest) Execute() (ApplicationApiHealth, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20019 + localVarReturnValue ApplicationApiHealth ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccessLogsWithoutTotalCount") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationApiHealth") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/access_logs/no_total" + localVarPath := localBasePath + "/v1/applications/{applicationId}/health_report" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") - } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") - } - - if r.path != nil { - localVarQueryParams.Add("path", parameterToString(*r.path, "")) - } - if r.method != nil { - localVarQueryParams.Add("method", parameterToString(*r.method, "")) - } - if r.status != nil { - localVarQueryParams.Add("status", parameterToString(*r.status, "")) - } - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6472,7 +9354,7 @@ func (r apiGetAccessLogsWithoutTotalCountRequest) Execute() (InlineResponse20019 error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20019 + var v ApplicationApiHealth err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -6495,51 +9377,55 @@ func (r apiGetAccessLogsWithoutTotalCountRequest) Execute() (InlineResponse20019 return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAccountRequest struct { - ctx _context.Context - apiService *ManagementApiService - accountId int32 +type apiGetApplicationCustomerRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + customerId int32 } /* -GetAccount Get account details -Return the details of your companies Talon.One account. +GetApplicationCustomer Get application's customer +Retrieve the customers of the specified application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param 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. -@return apiGetAccountRequest +@return apiGetApplicationCustomerRequest */ -func (a *ManagementApiService) GetAccount(ctx _context.Context, accountId int32) apiGetAccountRequest { - return apiGetAccountRequest{ - apiService: a, - ctx: ctx, - accountId: accountId, +func (a *ManagementApiService) GetApplicationCustomer(ctx _context.Context, applicationId int32, customerId int32) apiGetApplicationCustomerRequest { + return apiGetApplicationCustomerRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + customerId: customerId, } } /* Execute executes the request - @return Account + @return ApplicationCustomer */ -func (r apiGetAccountRequest) Execute() (Account, *_nethttp.Response, error) { +func (r apiGetApplicationCustomerRequest) Execute() (ApplicationCustomer, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Account + localVarReturnValue ApplicationCustomer ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccount") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomer") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/accounts/{accountId}" - localVarPath = strings.Replace(localVarPath, "{"+"accountId"+"}", _neturl.QueryEscape(parameterToString(r.accountId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/customers/{customerId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -6612,7 +9498,7 @@ func (r apiGetAccountRequest) Execute() (Account, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Account + var v ApplicationCustomer err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -6635,56 +9521,96 @@ func (r apiGetAccountRequest) Execute() (Account, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAccountAnalyticsRequest struct { - ctx _context.Context - apiService *ManagementApiService - accountId int32 +type apiGetApplicationCustomerFriendsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + integrationId string + pageSize *int32 + skip *int32 + sort *string + withTotalResultSize *bool +} + +func (r apiGetApplicationCustomerFriendsRequest) PageSize(pageSize int32) apiGetApplicationCustomerFriendsRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetApplicationCustomerFriendsRequest) Skip(skip int32) apiGetApplicationCustomerFriendsRequest { + r.skip = &skip + return r +} + +func (r apiGetApplicationCustomerFriendsRequest) Sort(sort string) apiGetApplicationCustomerFriendsRequest { + r.sort = &sort + return r +} + +func (r apiGetApplicationCustomerFriendsRequest) WithTotalResultSize(withTotalResultSize bool) apiGetApplicationCustomerFriendsRequest { + r.withTotalResultSize = &withTotalResultSize + return r } /* -GetAccountAnalytics Get account analytics -Return the analytics of your Talon.One account. +GetApplicationCustomerFriends List friends referred by customer profile +List the friends referred by the specified customer profile in this Application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param integrationId The Integration ID of the Advocate's Profile. -@return apiGetAccountAnalyticsRequest +@return apiGetApplicationCustomerFriendsRequest */ -func (a *ManagementApiService) GetAccountAnalytics(ctx _context.Context, accountId int32) apiGetAccountAnalyticsRequest { - return apiGetAccountAnalyticsRequest{ - apiService: a, - ctx: ctx, - accountId: accountId, +func (a *ManagementApiService) GetApplicationCustomerFriends(ctx _context.Context, applicationId int32, integrationId string) apiGetApplicationCustomerFriendsRequest { + return apiGetApplicationCustomerFriendsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + integrationId: integrationId, } } /* Execute executes the request - @return AccountAnalytics + @return InlineResponse20033 */ -func (r apiGetAccountAnalyticsRequest) Execute() (AccountAnalytics, *_nethttp.Response, error) { +func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20033, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue AccountAnalytics + localVarReturnValue InlineResponse20033 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccountAnalytics") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomerFriends") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/accounts/{accountId}/analytics" - localVarPath = strings.Replace(localVarPath, "{"+"accountId"+"}", _neturl.QueryEscape(parameterToString(r.accountId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/profile/{integrationId}/friends" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.withTotalResultSize != nil { + localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6752,7 +9678,7 @@ func (r apiGetAccountAnalyticsRequest) Execute() (AccountAnalytics, *_nethttp.Re error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v AccountAnalytics + var v InlineResponse20033 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -6775,55 +9701,91 @@ func (r apiGetAccountAnalyticsRequest) Execute() (AccountAnalytics, *_nethttp.Re return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAccountCollectionRequest struct { - ctx _context.Context - apiService *ManagementApiService - collectionId int32 +type apiGetApplicationCustomersRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + integrationId *string + pageSize *int32 + skip *int32 + withTotalResultSize *bool +} + +func (r apiGetApplicationCustomersRequest) IntegrationId(integrationId string) apiGetApplicationCustomersRequest { + r.integrationId = &integrationId + return r +} + +func (r apiGetApplicationCustomersRequest) PageSize(pageSize int32) apiGetApplicationCustomersRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetApplicationCustomersRequest) Skip(skip int32) apiGetApplicationCustomersRequest { + r.skip = &skip + return r +} + +func (r apiGetApplicationCustomersRequest) WithTotalResultSize(withTotalResultSize bool) apiGetApplicationCustomersRequest { + r.withTotalResultSize = &withTotalResultSize + return r } /* -GetAccountCollection Get account-level collection -Retrieve a given account-level collection. +GetApplicationCustomers List application's customers +List all the customers of the specified application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetAccountCollectionRequest +@return apiGetApplicationCustomersRequest */ -func (a *ManagementApiService) GetAccountCollection(ctx _context.Context, collectionId int32) apiGetAccountCollectionRequest { - return apiGetAccountCollectionRequest{ - apiService: a, - ctx: ctx, - collectionId: collectionId, +func (a *ManagementApiService) GetApplicationCustomers(ctx _context.Context, applicationId int32) apiGetApplicationCustomersRequest { + return apiGetApplicationCustomersRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return Collection + @return InlineResponse20022 */ -func (r apiGetAccountCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { +func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20022, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Collection + localVarReturnValue InlineResponse20022 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAccountCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomers") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections/{collectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/customers" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.integrationId != nil { + localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) + } + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.withTotalResultSize != nil { + localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -6891,17 +9853,7 @@ func (r apiGetAccountCollectionRequest) Execute() (Collection, *_nethttp.Respons error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Collection - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v InlineResponse20022 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -6924,58 +9876,97 @@ func (r apiGetAccountCollectionRequest) Execute() (Collection, *_nethttp.Respons return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAdditionalCostRequest struct { - ctx _context.Context - apiService *ManagementApiService - additionalCostId int32 +type apiGetApplicationCustomersByAttributesRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + body *CustomerProfileSearchQuery + pageSize *int32 + skip *int32 + withTotalResultSize *bool +} + +func (r apiGetApplicationCustomersByAttributesRequest) Body(body CustomerProfileSearchQuery) apiGetApplicationCustomersByAttributesRequest { + r.body = &body + return r +} + +func (r apiGetApplicationCustomersByAttributesRequest) PageSize(pageSize int32) apiGetApplicationCustomersByAttributesRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetApplicationCustomersByAttributesRequest) Skip(skip int32) apiGetApplicationCustomersByAttributesRequest { + r.skip = &skip + return r +} + +func (r apiGetApplicationCustomersByAttributesRequest) WithTotalResultSize(withTotalResultSize bool) apiGetApplicationCustomersByAttributesRequest { + r.withTotalResultSize = &withTotalResultSize + return r } /* -GetAdditionalCost Get additional cost -Returns the additional cost. +GetApplicationCustomersByAttributes List application customers matching the given attributes +Get a list of the application customers 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. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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**. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetAdditionalCostRequest +@return apiGetApplicationCustomersByAttributesRequest */ -func (a *ManagementApiService) GetAdditionalCost(ctx _context.Context, additionalCostId int32) apiGetAdditionalCostRequest { - return apiGetAdditionalCostRequest{ - apiService: a, - ctx: ctx, - additionalCostId: additionalCostId, +func (a *ManagementApiService) GetApplicationCustomersByAttributes(ctx _context.Context, applicationId int32) apiGetApplicationCustomersByAttributesRequest { + return apiGetApplicationCustomersByAttributesRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return AccountAdditionalCost + @return InlineResponse20023 */ -func (r apiGetAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp.Response, error) { +func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse20023, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue AccountAdditionalCost + localVarReturnValue InlineResponse20023 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAdditionalCost") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomersByAttributes") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/additional_costs/{additionalCostId}" - localVarPath = strings.Replace(localVarPath, "{"+"additionalCostId"+"}", _neturl.QueryEscape(parameterToString(r.additionalCostId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/customer_search" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.withTotalResultSize != nil { + localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -6991,6 +9982,8 @@ func (r apiGetAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -7041,7 +10034,7 @@ func (r apiGetAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v AccountAdditionalCost + var v InlineResponse20023 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -7064,65 +10057,71 @@ func (r apiGetAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAdditionalCostsRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string +type apiGetApplicationEventTypesRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + pageSize *int32 + skip *int32 + sort *string } -func (r apiGetAdditionalCostsRequest) PageSize(pageSize int32) apiGetAdditionalCostsRequest { +func (r apiGetApplicationEventTypesRequest) PageSize(pageSize int32) apiGetApplicationEventTypesRequest { r.pageSize = &pageSize return r } -func (r apiGetAdditionalCostsRequest) Skip(skip int32) apiGetAdditionalCostsRequest { +func (r apiGetApplicationEventTypesRequest) Skip(skip int32) apiGetApplicationEventTypesRequest { r.skip = &skip return r } -func (r apiGetAdditionalCostsRequest) Sort(sort string) apiGetAdditionalCostsRequest { +func (r apiGetApplicationEventTypesRequest) Sort(sort string) apiGetApplicationEventTypesRequest { r.sort = &sort return r } /* -GetAdditionalCosts List additional costs -Returns all the defined additional costs for the account. +GetApplicationEventTypes List Applications event types +Get all of the distinct values of the Event `type` property for events recorded in the application. + +See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetAdditionalCostsRequest +@return apiGetApplicationEventTypesRequest */ -func (a *ManagementApiService) GetAdditionalCosts(ctx _context.Context) apiGetAdditionalCostsRequest { - return apiGetAdditionalCostsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetApplicationEventTypes(ctx _context.Context, applicationId int32) apiGetApplicationEventTypesRequest { + return apiGetApplicationEventTypesRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return InlineResponse20034 + @return InlineResponse20029 */ -func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20034, *_nethttp.Response, error) { +func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20029, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20034 + localVarReturnValue InlineResponse20029 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAdditionalCosts") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationEventTypes") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/additional_costs" + localVarPath := localBasePath + "/v1/applications/{applicationId}/event_types" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -7204,7 +10203,7 @@ func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20034, *_nethttp. error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20034 + var v InlineResponse20029 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -7227,119 +10226,140 @@ func (r apiGetAdditionalCostsRequest) Execute() (InlineResponse20034, *_nethttp. return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAllAccessLogsRequest struct { - ctx _context.Context - apiService *ManagementApiService - rangeStart *time.Time - rangeEnd *time.Time - path *string - method *string - status *string - pageSize *int32 - skip *int32 - sort *string +type apiGetApplicationEventsWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + pageSize *int32 + skip *int32 + sort *string + type_ *string + createdBefore *time.Time + createdAfter *time.Time + session *string + profile *string + customerName *string + customerEmail *string + couponCode *string + referralCode *string + ruleQuery *string + campaignQuery *string } -func (r apiGetAllAccessLogsRequest) RangeStart(rangeStart time.Time) apiGetAllAccessLogsRequest { - r.rangeStart = &rangeStart +func (r apiGetApplicationEventsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetApplicationEventsWithoutTotalCountRequest { + r.pageSize = &pageSize return r } -func (r apiGetAllAccessLogsRequest) RangeEnd(rangeEnd time.Time) apiGetAllAccessLogsRequest { - r.rangeEnd = &rangeEnd +func (r apiGetApplicationEventsWithoutTotalCountRequest) Skip(skip int32) apiGetApplicationEventsWithoutTotalCountRequest { + r.skip = &skip return r } -func (r apiGetAllAccessLogsRequest) Path(path string) apiGetAllAccessLogsRequest { - r.path = &path +func (r apiGetApplicationEventsWithoutTotalCountRequest) Sort(sort string) apiGetApplicationEventsWithoutTotalCountRequest { + r.sort = &sort return r } -func (r apiGetAllAccessLogsRequest) Method(method string) apiGetAllAccessLogsRequest { - r.method = &method +func (r apiGetApplicationEventsWithoutTotalCountRequest) Type_(type_ string) apiGetApplicationEventsWithoutTotalCountRequest { + r.type_ = &type_ return r } -func (r apiGetAllAccessLogsRequest) Status(status string) apiGetAllAccessLogsRequest { - r.status = &status +func (r apiGetApplicationEventsWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiGetApplicationEventsWithoutTotalCountRequest { + r.createdBefore = &createdBefore return r } -func (r apiGetAllAccessLogsRequest) PageSize(pageSize int32) apiGetAllAccessLogsRequest { - r.pageSize = &pageSize +func (r apiGetApplicationEventsWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiGetApplicationEventsWithoutTotalCountRequest { + r.createdAfter = &createdAfter return r } -func (r apiGetAllAccessLogsRequest) Skip(skip int32) apiGetAllAccessLogsRequest { - r.skip = &skip +func (r apiGetApplicationEventsWithoutTotalCountRequest) Session(session string) apiGetApplicationEventsWithoutTotalCountRequest { + r.session = &session return r } -func (r apiGetAllAccessLogsRequest) Sort(sort string) apiGetAllAccessLogsRequest { - r.sort = &sort +func (r apiGetApplicationEventsWithoutTotalCountRequest) Profile(profile string) apiGetApplicationEventsWithoutTotalCountRequest { + r.profile = &profile + return r +} + +func (r apiGetApplicationEventsWithoutTotalCountRequest) CustomerName(customerName string) apiGetApplicationEventsWithoutTotalCountRequest { + r.customerName = &customerName + return r +} + +func (r apiGetApplicationEventsWithoutTotalCountRequest) CustomerEmail(customerEmail string) apiGetApplicationEventsWithoutTotalCountRequest { + r.customerEmail = &customerEmail + return r +} + +func (r apiGetApplicationEventsWithoutTotalCountRequest) CouponCode(couponCode string) apiGetApplicationEventsWithoutTotalCountRequest { + r.couponCode = &couponCode + return r +} + +func (r apiGetApplicationEventsWithoutTotalCountRequest) ReferralCode(referralCode string) apiGetApplicationEventsWithoutTotalCountRequest { + r.referralCode = &referralCode + return r +} + +func (r apiGetApplicationEventsWithoutTotalCountRequest) RuleQuery(ruleQuery string) apiGetApplicationEventsWithoutTotalCountRequest { + r.ruleQuery = &ruleQuery + return r +} + +func (r apiGetApplicationEventsWithoutTotalCountRequest) CampaignQuery(campaignQuery string) apiGetApplicationEventsWithoutTotalCountRequest { + r.campaignQuery = &campaignQuery return r } /* -GetAllAccessLogs List access logs -Fetches the access logs for the entire account. Sensitive requests (logins) are _always_ filtered from the logs. +GetApplicationEventsWithoutTotalCount List Applications events +Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetAllAccessLogsRequest +@return apiGetApplicationEventsWithoutTotalCountRequest */ -func (a *ManagementApiService) GetAllAccessLogs(ctx _context.Context) apiGetAllAccessLogsRequest { - return apiGetAllAccessLogsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetApplicationEventsWithoutTotalCount(ctx _context.Context, applicationId int32) apiGetApplicationEventsWithoutTotalCountRequest { + return apiGetApplicationEventsWithoutTotalCountRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return InlineResponse20020 + @return InlineResponse20028 */ -func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Response, error) { +func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineResponse20028, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20020 + localVarReturnValue InlineResponse20028 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAllAccessLogs") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationEventsWithoutTotalCount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/access_logs" + localVarPath := localBasePath + "/v1/applications/{applicationId}/events/no_total" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") - } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") - } - - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) - if r.path != nil { - localVarQueryParams.Add("path", parameterToString(*r.path, "")) - } - if r.method != nil { - localVarQueryParams.Add("method", parameterToString(*r.method, "")) - } - if r.status != nil { - localVarQueryParams.Add("status", parameterToString(*r.status, "")) - } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } @@ -7349,6 +10369,39 @@ func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Re if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } + if r.type_ != nil { + localVarQueryParams.Add("type", parameterToString(*r.type_, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.session != nil { + localVarQueryParams.Add("session", parameterToString(*r.session, "")) + } + if r.profile != nil { + localVarQueryParams.Add("profile", parameterToString(*r.profile, "")) + } + if r.customerName != nil { + localVarQueryParams.Add("customerName", parameterToString(*r.customerName, "")) + } + if r.customerEmail != nil { + localVarQueryParams.Add("customerEmail", parameterToString(*r.customerEmail, "")) + } + if r.couponCode != nil { + localVarQueryParams.Add("couponCode", parameterToString(*r.couponCode, "")) + } + if r.referralCode != nil { + localVarQueryParams.Add("referralCode", parameterToString(*r.referralCode, "")) + } + if r.ruleQuery != nil { + localVarQueryParams.Add("ruleQuery", parameterToString(*r.ruleQuery, "")) + } + if r.campaignQuery != nil { + localVarQueryParams.Add("campaignQuery", parameterToString(*r.campaignQuery, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7416,7 +10469,7 @@ func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Re error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20020 + var v InlineResponse20028 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -7439,46 +10492,56 @@ func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Re return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAllRolesRequest struct { - ctx _context.Context - apiService *ManagementApiService +type apiGetApplicationSessionRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + sessionId int32 } /* -GetAllRoles List roles -List all roles. +GetApplicationSession Get Application session +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. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param 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. -@return apiGetAllRolesRequest +@return apiGetApplicationSessionRequest */ -func (a *ManagementApiService) GetAllRoles(ctx _context.Context) apiGetAllRolesRequest { - return apiGetAllRolesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetApplicationSession(ctx _context.Context, applicationId int32, sessionId int32) apiGetApplicationSessionRequest { + return apiGetApplicationSessionRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + sessionId: sessionId, } } /* Execute executes the request - @return InlineResponse20042 + @return ApplicationSession */ -func (r apiGetAllRolesRequest) Execute() (InlineResponse20042, *_nethttp.Response, error) { +func (r apiGetApplicationSessionRequest) Execute() (ApplicationSession, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20042 + localVarReturnValue ApplicationSession ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAllRoles") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationSession") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/roles" + localVarPath := localBasePath + "/v1/applications/{applicationId}/sessions/{sessionId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"sessionId"+"}", _neturl.QueryEscape(parameterToString(r.sessionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -7551,7 +10614,7 @@ func (r apiGetAllRolesRequest) Execute() (InlineResponse20042, *_nethttp.Respons error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20042 + var v ApplicationSession err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -7574,22 +10637,89 @@ func (r apiGetAllRolesRequest) Execute() (InlineResponse20042, *_nethttp.Respons return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 +type apiGetApplicationSessionsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + pageSize *int32 + skip *int32 + sort *string + profile *string + state *string + createdBefore *time.Time + createdAfter *time.Time + coupon *string + referral *string + integrationId *string + storeIntegrationId *string +} + +func (r apiGetApplicationSessionsRequest) PageSize(pageSize int32) apiGetApplicationSessionsRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetApplicationSessionsRequest) Skip(skip int32) apiGetApplicationSessionsRequest { + r.skip = &skip + return r +} + +func (r apiGetApplicationSessionsRequest) Sort(sort string) apiGetApplicationSessionsRequest { + r.sort = &sort + return r +} + +func (r apiGetApplicationSessionsRequest) Profile(profile string) apiGetApplicationSessionsRequest { + r.profile = &profile + return r +} + +func (r apiGetApplicationSessionsRequest) State(state string) apiGetApplicationSessionsRequest { + r.state = &state + return r +} + +func (r apiGetApplicationSessionsRequest) CreatedBefore(createdBefore time.Time) apiGetApplicationSessionsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiGetApplicationSessionsRequest) CreatedAfter(createdAfter time.Time) apiGetApplicationSessionsRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiGetApplicationSessionsRequest) Coupon(coupon string) apiGetApplicationSessionsRequest { + r.coupon = &coupon + return r +} + +func (r apiGetApplicationSessionsRequest) Referral(referral string) apiGetApplicationSessionsRequest { + r.referral = &referral + return r +} + +func (r apiGetApplicationSessionsRequest) IntegrationId(integrationId string) apiGetApplicationSessionsRequest { + r.integrationId = &integrationId + return r +} + +func (r apiGetApplicationSessionsRequest) StoreIntegrationId(storeIntegrationId string) apiGetApplicationSessionsRequest { + r.storeIntegrationId = &storeIntegrationId + return r } /* -GetApplication Get Application -Get the application specified by the ID. +GetApplicationSessions List Application sessions +List all the sessions of the specified Application. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationRequest +@return apiGetApplicationSessionsRequest */ -func (a *ManagementApiService) GetApplication(ctx _context.Context, applicationId int32) apiGetApplicationRequest { - return apiGetApplicationRequest{ +func (a *ManagementApiService) GetApplicationSessions(ctx _context.Context, applicationId int32) apiGetApplicationSessionsRequest { + return apiGetApplicationSessionsRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -7599,30 +10729,63 @@ func (a *ManagementApiService) GetApplication(ctx _context.Context, applicationI /* Execute executes the request - @return Application + @return InlineResponse20027 */ -func (r apiGetApplicationRequest) Execute() (Application, *_nethttp.Response, error) { +func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Application + localVarReturnValue InlineResponse20027 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplication") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationSessions") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/sessions" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.profile != nil { + localVarQueryParams.Add("profile", parameterToString(*r.profile, "")) + } + if r.state != nil { + localVarQueryParams.Add("state", parameterToString(*r.state, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.coupon != nil { + localVarQueryParams.Add("coupon", parameterToString(*r.coupon, "")) + } + if r.referral != nil { + localVarQueryParams.Add("referral", parameterToString(*r.referral, "")) + } + if r.integrationId != nil { + localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) + } + if r.storeIntegrationId != nil { + localVarQueryParams.Add("storeIntegrationId", parameterToString(*r.storeIntegrationId, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7690,7 +10853,7 @@ func (r apiGetApplicationRequest) Execute() (Application, *_nethttp.Response, er error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Application + var v InlineResponse20027 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -7713,60 +10876,78 @@ func (r apiGetApplicationRequest) Execute() (Application, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationApiHealthRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 +type apiGetApplicationsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string } -/* -GetApplicationApiHealth Get Application health -Display the health of the Application and show the last time the Application -was used. +func (r apiGetApplicationsRequest) PageSize(pageSize int32) apiGetApplicationsRequest { + r.pageSize = &pageSize + return r +} -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). +func (r apiGetApplicationsRequest) Skip(skip int32) apiGetApplicationsRequest { + r.skip = &skip + return r +} + +func (r apiGetApplicationsRequest) Sort(sort string) apiGetApplicationsRequest { + r.sort = &sort + return r +} +/* +GetApplications List Applications +List all applications in the current account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationApiHealthRequest +@return apiGetApplicationsRequest */ -func (a *ManagementApiService) GetApplicationApiHealth(ctx _context.Context, applicationId int32) apiGetApplicationApiHealthRequest { - return apiGetApplicationApiHealthRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetApplications(ctx _context.Context) apiGetApplicationsRequest { + return apiGetApplicationsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return ApplicationApiHealth + @return InlineResponse2005 */ -func (r apiGetApplicationApiHealthRequest) Execute() (ApplicationApiHealth, *_nethttp.Response, error) { +func (r apiGetApplicationsRequest) Execute() (InlineResponse2005, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationApiHealth + localVarReturnValue InlineResponse2005 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationApiHealth") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplications") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/health_report" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/applications" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -7834,7 +11015,7 @@ func (r apiGetApplicationApiHealthRequest) Execute() (ApplicationApiHealth, *_ne error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApplicationApiHealth + var v InlineResponse2005 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -7857,55 +11038,51 @@ func (r apiGetApplicationApiHealthRequest) Execute() (ApplicationApiHealth, *_ne return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationCustomerRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - customerId int32 +type apiGetAttributeRequest struct { + ctx _context.Context + apiService *ManagementApiService + attributeId int32 } /* -GetApplicationCustomer Get application's customer -Retrieve the customers of the specified application. +GetAttribute Get custom attribute +Retrieve the specified custom attribute. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param 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. + - @param 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**. -@return apiGetApplicationCustomerRequest +@return apiGetAttributeRequest */ -func (a *ManagementApiService) GetApplicationCustomer(ctx _context.Context, applicationId int32, customerId int32) apiGetApplicationCustomerRequest { - return apiGetApplicationCustomerRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - customerId: customerId, +func (a *ManagementApiService) GetAttribute(ctx _context.Context, attributeId int32) apiGetAttributeRequest { + return apiGetAttributeRequest{ + apiService: a, + ctx: ctx, + attributeId: attributeId, } } /* Execute executes the request - @return ApplicationCustomer + @return Attribute */ -func (r apiGetApplicationCustomerRequest) Execute() (ApplicationCustomer, *_nethttp.Response, error) { +func (r apiGetAttributeRequest) Execute() (Attribute, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationCustomer + localVarReturnValue Attribute ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomer") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAttribute") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/customers/{customerId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) + localVarPath := localBasePath + "/v1/attributes/{attributeId}" + localVarPath = strings.Replace(localVarPath, "{"+"attributeId"+"}", _neturl.QueryEscape(parameterToString(r.attributeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -7978,7 +11155,7 @@ func (r apiGetApplicationCustomerRequest) Execute() (ApplicationCustomer, *_neth error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApplicationCustomer + var v Attribute err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -8001,79 +11178,71 @@ func (r apiGetApplicationCustomerRequest) Execute() (ApplicationCustomer, *_neth return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationCustomerFriendsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - integrationId string - pageSize *int32 - skip *int32 - sort *string - withTotalResultSize *bool +type apiGetAttributesRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string + entity *string } -func (r apiGetApplicationCustomerFriendsRequest) PageSize(pageSize int32) apiGetApplicationCustomerFriendsRequest { +func (r apiGetAttributesRequest) PageSize(pageSize int32) apiGetAttributesRequest { r.pageSize = &pageSize return r } -func (r apiGetApplicationCustomerFriendsRequest) Skip(skip int32) apiGetApplicationCustomerFriendsRequest { +func (r apiGetAttributesRequest) Skip(skip int32) apiGetAttributesRequest { r.skip = &skip return r } -func (r apiGetApplicationCustomerFriendsRequest) Sort(sort string) apiGetApplicationCustomerFriendsRequest { +func (r apiGetAttributesRequest) Sort(sort string) apiGetAttributesRequest { r.sort = &sort return r } -func (r apiGetApplicationCustomerFriendsRequest) WithTotalResultSize(withTotalResultSize bool) apiGetApplicationCustomerFriendsRequest { - r.withTotalResultSize = &withTotalResultSize +func (r apiGetAttributesRequest) Entity(entity string) apiGetAttributesRequest { + r.entity = &entity return r } /* -GetApplicationCustomerFriends List friends referred by customer profile -List the friends referred by the specified customer profile in this Application. +GetAttributes List custom attributes +Return all the custom attributes for the account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param integrationId The Integration ID of the Advocate's Profile. -@return apiGetApplicationCustomerFriendsRequest +@return apiGetAttributesRequest */ -func (a *ManagementApiService) GetApplicationCustomerFriends(ctx _context.Context, applicationId int32, integrationId string) apiGetApplicationCustomerFriendsRequest { - return apiGetApplicationCustomerFriendsRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - integrationId: integrationId, +func (a *ManagementApiService) GetAttributes(ctx _context.Context) apiGetAttributesRequest { + return apiGetAttributesRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return InlineResponse20031 + @return InlineResponse20034 */ -func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20031, *_nethttp.Response, error) { +func (r apiGetAttributesRequest) Execute() (InlineResponse20034, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20031 + localVarReturnValue InlineResponse20034 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomerFriends") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAttributes") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/profile/{integrationId}/friends" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) + localVarPath := localBasePath + "/v1/attributes" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -8088,8 +11257,8 @@ func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20031, if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } - if r.withTotalResultSize != nil { - localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + if r.entity != nil { + localVarQueryParams.Add("entity", parameterToString(*r.entity, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8158,7 +11327,7 @@ func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20031, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20031 + var v InlineResponse20034 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -8181,90 +11350,93 @@ func (r apiGetApplicationCustomerFriendsRequest) Execute() (InlineResponse20031, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationCustomersRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - integrationId *string - pageSize *int32 - skip *int32 - withTotalResultSize *bool +type apiGetAudienceMembershipsRequest struct { + ctx _context.Context + apiService *ManagementApiService + audienceId int32 + pageSize *int32 + skip *int32 + sort *string + profileQuery *string } -func (r apiGetApplicationCustomersRequest) IntegrationId(integrationId string) apiGetApplicationCustomersRequest { - r.integrationId = &integrationId +func (r apiGetAudienceMembershipsRequest) PageSize(pageSize int32) apiGetAudienceMembershipsRequest { + r.pageSize = &pageSize return r } -func (r apiGetApplicationCustomersRequest) PageSize(pageSize int32) apiGetApplicationCustomersRequest { - r.pageSize = &pageSize +func (r apiGetAudienceMembershipsRequest) Skip(skip int32) apiGetAudienceMembershipsRequest { + r.skip = &skip return r } -func (r apiGetApplicationCustomersRequest) Skip(skip int32) apiGetApplicationCustomersRequest { - r.skip = &skip +func (r apiGetAudienceMembershipsRequest) Sort(sort string) apiGetAudienceMembershipsRequest { + r.sort = &sort return r } -func (r apiGetApplicationCustomersRequest) WithTotalResultSize(withTotalResultSize bool) apiGetApplicationCustomersRequest { - r.withTotalResultSize = &withTotalResultSize +func (r apiGetAudienceMembershipsRequest) ProfileQuery(profileQuery string) apiGetAudienceMembershipsRequest { + r.profileQuery = &profileQuery return r } /* -GetApplicationCustomers List application's customers -List all the customers of the specified application. +GetAudienceMemberships List audience members +Get a paginated list of the customer profiles in a given audience. + +A maximum of 1000 customer profiles per page is allowed. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param audienceId The ID of the audience. -@return apiGetApplicationCustomersRequest +@return apiGetAudienceMembershipsRequest */ -func (a *ManagementApiService) GetApplicationCustomers(ctx _context.Context, applicationId int32) apiGetApplicationCustomersRequest { - return apiGetApplicationCustomersRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetAudienceMemberships(ctx _context.Context, audienceId int32) apiGetAudienceMembershipsRequest { + return apiGetAudienceMembershipsRequest{ + apiService: a, + ctx: ctx, + audienceId: audienceId, } } /* Execute executes the request - @return InlineResponse20022 + @return InlineResponse20032 */ -func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20022, *_nethttp.Response, error) { +func (r apiGetAudienceMembershipsRequest) Execute() (InlineResponse20032, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20022 + localVarReturnValue InlineResponse20032 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomers") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudienceMemberships") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/customers" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/audiences/{audienceId}/memberships" + localVarPath = strings.Replace(localVarPath, "{"+"audienceId"+"}", _neturl.QueryEscape(parameterToString(r.audienceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.integrationId != nil { - localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) - } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.withTotalResultSize != nil { - localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.profileQuery != nil { + localVarQueryParams.Add("profileQuery", parameterToString(*r.profileQuery, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8333,7 +11505,17 @@ func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20022, *_net error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20022 + var v InlineResponse20032 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -8356,85 +11538,75 @@ func (r apiGetApplicationCustomersRequest) Execute() (InlineResponse20022, *_net return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationCustomersByAttributesRequest struct { +type apiGetAudiencesRequest struct { ctx _context.Context apiService *ManagementApiService - applicationId int32 - body *CustomerProfileSearchQuery pageSize *int32 skip *int32 + sort *string withTotalResultSize *bool } -func (r apiGetApplicationCustomersByAttributesRequest) Body(body CustomerProfileSearchQuery) apiGetApplicationCustomersByAttributesRequest { - r.body = &body +func (r apiGetAudiencesRequest) PageSize(pageSize int32) apiGetAudiencesRequest { + r.pageSize = &pageSize return r } -func (r apiGetApplicationCustomersByAttributesRequest) PageSize(pageSize int32) apiGetApplicationCustomersByAttributesRequest { - r.pageSize = &pageSize +func (r apiGetAudiencesRequest) Skip(skip int32) apiGetAudiencesRequest { + r.skip = &skip return r } -func (r apiGetApplicationCustomersByAttributesRequest) Skip(skip int32) apiGetApplicationCustomersByAttributesRequest { - r.skip = &skip +func (r apiGetAudiencesRequest) Sort(sort string) apiGetAudiencesRequest { + r.sort = &sort return r } -func (r apiGetApplicationCustomersByAttributesRequest) WithTotalResultSize(withTotalResultSize bool) apiGetApplicationCustomersByAttributesRequest { +func (r apiGetAudiencesRequest) WithTotalResultSize(withTotalResultSize bool) apiGetAudiencesRequest { r.withTotalResultSize = &withTotalResultSize return r } /* -GetApplicationCustomersByAttributes List application customers matching the given attributes -Get a list of the application customers 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. +GetAudiences List audiences +Get all audiences created in the account. To create an audience, use [Create audience](https://docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationCustomersByAttributesRequest +@return apiGetAudiencesRequest */ -func (a *ManagementApiService) GetApplicationCustomersByAttributes(ctx _context.Context, applicationId int32) apiGetApplicationCustomersByAttributesRequest { - return apiGetApplicationCustomersByAttributesRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetAudiences(ctx _context.Context) apiGetAudiencesRequest { + return apiGetAudiencesRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return InlineResponse20023 + @return InlineResponse20030 */ -func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse20023, *_nethttp.Response, error) { +func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20023 + localVarReturnValue InlineResponse20030 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationCustomersByAttributes") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudiences") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/customer_search" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/audiences" localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) @@ -8442,11 +11614,14 @@ func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } if r.withTotalResultSize != nil { localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -8462,8 +11637,6 @@ func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -8514,7 +11687,7 @@ func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20023 + var v InlineResponse20030 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -8537,85 +11710,72 @@ func (r apiGetApplicationCustomersByAttributesRequest) Execute() (InlineResponse return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationEventTypesRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - pageSize *int32 - skip *int32 - sort *string -} - -func (r apiGetApplicationEventTypesRequest) PageSize(pageSize int32) apiGetApplicationEventTypesRequest { - r.pageSize = &pageSize - return r +type apiGetAudiencesAnalyticsRequest struct { + ctx _context.Context + apiService *ManagementApiService + audienceIds *string + sort *string } -func (r apiGetApplicationEventTypesRequest) Skip(skip int32) apiGetApplicationEventTypesRequest { - r.skip = &skip +func (r apiGetAudiencesAnalyticsRequest) AudienceIds(audienceIds string) apiGetAudiencesAnalyticsRequest { + r.audienceIds = &audienceIds return r } -func (r apiGetApplicationEventTypesRequest) Sort(sort string) apiGetApplicationEventTypesRequest { +func (r apiGetAudiencesAnalyticsRequest) Sort(sort string) apiGetAudiencesAnalyticsRequest { r.sort = &sort return r } /* -GetApplicationEventTypes List Applications event types -Get all of the distinct values of the Event `type` property for events recorded in the application. - -See also: [Track an event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) +GetAudiencesAnalytics List audience analytics +Get a list of audience IDs and their member count. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationEventTypesRequest +@return apiGetAudiencesAnalyticsRequest */ -func (a *ManagementApiService) GetApplicationEventTypes(ctx _context.Context, applicationId int32) apiGetApplicationEventTypesRequest { - return apiGetApplicationEventTypesRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetAudiencesAnalytics(ctx _context.Context) apiGetAudiencesAnalyticsRequest { + return apiGetAudiencesAnalyticsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return InlineResponse20029 + @return InlineResponse20031 */ -func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20029, *_nethttp.Response, error) { +func (r apiGetAudiencesAnalyticsRequest) Execute() (InlineResponse20031, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20029 + localVarReturnValue InlineResponse20031 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationEventTypes") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudiencesAnalytics") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/event_types" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/audiences/analytics" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + if r.audienceIds == nil { + return localVarReturnValue, nil, reportError("audienceIds is required and must be specified") } + if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } + localVarQueryParams.Add("audienceIds", parameterToString(*r.audienceIds, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8683,7 +11843,7 @@ func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20029, *_ne error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20029 + var v InlineResponse20031 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -8706,182 +11866,59 @@ func (r apiGetApplicationEventTypesRequest) Execute() (InlineResponse20029, *_ne return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationEventsWithoutTotalCountRequest struct { +type apiGetCampaignRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - pageSize *int32 - skip *int32 - sort *string - type_ *string - createdBefore *time.Time - createdAfter *time.Time - session *string - profile *string - customerName *string - customerEmail *string - couponCode *string - referralCode *string - ruleQuery *string - campaignQuery *string -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetApplicationEventsWithoutTotalCountRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) Skip(skip int32) apiGetApplicationEventsWithoutTotalCountRequest { - r.skip = &skip - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) Sort(sort string) apiGetApplicationEventsWithoutTotalCountRequest { - r.sort = &sort - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) Type_(type_ string) apiGetApplicationEventsWithoutTotalCountRequest { - r.type_ = &type_ - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiGetApplicationEventsWithoutTotalCountRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiGetApplicationEventsWithoutTotalCountRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) Session(session string) apiGetApplicationEventsWithoutTotalCountRequest { - r.session = &session - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) Profile(profile string) apiGetApplicationEventsWithoutTotalCountRequest { - r.profile = &profile - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) CustomerName(customerName string) apiGetApplicationEventsWithoutTotalCountRequest { - r.customerName = &customerName - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) CustomerEmail(customerEmail string) apiGetApplicationEventsWithoutTotalCountRequest { - r.customerEmail = &customerEmail - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) CouponCode(couponCode string) apiGetApplicationEventsWithoutTotalCountRequest { - r.couponCode = &couponCode - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) ReferralCode(referralCode string) apiGetApplicationEventsWithoutTotalCountRequest { - r.referralCode = &referralCode - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) RuleQuery(ruleQuery string) apiGetApplicationEventsWithoutTotalCountRequest { - r.ruleQuery = &ruleQuery - return r -} - -func (r apiGetApplicationEventsWithoutTotalCountRequest) CampaignQuery(campaignQuery string) apiGetApplicationEventsWithoutTotalCountRequest { - r.campaignQuery = &campaignQuery - return r + campaignId int32 } /* -GetApplicationEventsWithoutTotalCount List Applications events -Lists all events recorded for an application. Instead of having the total number of results in the response, this endpoint only mentions whether there are more results. - +GetCampaign Get campaign +Retrieve the given campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationEventsWithoutTotalCountRequest +@return apiGetCampaignRequest */ -func (a *ManagementApiService) GetApplicationEventsWithoutTotalCount(ctx _context.Context, applicationId int32) apiGetApplicationEventsWithoutTotalCountRequest { - return apiGetApplicationEventsWithoutTotalCountRequest{ +func (a *ManagementApiService) GetCampaign(ctx _context.Context, applicationId int32, campaignId int32) apiGetCampaignRequest { + return apiGetCampaignRequest{ apiService: a, ctx: ctx, applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return InlineResponse20028 + @return Campaign */ -func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineResponse20028, *_nethttp.Response, error) { +func (r apiGetCampaignRequest) Execute() (Campaign, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20028 + localVarReturnValue Campaign ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationEventsWithoutTotalCount") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaign") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/events/no_total" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.type_ != nil { - localVarQueryParams.Add("type", parameterToString(*r.type_, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.session != nil { - localVarQueryParams.Add("session", parameterToString(*r.session, "")) - } - if r.profile != nil { - localVarQueryParams.Add("profile", parameterToString(*r.profile, "")) - } - if r.customerName != nil { - localVarQueryParams.Add("customerName", parameterToString(*r.customerName, "")) - } - if r.customerEmail != nil { - localVarQueryParams.Add("customerEmail", parameterToString(*r.customerEmail, "")) - } - if r.couponCode != nil { - localVarQueryParams.Add("couponCode", parameterToString(*r.couponCode, "")) - } - if r.referralCode != nil { - localVarQueryParams.Add("referralCode", parameterToString(*r.referralCode, "")) - } - if r.ruleQuery != nil { - localVarQueryParams.Add("ruleQuery", parameterToString(*r.ruleQuery, "")) - } - if r.campaignQuery != nil { - localVarQueryParams.Add("campaignQuery", parameterToString(*r.campaignQuery, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -8949,7 +11986,7 @@ func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineRespon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20028 + var v Campaign err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -8972,61 +12009,90 @@ func (r apiGetApplicationEventsWithoutTotalCountRequest) Execute() (InlineRespon return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationSessionRequest struct { +type apiGetCampaignAnalyticsRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - sessionId int32 + campaignId int32 + rangeStart *time.Time + rangeEnd *time.Time + granularity *string } -/* -GetApplicationSession Get Application session -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. +func (r apiGetCampaignAnalyticsRequest) RangeStart(rangeStart time.Time) apiGetCampaignAnalyticsRequest { + r.rangeStart = &rangeStart + return r +} + +func (r apiGetCampaignAnalyticsRequest) RangeEnd(rangeEnd time.Time) apiGetCampaignAnalyticsRequest { + r.rangeEnd = &rangeEnd + return r +} +func (r apiGetCampaignAnalyticsRequest) Granularity(granularity string) apiGetCampaignAnalyticsRequest { + r.granularity = &granularity + return r +} + +/* +GetCampaignAnalytics Get analytics of campaigns +Retrieve statistical data about the performance of the given campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param 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. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationSessionRequest +@return apiGetCampaignAnalyticsRequest */ -func (a *ManagementApiService) GetApplicationSession(ctx _context.Context, applicationId int32, sessionId int32) apiGetApplicationSessionRequest { - return apiGetApplicationSessionRequest{ +func (a *ManagementApiService) GetCampaignAnalytics(ctx _context.Context, applicationId int32, campaignId int32) apiGetCampaignAnalyticsRequest { + return apiGetCampaignAnalyticsRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - sessionId: sessionId, + campaignId: campaignId, } } /* Execute executes the request - @return ApplicationSession + @return InlineResponse20021 */ -func (r apiGetApplicationSessionRequest) Execute() (ApplicationSession, *_nethttp.Response, error) { +func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20021, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue ApplicationSession + localVarReturnValue InlineResponse20021 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationSession") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignAnalytics") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/sessions/{sessionId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/analytics" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"sessionId"+"}", _neturl.QueryEscape(parameterToString(r.sessionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.rangeStart == nil { + return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + } + + if r.rangeEnd == nil { + return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + } + + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) + if r.granularity != nil { + localVarQueryParams.Add("granularity", parameterToString(*r.granularity, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9094,7 +12160,7 @@ func (r apiGetApplicationSessionRequest) Execute() (ApplicationSession, *_nethtt error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v ApplicationSession + var v InlineResponse20021 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -9117,83 +12183,53 @@ func (r apiGetApplicationSessionRequest) Execute() (ApplicationSession, *_nethtt return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationSessionsRequest struct { +type apiGetCampaignByAttributesRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 + body *CampaignSearch pageSize *int32 skip *int32 sort *string - profile *string - state *string - createdBefore *time.Time - createdAfter *time.Time - coupon *string - referral *string - integrationId *string -} - -func (r apiGetApplicationSessionsRequest) PageSize(pageSize int32) apiGetApplicationSessionsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetApplicationSessionsRequest) Skip(skip int32) apiGetApplicationSessionsRequest { - r.skip = &skip - return r -} - -func (r apiGetApplicationSessionsRequest) Sort(sort string) apiGetApplicationSessionsRequest { - r.sort = &sort - return r -} - -func (r apiGetApplicationSessionsRequest) Profile(profile string) apiGetApplicationSessionsRequest { - r.profile = &profile - return r -} - -func (r apiGetApplicationSessionsRequest) State(state string) apiGetApplicationSessionsRequest { - r.state = &state - return r + campaignState *string } -func (r apiGetApplicationSessionsRequest) CreatedBefore(createdBefore time.Time) apiGetApplicationSessionsRequest { - r.createdBefore = &createdBefore +func (r apiGetCampaignByAttributesRequest) Body(body CampaignSearch) apiGetCampaignByAttributesRequest { + r.body = &body return r } -func (r apiGetApplicationSessionsRequest) CreatedAfter(createdAfter time.Time) apiGetApplicationSessionsRequest { - r.createdAfter = &createdAfter +func (r apiGetCampaignByAttributesRequest) PageSize(pageSize int32) apiGetCampaignByAttributesRequest { + r.pageSize = &pageSize return r } -func (r apiGetApplicationSessionsRequest) Coupon(coupon string) apiGetApplicationSessionsRequest { - r.coupon = &coupon +func (r apiGetCampaignByAttributesRequest) Skip(skip int32) apiGetCampaignByAttributesRequest { + r.skip = &skip return r } -func (r apiGetApplicationSessionsRequest) Referral(referral string) apiGetApplicationSessionsRequest { - r.referral = &referral +func (r apiGetCampaignByAttributesRequest) Sort(sort string) apiGetCampaignByAttributesRequest { + r.sort = &sort return r } -func (r apiGetApplicationSessionsRequest) IntegrationId(integrationId string) apiGetApplicationSessionsRequest { - r.integrationId = &integrationId +func (r apiGetCampaignByAttributesRequest) CampaignState(campaignState string) apiGetCampaignByAttributesRequest { + r.campaignState = &campaignState return r } /* -GetApplicationSessions List Application sessions -List all the sessions of the specified Application. +GetCampaignByAttributes List campaigns that match the given attributes +Get a list of all the campaigns that match a set of attributes. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetApplicationSessionsRequest +@return apiGetCampaignByAttributesRequest */ -func (a *ManagementApiService) GetApplicationSessions(ctx _context.Context, applicationId int32) apiGetApplicationSessionsRequest { - return apiGetApplicationSessionsRequest{ +func (a *ManagementApiService) GetCampaignByAttributes(ctx _context.Context, applicationId int32) apiGetCampaignByAttributesRequest { + return apiGetCampaignByAttributesRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -9203,30 +12239,34 @@ func (a *ManagementApiService) GetApplicationSessions(ctx _context.Context, appl /* Execute executes the request - @return InlineResponse20027 + @return InlineResponse2006 */ -func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_nethttp.Response, error) { +func (r apiGetCampaignByAttributesRequest) Execute() (InlineResponse2006, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20027 + localVarReturnValue InlineResponse2006 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplicationSessions") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignByAttributes") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/sessions" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns_search" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") + } + if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } @@ -9236,29 +12276,11 @@ func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_neth if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } - if r.profile != nil { - localVarQueryParams.Add("profile", parameterToString(*r.profile, "")) - } - if r.state != nil { - localVarQueryParams.Add("state", parameterToString(*r.state, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.coupon != nil { - localVarQueryParams.Add("coupon", parameterToString(*r.coupon, "")) - } - if r.referral != nil { - localVarQueryParams.Add("referral", parameterToString(*r.referral, "")) - } - if r.integrationId != nil { - localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) + if r.campaignState != nil { + localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -9274,6 +12296,8 @@ func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_neth if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -9324,7 +12348,7 @@ func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_neth error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20027 + var v InlineResponse2006 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -9347,78 +12371,55 @@ func (r apiGetApplicationSessionsRequest) Execute() (InlineResponse20027, *_neth return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetApplicationsRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string -} - -func (r apiGetApplicationsRequest) PageSize(pageSize int32) apiGetApplicationsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetApplicationsRequest) Skip(skip int32) apiGetApplicationsRequest { - r.skip = &skip - return r -} - -func (r apiGetApplicationsRequest) Sort(sort string) apiGetApplicationsRequest { - r.sort = &sort - return r +type apiGetCampaignGroupRequest struct { + ctx _context.Context + apiService *ManagementApiService + campaignGroupId int32 } /* -GetApplications List Applications -List all applications in the current account. +GetCampaignGroup Get campaign access group +Get a campaign access group specified by its ID. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param campaignGroupId The ID of the campaign access group. -@return apiGetApplicationsRequest +@return apiGetCampaignGroupRequest */ -func (a *ManagementApiService) GetApplications(ctx _context.Context) apiGetApplicationsRequest { - return apiGetApplicationsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetCampaignGroup(ctx _context.Context, campaignGroupId int32) apiGetCampaignGroupRequest { + return apiGetCampaignGroupRequest{ + apiService: a, + ctx: ctx, + campaignGroupId: campaignGroupId, } } /* Execute executes the request - @return InlineResponse2005 + @return CampaignGroup */ -func (r apiGetApplicationsRequest) Execute() (InlineResponse2005, *_nethttp.Response, error) { +func (r apiGetCampaignGroupRequest) Execute() (CampaignGroup, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2005 + localVarReturnValue CampaignGroup ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetApplications") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignGroup") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications" + localVarPath := localBasePath + "/v1/campaign_groups/{campaignGroupId}" + localVarPath = strings.Replace(localVarPath, "{"+"campaignGroupId"+"}", _neturl.QueryEscape(parameterToString(r.campaignGroupId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9486,7 +12487,7 @@ func (r apiGetApplicationsRequest) Execute() (InlineResponse2005, *_nethttp.Resp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2005 + var v CampaignGroup err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -9509,56 +12510,78 @@ func (r apiGetApplicationsRequest) Execute() (InlineResponse2005, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAttributeRequest struct { - ctx _context.Context - apiService *ManagementApiService - attributeId int32 +type apiGetCampaignGroupsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string } -/* -GetAttribute Get custom attribute -Retrieve the specified custom attribute. +func (r apiGetCampaignGroupsRequest) PageSize(pageSize int32) apiGetCampaignGroupsRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetCampaignGroupsRequest) Skip(skip int32) apiGetCampaignGroupsRequest { + r.skip = &skip + return r +} +func (r apiGetCampaignGroupsRequest) Sort(sort string) apiGetCampaignGroupsRequest { + r.sort = &sort + return r +} + +/* +GetCampaignGroups List campaign access groups +List the campaign access groups in the current account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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**. -@return apiGetAttributeRequest +@return apiGetCampaignGroupsRequest */ -func (a *ManagementApiService) GetAttribute(ctx _context.Context, attributeId int32) apiGetAttributeRequest { - return apiGetAttributeRequest{ - apiService: a, - ctx: ctx, - attributeId: attributeId, +func (a *ManagementApiService) GetCampaignGroups(ctx _context.Context) apiGetCampaignGroupsRequest { + return apiGetCampaignGroupsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return Attribute + @return InlineResponse20011 */ -func (r apiGetAttributeRequest) Execute() (Attribute, *_nethttp.Response, error) { +func (r apiGetCampaignGroupsRequest) Execute() (InlineResponse20011, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Attribute + localVarReturnValue InlineResponse20011 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAttribute") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignGroups") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/attributes/{attributeId}" - localVarPath = strings.Replace(localVarPath, "{"+"attributeId"+"}", _neturl.QueryEscape(parameterToString(r.attributeId, "")), -1) + localVarPath := localBasePath + "/v1/campaign_groups" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9626,7 +12649,7 @@ func (r apiGetAttributeRequest) Execute() (Attribute, *_nethttp.Response, error) error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Attribute + var v InlineResponse20011 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -9649,45 +12672,62 @@ func (r apiGetAttributeRequest) Execute() (Attribute, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAttributesRequest struct { +type apiGetCampaignTemplatesRequest struct { ctx _context.Context apiService *ManagementApiService pageSize *int32 skip *int32 sort *string - entity *string + state *string + name *string + tags *string + userId *int32 } -func (r apiGetAttributesRequest) PageSize(pageSize int32) apiGetAttributesRequest { +func (r apiGetCampaignTemplatesRequest) PageSize(pageSize int32) apiGetCampaignTemplatesRequest { r.pageSize = &pageSize return r } -func (r apiGetAttributesRequest) Skip(skip int32) apiGetAttributesRequest { +func (r apiGetCampaignTemplatesRequest) Skip(skip int32) apiGetCampaignTemplatesRequest { r.skip = &skip return r } -func (r apiGetAttributesRequest) Sort(sort string) apiGetAttributesRequest { +func (r apiGetCampaignTemplatesRequest) Sort(sort string) apiGetCampaignTemplatesRequest { r.sort = &sort return r } -func (r apiGetAttributesRequest) Entity(entity string) apiGetAttributesRequest { - r.entity = &entity +func (r apiGetCampaignTemplatesRequest) State(state string) apiGetCampaignTemplatesRequest { + r.state = &state + return r +} + +func (r apiGetCampaignTemplatesRequest) Name(name string) apiGetCampaignTemplatesRequest { + r.name = &name + return r +} + +func (r apiGetCampaignTemplatesRequest) Tags(tags string) apiGetCampaignTemplatesRequest { + r.tags = &tags + return r +} + +func (r apiGetCampaignTemplatesRequest) UserId(userId int32) apiGetCampaignTemplatesRequest { + r.userId = &userId return r } /* -GetAttributes List custom attributes -Return all the custom attributes for the account. - +GetCampaignTemplates List campaign templates +Retrieve a list of campaign templates. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetAttributesRequest +@return apiGetCampaignTemplatesRequest */ -func (a *ManagementApiService) GetAttributes(ctx _context.Context) apiGetAttributesRequest { - return apiGetAttributesRequest{ +func (a *ManagementApiService) GetCampaignTemplates(ctx _context.Context) apiGetCampaignTemplatesRequest { + return apiGetCampaignTemplatesRequest{ apiService: a, ctx: ctx, } @@ -9696,24 +12736,24 @@ func (a *ManagementApiService) GetAttributes(ctx _context.Context) apiGetAttribu /* Execute executes the request - @return InlineResponse20032 + @return InlineResponse20012 */ -func (r apiGetAttributesRequest) Execute() (InlineResponse20032, *_nethttp.Response, error) { +func (r apiGetCampaignTemplatesRequest) Execute() (InlineResponse20012, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20032 + localVarReturnValue InlineResponse20012 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAttributes") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignTemplates") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/attributes" + localVarPath := localBasePath + "/v1/campaign_templates" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -9728,8 +12768,17 @@ func (r apiGetAttributesRequest) Execute() (InlineResponse20032, *_nethttp.Respo if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } - if r.entity != nil { - localVarQueryParams.Add("entity", parameterToString(*r.entity, "")) + if r.state != nil { + localVarQueryParams.Add("state", parameterToString(*r.state, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.tags != nil { + localVarQueryParams.Add("tags", parameterToString(*r.tags, "")) + } + if r.userId != nil { + localVarQueryParams.Add("userId", parameterToString(*r.userId, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9798,7 +12847,7 @@ func (r apiGetAttributesRequest) Execute() (InlineResponse20032, *_nethttp.Respo error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20032 + var v InlineResponse20012 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -9821,71 +12870,117 @@ func (r apiGetAttributesRequest) Execute() (InlineResponse20032, *_nethttp.Respo return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAudiencesRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string - withTotalResultSize *bool +type apiGetCampaignsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + pageSize *int32 + skip *int32 + sort *string + campaignState *string + name *string + tags *string + createdBefore *time.Time + createdAfter *time.Time + campaignGroupId *int32 + templateId *int32 + storeId *int32 } -func (r apiGetAudiencesRequest) PageSize(pageSize int32) apiGetAudiencesRequest { +func (r apiGetCampaignsRequest) PageSize(pageSize int32) apiGetCampaignsRequest { r.pageSize = &pageSize return r } -func (r apiGetAudiencesRequest) Skip(skip int32) apiGetAudiencesRequest { +func (r apiGetCampaignsRequest) Skip(skip int32) apiGetCampaignsRequest { r.skip = &skip return r } -func (r apiGetAudiencesRequest) Sort(sort string) apiGetAudiencesRequest { +func (r apiGetCampaignsRequest) Sort(sort string) apiGetCampaignsRequest { r.sort = &sort return r } -func (r apiGetAudiencesRequest) WithTotalResultSize(withTotalResultSize bool) apiGetAudiencesRequest { - r.withTotalResultSize = &withTotalResultSize +func (r apiGetCampaignsRequest) CampaignState(campaignState string) apiGetCampaignsRequest { + r.campaignState = &campaignState + return r +} + +func (r apiGetCampaignsRequest) Name(name string) apiGetCampaignsRequest { + r.name = &name + return r +} + +func (r apiGetCampaignsRequest) Tags(tags string) apiGetCampaignsRequest { + r.tags = &tags + return r +} + +func (r apiGetCampaignsRequest) CreatedBefore(createdBefore time.Time) apiGetCampaignsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiGetCampaignsRequest) CreatedAfter(createdAfter time.Time) apiGetCampaignsRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiGetCampaignsRequest) CampaignGroupId(campaignGroupId int32) apiGetCampaignsRequest { + r.campaignGroupId = &campaignGroupId + return r +} + +func (r apiGetCampaignsRequest) TemplateId(templateId int32) apiGetCampaignsRequest { + r.templateId = &templateId + return r +} + +func (r apiGetCampaignsRequest) StoreId(storeId int32) apiGetCampaignsRequest { + r.storeId = &storeId return r } /* -GetAudiences List audiences -Get all audiences created in the account. To create an audience, use [Create audience](https://docs.talon.one/integration-api#tag/Audiences/operation/createAudienceV2). +GetCampaigns List campaigns +List the campaigns of the specified application that match your filter criteria. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetAudiencesRequest +@return apiGetCampaignsRequest */ -func (a *ManagementApiService) GetAudiences(ctx _context.Context) apiGetAudiencesRequest { - return apiGetAudiencesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetCampaigns(ctx _context.Context, applicationId int32) apiGetCampaignsRequest { + return apiGetCampaignsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return InlineResponse20030 + @return InlineResponse2006 */ -func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Response, error) { +func (r apiGetCampaignsRequest) Execute() (InlineResponse2006, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20030 + localVarReturnValue InlineResponse2006 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAudiences") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaigns") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/audiences" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -9900,8 +12995,29 @@ func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Respon if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } - if r.withTotalResultSize != nil { - localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + if r.campaignState != nil { + localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.tags != nil { + localVarQueryParams.Add("tags", parameterToString(*r.tags, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.campaignGroupId != nil { + localVarQueryParams.Add("campaignGroupId", parameterToString(*r.campaignGroupId, "")) + } + if r.templateId != nil { + localVarQueryParams.Add("templateId", parameterToString(*r.templateId, "")) + } + if r.storeId != nil { + localVarQueryParams.Add("storeId", parameterToString(*r.storeId, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -9970,7 +13086,17 @@ func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Respon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20030 + var v InlineResponse2006 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -9993,59 +13119,151 @@ func (r apiGetAudiencesRequest) Execute() (InlineResponse20030, *_nethttp.Respon return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCampaignRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 +type apiGetChangesRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string + applicationId *float32 + entityPath *string + userId *int32 + createdBefore *time.Time + createdAfter *time.Time + withTotalResultSize *bool + managementKeyId *int32 + includeOld *bool } -/* -GetCampaign Get campaign -Retrieve the given campaign. - - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. +func (r apiGetChangesRequest) PageSize(pageSize int32) apiGetChangesRequest { + r.pageSize = &pageSize + return r +} -@return apiGetCampaignRequest -*/ -func (a *ManagementApiService) GetCampaign(ctx _context.Context, applicationId int32, campaignId int32) apiGetCampaignRequest { - return apiGetCampaignRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, +func (r apiGetChangesRequest) Skip(skip int32) apiGetChangesRequest { + r.skip = &skip + return r +} + +func (r apiGetChangesRequest) Sort(sort string) apiGetChangesRequest { + r.sort = &sort + return r +} + +func (r apiGetChangesRequest) ApplicationId(applicationId float32) apiGetChangesRequest { + r.applicationId = &applicationId + return r +} + +func (r apiGetChangesRequest) EntityPath(entityPath string) apiGetChangesRequest { + r.entityPath = &entityPath + return r +} + +func (r apiGetChangesRequest) UserId(userId int32) apiGetChangesRequest { + r.userId = &userId + return r +} + +func (r apiGetChangesRequest) CreatedBefore(createdBefore time.Time) apiGetChangesRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiGetChangesRequest) CreatedAfter(createdAfter time.Time) apiGetChangesRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiGetChangesRequest) WithTotalResultSize(withTotalResultSize bool) apiGetChangesRequest { + r.withTotalResultSize = &withTotalResultSize + return r +} + +func (r apiGetChangesRequest) ManagementKeyId(managementKeyId int32) apiGetChangesRequest { + r.managementKeyId = &managementKeyId + return r +} + +func (r apiGetChangesRequest) IncludeOld(includeOld bool) apiGetChangesRequest { + r.includeOld = &includeOld + return r +} + +/* +GetChanges Get audit logs for an account +Retrieve the audit logs displayed in **Accounts > Audit logs**. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return apiGetChangesRequest +*/ +func (a *ManagementApiService) GetChanges(ctx _context.Context) apiGetChangesRequest { + return apiGetChangesRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return Campaign + @return InlineResponse20042 */ -func (r apiGetCampaignRequest) Execute() (Campaign, *_nethttp.Response, error) { +func (r apiGetChangesRequest) Execute() (InlineResponse20042, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Campaign + localVarReturnValue InlineResponse20042 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaign") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetChanges") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath := localBasePath + "/v1/changes" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.applicationId != nil { + localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) + } + if r.entityPath != nil { + localVarQueryParams.Add("entityPath", parameterToString(*r.entityPath, "")) + } + if r.userId != nil { + localVarQueryParams.Add("userId", parameterToString(*r.userId, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.withTotalResultSize != nil { + localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + } + if r.managementKeyId != nil { + localVarQueryParams.Add("managementKeyId", parameterToString(*r.managementKeyId, "")) + } + if r.includeOld != nil { + localVarQueryParams.Add("includeOld", parameterToString(*r.includeOld, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -10113,7 +13331,7 @@ func (r apiGetCampaignRequest) Execute() (Campaign, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Campaign + var v InlineResponse20042 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -10136,90 +13354,63 @@ func (r apiGetCampaignRequest) Execute() (Campaign, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCampaignAnalyticsRequest struct { +type apiGetCollectionRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 campaignId int32 - rangeStart *time.Time - rangeEnd *time.Time - granularity *string -} - -func (r apiGetCampaignAnalyticsRequest) RangeStart(rangeStart time.Time) apiGetCampaignAnalyticsRequest { - r.rangeStart = &rangeStart - return r -} - -func (r apiGetCampaignAnalyticsRequest) RangeEnd(rangeEnd time.Time) apiGetCampaignAnalyticsRequest { - r.rangeEnd = &rangeEnd - return r -} - -func (r apiGetCampaignAnalyticsRequest) Granularity(granularity string) apiGetCampaignAnalyticsRequest { - r.granularity = &granularity - return r + collectionId int32 } /* -GetCampaignAnalytics Get analytics of campaigns -Retrieve statistical data about the performance of the given campaign. +GetCollection Get campaign-level collection +Retrieve a given campaign-level collection. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. -@return apiGetCampaignAnalyticsRequest +@return apiGetCollectionRequest */ -func (a *ManagementApiService) GetCampaignAnalytics(ctx _context.Context, applicationId int32, campaignId int32) apiGetCampaignAnalyticsRequest { - return apiGetCampaignAnalyticsRequest{ +func (a *ManagementApiService) GetCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiGetCollectionRequest { + return apiGetCollectionRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, + collectionId: collectionId, } } /* Execute executes the request - @return InlineResponse20021 + @return Collection */ -func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20021, *_nethttp.Response, error) { +func (r apiGetCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20021 + localVarReturnValue Collection ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignAnalytics") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCollection") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/analytics" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") - } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") - } - - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) - if r.granularity != nil { - localVarQueryParams.Add("granularity", parameterToString(*r.granularity, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -10287,7 +13478,17 @@ func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20021, *_nethtt error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20021 + var v Collection + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -10310,104 +13511,78 @@ func (r apiGetCampaignAnalyticsRequest) Execute() (InlineResponse20021, *_nethtt return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCampaignByAttributesRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - body *CampaignSearch - pageSize *int32 - skip *int32 - sort *string - campaignState *string -} - -func (r apiGetCampaignByAttributesRequest) Body(body CampaignSearch) apiGetCampaignByAttributesRequest { - r.body = &body - return r +type apiGetCollectionItemsRequest struct { + ctx _context.Context + apiService *ManagementApiService + collectionId int32 + pageSize *int32 + skip *int32 } -func (r apiGetCampaignByAttributesRequest) PageSize(pageSize int32) apiGetCampaignByAttributesRequest { +func (r apiGetCollectionItemsRequest) PageSize(pageSize int32) apiGetCollectionItemsRequest { r.pageSize = &pageSize return r } -func (r apiGetCampaignByAttributesRequest) Skip(skip int32) apiGetCampaignByAttributesRequest { +func (r apiGetCollectionItemsRequest) Skip(skip int32) apiGetCollectionItemsRequest { r.skip = &skip return r } -func (r apiGetCampaignByAttributesRequest) Sort(sort string) apiGetCampaignByAttributesRequest { - r.sort = &sort - return r -} - -func (r apiGetCampaignByAttributesRequest) CampaignState(campaignState string) apiGetCampaignByAttributesRequest { - r.campaignState = &campaignState - return r -} - /* -GetCampaignByAttributes List campaigns that match the given attributes -Get a list of all the campaigns that match a set of attributes. +GetCollectionItems Get collection items +Retrieve items from a given collection. + +You can retrieve items from both account-level collections and campaign-level collections using this endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. -@return apiGetCampaignByAttributesRequest +@return apiGetCollectionItemsRequest */ -func (a *ManagementApiService) GetCampaignByAttributes(ctx _context.Context, applicationId int32) apiGetCampaignByAttributesRequest { - return apiGetCampaignByAttributesRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetCollectionItems(ctx _context.Context, collectionId int32) apiGetCollectionItemsRequest { + return apiGetCollectionItemsRequest{ + apiService: a, + ctx: ctx, + collectionId: collectionId, } } /* Execute executes the request - @return InlineResponse2006 + @return InlineResponse20018 */ -func (r apiGetCampaignByAttributesRequest) Execute() (InlineResponse2006, *_nethttp.Response, error) { +func (r apiGetCollectionItemsRequest) Execute() (InlineResponse20018, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2006 + localVarReturnValue InlineResponse20018 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignByAttributes") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCollectionItems") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns_search" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/collections/{collectionId}/items" + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.campaignState != nil { - localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -10423,8 +13598,6 @@ func (r apiGetCampaignByAttributesRequest) Execute() (InlineResponse2006, *_neth if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -10475,7 +13648,17 @@ func (r apiGetCampaignByAttributesRequest) Execute() (InlineResponse2006, *_neth error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2006 + var v InlineResponse20018 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -10486,100 +13669,139 @@ func (r apiGetCampaignByAttributesRequest) Execute() (InlineResponse2006, *_neth return localVarReturnValue, localVarHTTPResponse, newErr } - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiGetCouponsWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + pageSize *int32 + skip *int32 + sort *string + value *string + createdBefore *time.Time + createdAfter *time.Time + valid *string + usable *string + referralId *int32 + recipientIntegrationId *string + batchId *string + exactMatch *bool +} + +func (r apiGetCouponsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetCouponsWithoutTotalCountRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetCouponsWithoutTotalCountRequest) Skip(skip int32) apiGetCouponsWithoutTotalCountRequest { + r.skip = &skip + return r +} + +func (r apiGetCouponsWithoutTotalCountRequest) Sort(sort string) apiGetCouponsWithoutTotalCountRequest { + r.sort = &sort + return r +} - return localVarReturnValue, localVarHTTPResponse, nil +func (r apiGetCouponsWithoutTotalCountRequest) Value(value string) apiGetCouponsWithoutTotalCountRequest { + r.value = &value + return r } -type apiGetCampaignTemplatesRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string - state *string - name *string - tags *string - userId *int32 +func (r apiGetCouponsWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiGetCouponsWithoutTotalCountRequest { + r.createdBefore = &createdBefore + return r } -func (r apiGetCampaignTemplatesRequest) PageSize(pageSize int32) apiGetCampaignTemplatesRequest { - r.pageSize = &pageSize +func (r apiGetCouponsWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiGetCouponsWithoutTotalCountRequest { + r.createdAfter = &createdAfter return r } -func (r apiGetCampaignTemplatesRequest) Skip(skip int32) apiGetCampaignTemplatesRequest { - r.skip = &skip +func (r apiGetCouponsWithoutTotalCountRequest) Valid(valid string) apiGetCouponsWithoutTotalCountRequest { + r.valid = &valid return r } -func (r apiGetCampaignTemplatesRequest) Sort(sort string) apiGetCampaignTemplatesRequest { - r.sort = &sort +func (r apiGetCouponsWithoutTotalCountRequest) Usable(usable string) apiGetCouponsWithoutTotalCountRequest { + r.usable = &usable return r } -func (r apiGetCampaignTemplatesRequest) State(state string) apiGetCampaignTemplatesRequest { - r.state = &state +func (r apiGetCouponsWithoutTotalCountRequest) ReferralId(referralId int32) apiGetCouponsWithoutTotalCountRequest { + r.referralId = &referralId return r } -func (r apiGetCampaignTemplatesRequest) Name(name string) apiGetCampaignTemplatesRequest { - r.name = &name +func (r apiGetCouponsWithoutTotalCountRequest) RecipientIntegrationId(recipientIntegrationId string) apiGetCouponsWithoutTotalCountRequest { + r.recipientIntegrationId = &recipientIntegrationId return r } -func (r apiGetCampaignTemplatesRequest) Tags(tags string) apiGetCampaignTemplatesRequest { - r.tags = &tags +func (r apiGetCouponsWithoutTotalCountRequest) BatchId(batchId string) apiGetCouponsWithoutTotalCountRequest { + r.batchId = &batchId return r } -func (r apiGetCampaignTemplatesRequest) UserId(userId int32) apiGetCampaignTemplatesRequest { - r.userId = &userId +func (r apiGetCouponsWithoutTotalCountRequest) ExactMatch(exactMatch bool) apiGetCouponsWithoutTotalCountRequest { + r.exactMatch = &exactMatch return r } /* -GetCampaignTemplates List campaign templates -Retrieve a list of campaign templates. +GetCouponsWithoutTotalCount List coupons +List all the coupons matching the specified criteria. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiGetCampaignTemplatesRequest +@return apiGetCouponsWithoutTotalCountRequest */ -func (a *ManagementApiService) GetCampaignTemplates(ctx _context.Context) apiGetCampaignTemplatesRequest { - return apiGetCampaignTemplatesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetCouponsWithoutTotalCount(ctx _context.Context, applicationId int32, campaignId int32) apiGetCouponsWithoutTotalCountRequest { + return apiGetCouponsWithoutTotalCountRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return InlineResponse20011 + @return InlineResponse2009 */ -func (r apiGetCampaignTemplatesRequest) Execute() (InlineResponse20011, *_nethttp.Response, error) { +func (r apiGetCouponsWithoutTotalCountRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20011 + localVarReturnValue InlineResponse2009 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaignTemplates") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCouponsWithoutTotalCount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/campaign_templates" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -10594,17 +13816,32 @@ func (r apiGetCampaignTemplatesRequest) Execute() (InlineResponse20011, *_nethtt if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } - if r.state != nil { - localVarQueryParams.Add("state", parameterToString(*r.state, "")) + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) } - if r.tags != nil { - localVarQueryParams.Add("tags", parameterToString(*r.tags, "")) + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) } - if r.userId != nil { - localVarQueryParams.Add("userId", parameterToString(*r.userId, "")) + if r.valid != nil { + localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) + } + if r.usable != nil { + localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) + } + if r.referralId != nil { + localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) + } + if r.recipientIntegrationId != nil { + localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) + } + if r.batchId != nil { + localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) + } + if r.exactMatch != nil { + localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -10673,7 +13910,7 @@ func (r apiGetCampaignTemplatesRequest) Execute() (InlineResponse20011, *_nethtt error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20011 + var v InlineResponse2009 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -10696,155 +13933,99 @@ func (r apiGetCampaignTemplatesRequest) Execute() (InlineResponse20011, *_nethtt return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCampaignsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - pageSize *int32 - skip *int32 - sort *string - campaignState *string - name *string - tags *string - createdBefore *time.Time - createdAfter *time.Time - campaignGroupId *int32 - templateId *int32 - storeId *int32 -} - -func (r apiGetCampaignsRequest) PageSize(pageSize int32) apiGetCampaignsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetCampaignsRequest) Skip(skip int32) apiGetCampaignsRequest { - r.skip = &skip - return r -} - -func (r apiGetCampaignsRequest) Sort(sort string) apiGetCampaignsRequest { - r.sort = &sort - return r -} - -func (r apiGetCampaignsRequest) CampaignState(campaignState string) apiGetCampaignsRequest { - r.campaignState = &campaignState - return r -} - -func (r apiGetCampaignsRequest) Name(name string) apiGetCampaignsRequest { - r.name = &name - return r -} - -func (r apiGetCampaignsRequest) Tags(tags string) apiGetCampaignsRequest { - r.tags = &tags - return r -} - -func (r apiGetCampaignsRequest) CreatedBefore(createdBefore time.Time) apiGetCampaignsRequest { - r.createdBefore = &createdBefore - return r +type apiGetCustomerActivityReportRequest struct { + ctx _context.Context + apiService *ManagementApiService + rangeStart *time.Time + rangeEnd *time.Time + applicationId int32 + customerId int32 + pageSize *int32 + skip *int32 } -func (r apiGetCampaignsRequest) CreatedAfter(createdAfter time.Time) apiGetCampaignsRequest { - r.createdAfter = &createdAfter +func (r apiGetCustomerActivityReportRequest) RangeStart(rangeStart time.Time) apiGetCustomerActivityReportRequest { + r.rangeStart = &rangeStart return r } -func (r apiGetCampaignsRequest) CampaignGroupId(campaignGroupId int32) apiGetCampaignsRequest { - r.campaignGroupId = &campaignGroupId +func (r apiGetCustomerActivityReportRequest) RangeEnd(rangeEnd time.Time) apiGetCustomerActivityReportRequest { + r.rangeEnd = &rangeEnd return r } -func (r apiGetCampaignsRequest) TemplateId(templateId int32) apiGetCampaignsRequest { - r.templateId = &templateId +func (r apiGetCustomerActivityReportRequest) PageSize(pageSize int32) apiGetCustomerActivityReportRequest { + r.pageSize = &pageSize return r } -func (r apiGetCampaignsRequest) StoreId(storeId int32) apiGetCampaignsRequest { - r.storeId = &storeId +func (r apiGetCustomerActivityReportRequest) Skip(skip int32) apiGetCustomerActivityReportRequest { + r.skip = &skip return r } /* -GetCampaigns List campaigns -List the campaigns of the specified application that match your filter criteria. - +GetCustomerActivityReport Get customer's activity report +Fetch the summary report of a given customer in the given application, in a time range. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param 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. -@return apiGetCampaignsRequest +@return apiGetCustomerActivityReportRequest */ -func (a *ManagementApiService) GetCampaigns(ctx _context.Context, applicationId int32) apiGetCampaignsRequest { - return apiGetCampaignsRequest{ +func (a *ManagementApiService) GetCustomerActivityReport(ctx _context.Context, applicationId int32, customerId int32) apiGetCustomerActivityReportRequest { + return apiGetCustomerActivityReportRequest{ apiService: a, ctx: ctx, applicationId: applicationId, + customerId: customerId, } } /* Execute executes the request - @return InlineResponse2006 + @return CustomerActivityReport */ -func (r apiGetCampaignsRequest) Execute() (InlineResponse2006, *_nethttp.Response, error) { +func (r apiGetCustomerActivityReportRequest) Execute() (CustomerActivityReport, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2006 + localVarReturnValue CustomerActivityReport ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCampaigns") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerActivityReport") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns" + localVarPath := localBasePath + "/v1/applications/{applicationId}/customer_activity_reports/{customerId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.rangeStart == nil { + return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + } + + if r.rangeEnd == nil { + return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + } + if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.campaignState != nil { - localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.tags != nil { - localVarQueryParams.Add("tags", parameterToString(*r.tags, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.campaignGroupId != nil { - localVarQueryParams.Add("campaignGroupId", parameterToString(*r.campaignGroupId, "")) - } - if r.templateId != nil { - localVarQueryParams.Add("templateId", parameterToString(*r.templateId, "")) - } - if r.storeId != nil { - localVarQueryParams.Add("storeId", parameterToString(*r.storeId, "")) - } + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -10912,17 +14093,7 @@ func (r apiGetCampaignsRequest) Execute() (InlineResponse2006, *_nethttp.Respons error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2006 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus + var v CustomerActivityReport err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -10945,118 +14116,119 @@ func (r apiGetCampaignsRequest) Execute() (InlineResponse2006, *_nethttp.Respons return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetChangesRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string - applicationId *float32 - entityPath *string - userId *int32 - createdBefore *time.Time - createdAfter *time.Time - withTotalResultSize *bool - managementKeyId *int32 - includeOld *bool -} - -func (r apiGetChangesRequest) PageSize(pageSize int32) apiGetChangesRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetChangesRequest) Skip(skip int32) apiGetChangesRequest { - r.skip = &skip - return r +type apiGetCustomerActivityReportsWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + rangeStart *time.Time + rangeEnd *time.Time + applicationId int32 + pageSize *int32 + skip *int32 + sort *string + name *string + integrationId *string + campaignName *string + advocateName *string } -func (r apiGetChangesRequest) Sort(sort string) apiGetChangesRequest { - r.sort = &sort +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) RangeStart(rangeStart time.Time) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.rangeStart = &rangeStart return r } -func (r apiGetChangesRequest) ApplicationId(applicationId float32) apiGetChangesRequest { - r.applicationId = &applicationId +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) RangeEnd(rangeEnd time.Time) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.rangeEnd = &rangeEnd return r } -func (r apiGetChangesRequest) EntityPath(entityPath string) apiGetChangesRequest { - r.entityPath = &entityPath +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.pageSize = &pageSize return r } -func (r apiGetChangesRequest) UserId(userId int32) apiGetChangesRequest { - r.userId = &userId +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Skip(skip int32) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.skip = &skip return r } -func (r apiGetChangesRequest) CreatedBefore(createdBefore time.Time) apiGetChangesRequest { - r.createdBefore = &createdBefore +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Sort(sort string) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.sort = &sort return r } -func (r apiGetChangesRequest) CreatedAfter(createdAfter time.Time) apiGetChangesRequest { - r.createdAfter = &createdAfter +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Name(name string) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.name = &name return r } -func (r apiGetChangesRequest) WithTotalResultSize(withTotalResultSize bool) apiGetChangesRequest { - r.withTotalResultSize = &withTotalResultSize +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) IntegrationId(integrationId string) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.integrationId = &integrationId return r } -func (r apiGetChangesRequest) ManagementKeyId(managementKeyId int32) apiGetChangesRequest { - r.managementKeyId = &managementKeyId +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) CampaignName(campaignName string) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.campaignName = &campaignName return r } -func (r apiGetChangesRequest) IncludeOld(includeOld bool) apiGetChangesRequest { - r.includeOld = &includeOld +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) AdvocateName(advocateName string) apiGetCustomerActivityReportsWithoutTotalCountRequest { + r.advocateName = &advocateName return r } /* -GetChanges Get audit logs for an account -Retrieve the audit logs displayed in **Accounts > Audit logs**. +GetCustomerActivityReportsWithoutTotalCount 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. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetChangesRequest +@return apiGetCustomerActivityReportsWithoutTotalCountRequest */ -func (a *ManagementApiService) GetChanges(ctx _context.Context) apiGetChangesRequest { - return apiGetChangesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetCustomerActivityReportsWithoutTotalCount(ctx _context.Context, applicationId int32) apiGetCustomerActivityReportsWithoutTotalCountRequest { + return apiGetCustomerActivityReportsWithoutTotalCountRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return InlineResponse20040 + @return InlineResponse20026 */ -func (r apiGetChangesRequest) Execute() (InlineResponse20040, *_nethttp.Response, error) { +func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (InlineResponse20026, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20040 + localVarReturnValue InlineResponse20026 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetChanges") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerActivityReportsWithoutTotalCount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/changes" + localVarPath := localBasePath + "/v1/applications/{applicationId}/customer_activity_reports/no_total" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.rangeStart == nil { + return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") + } + + if r.rangeEnd == nil { + return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + } + if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } @@ -11066,29 +14238,19 @@ func (r apiGetChangesRequest) Execute() (InlineResponse20040, *_nethttp.Response if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } - if r.applicationId != nil { - localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) - } - if r.entityPath != nil { - localVarQueryParams.Add("entityPath", parameterToString(*r.entityPath, "")) - } - if r.userId != nil { - localVarQueryParams.Add("userId", parameterToString(*r.userId, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) + localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) } - if r.withTotalResultSize != nil { - localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + if r.integrationId != nil { + localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) } - if r.managementKeyId != nil { - localVarQueryParams.Add("managementKeyId", parameterToString(*r.managementKeyId, "")) + if r.campaignName != nil { + localVarQueryParams.Add("campaignName", parameterToString(*r.campaignName, "")) } - if r.includeOld != nil { - localVarQueryParams.Add("includeOld", parameterToString(*r.includeOld, "")) + if r.advocateName != nil { + localVarQueryParams.Add("advocateName", parameterToString(*r.advocateName, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -11157,7 +14319,7 @@ func (r apiGetChangesRequest) Execute() (InlineResponse20040, *_nethttp.Response error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20040 + var v InlineResponse20026 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -11180,63 +14342,86 @@ func (r apiGetChangesRequest) Execute() (InlineResponse20040, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCollectionRequest struct { +type apiGetCustomerAnalyticsRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - campaignId int32 - collectionId int32 + customerId int32 + pageSize *int32 + skip *int32 + sort *string +} + +func (r apiGetCustomerAnalyticsRequest) PageSize(pageSize int32) apiGetCustomerAnalyticsRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetCustomerAnalyticsRequest) Skip(skip int32) apiGetCustomerAnalyticsRequest { + r.skip = &skip + return r +} + +func (r apiGetCustomerAnalyticsRequest) Sort(sort string) apiGetCustomerAnalyticsRequest { + r.sort = &sort + return r } /* -GetCollection Get campaign-level collection -Retrieve a given campaign-level collection. +GetCustomerAnalytics Get customer's analytics report +Fetch analytics for a given customer in the given application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. + - @param 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. -@return apiGetCollectionRequest +@return apiGetCustomerAnalyticsRequest */ -func (a *ManagementApiService) GetCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiGetCollectionRequest { - return apiGetCollectionRequest{ +func (a *ManagementApiService) GetCustomerAnalytics(ctx _context.Context, applicationId int32, customerId int32) apiGetCustomerAnalyticsRequest { + return apiGetCustomerAnalyticsRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - campaignId: campaignId, - collectionId: collectionId, + customerId: customerId, } } /* Execute executes the request - @return Collection + @return CustomerAnalytics */ -func (r apiGetCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { +func (r apiGetCustomerAnalyticsRequest) Execute() (CustomerAnalytics, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Collection + localVarReturnValue CustomerAnalytics ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerAnalytics") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/customers/{customerId}/analytics" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -11304,17 +14489,7 @@ func (r apiGetCollectionRequest) Execute() (Collection, *_nethttp.Response, erro error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Collection - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v CustomerAnalytics err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -11337,76 +14512,68 @@ func (r apiGetCollectionRequest) Execute() (Collection, *_nethttp.Response, erro return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCollectionItemsRequest struct { - ctx _context.Context - apiService *ManagementApiService - collectionId int32 - pageSize *int32 - skip *int32 +type apiGetCustomerProfileRequest struct { + ctx _context.Context + apiService *ManagementApiService + customerId int32 } -func (r apiGetCollectionItemsRequest) PageSize(pageSize int32) apiGetCollectionItemsRequest { - r.pageSize = &pageSize - return r -} +/* +GetCustomerProfile Get customer profile +Return the details of the specified customer profile. -func (r apiGetCollectionItemsRequest) Skip(skip int32) apiGetCollectionItemsRequest { - r.skip = &skip - return r -} +
-/* -GetCollectionItems Get collection items -Retrieve items from a given collection. +

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`. -You can retrieve items from both account-level collections and campaign-level collections using this endpoint. +
- @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + - @param 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. -@return apiGetCollectionItemsRequest +@return apiGetCustomerProfileRequest */ -func (a *ManagementApiService) GetCollectionItems(ctx _context.Context, collectionId int32) apiGetCollectionItemsRequest { - return apiGetCollectionItemsRequest{ - apiService: a, - ctx: ctx, - collectionId: collectionId, +func (a *ManagementApiService) GetCustomerProfile(ctx _context.Context, customerId int32) apiGetCustomerProfileRequest { + return apiGetCustomerProfileRequest{ + apiService: a, + ctx: ctx, + customerId: customerId, } } /* Execute executes the request - @return InlineResponse20017 + @return CustomerProfile */ -func (r apiGetCollectionItemsRequest) Execute() (InlineResponse20017, *_nethttp.Response, error) { +func (r apiGetCustomerProfileRequest) Execute() (CustomerProfile, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20017 + localVarReturnValue CustomerProfile ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCollectionItems") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfile") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections/{collectionId}/items" - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/customers/{customerId}" + localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -11474,17 +14641,7 @@ func (r apiGetCollectionItemsRequest) Execute() (InlineResponse20017, *_nethttp. error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20017 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v CustomerProfile err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -11507,127 +14664,79 @@ func (r apiGetCollectionItemsRequest) Execute() (InlineResponse20017, *_nethttp. return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCouponsWithoutTotalCountRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - pageSize *int32 - skip *int32 - sort *string - value *string - createdBefore *time.Time - createdAfter *time.Time - valid *string - usable *string - referralId *int32 - recipientIntegrationId *string - batchId *string - exactMatch *bool +type apiGetCustomerProfileAchievementProgressRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + integrationId string + pageSize *int32 + skip *int32 + achievementId *int32 + title *string } -func (r apiGetCouponsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetCouponsWithoutTotalCountRequest { +func (r apiGetCustomerProfileAchievementProgressRequest) PageSize(pageSize int32) apiGetCustomerProfileAchievementProgressRequest { r.pageSize = &pageSize return r } -func (r apiGetCouponsWithoutTotalCountRequest) Skip(skip int32) apiGetCouponsWithoutTotalCountRequest { +func (r apiGetCustomerProfileAchievementProgressRequest) Skip(skip int32) apiGetCustomerProfileAchievementProgressRequest { r.skip = &skip return r } -func (r apiGetCouponsWithoutTotalCountRequest) Sort(sort string) apiGetCouponsWithoutTotalCountRequest { - r.sort = &sort - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) Value(value string) apiGetCouponsWithoutTotalCountRequest { - r.value = &value - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiGetCouponsWithoutTotalCountRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiGetCouponsWithoutTotalCountRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) Valid(valid string) apiGetCouponsWithoutTotalCountRequest { - r.valid = &valid - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) Usable(usable string) apiGetCouponsWithoutTotalCountRequest { - r.usable = &usable - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) ReferralId(referralId int32) apiGetCouponsWithoutTotalCountRequest { - r.referralId = &referralId - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) RecipientIntegrationId(recipientIntegrationId string) apiGetCouponsWithoutTotalCountRequest { - r.recipientIntegrationId = &recipientIntegrationId - return r -} - -func (r apiGetCouponsWithoutTotalCountRequest) BatchId(batchId string) apiGetCouponsWithoutTotalCountRequest { - r.batchId = &batchId +func (r apiGetCustomerProfileAchievementProgressRequest) AchievementId(achievementId int32) apiGetCustomerProfileAchievementProgressRequest { + r.achievementId = &achievementId return r } -func (r apiGetCouponsWithoutTotalCountRequest) ExactMatch(exactMatch bool) apiGetCouponsWithoutTotalCountRequest { - r.exactMatch = &exactMatch +func (r apiGetCustomerProfileAchievementProgressRequest) Title(title string) apiGetCustomerProfileAchievementProgressRequest { + r.title = &title return r } /* -GetCouponsWithoutTotalCount List coupons -List all the coupons matching the specified criteria. +GetCustomerProfileAchievementProgress List customer achievements +For the given customer profile, list all the achievements that match your filter criteria. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param integrationId The identifier of the profile. -@return apiGetCouponsWithoutTotalCountRequest +@return apiGetCustomerProfileAchievementProgressRequest */ -func (a *ManagementApiService) GetCouponsWithoutTotalCount(ctx _context.Context, applicationId int32, campaignId int32) apiGetCouponsWithoutTotalCountRequest { - return apiGetCouponsWithoutTotalCountRequest{ +func (a *ManagementApiService) GetCustomerProfileAchievementProgress(ctx _context.Context, applicationId int32, integrationId string) apiGetCustomerProfileAchievementProgressRequest { + return apiGetCustomerProfileAchievementProgressRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - campaignId: campaignId, + integrationId: integrationId, } } /* Execute executes the request - @return InlineResponse2009 + @return InlineResponse20047 */ -func (r apiGetCouponsWithoutTotalCountRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { +func (r apiGetCustomerProfileAchievementProgressRequest) Execute() (InlineResponse20047, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2009 + localVarReturnValue InlineResponse20047 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCouponsWithoutTotalCount") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfileAchievementProgress") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/no_total" + localVarPath := localBasePath + "/v1/applications/{applicationId}/achievement_progress/{integrationId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -11639,35 +14748,11 @@ func (r apiGetCouponsWithoutTotalCountRequest) Execute() (InlineResponse2009, *_ if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.value != nil { - localVarQueryParams.Add("value", parameterToString(*r.value, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.valid != nil { - localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) - } - if r.usable != nil { - localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) - } - if r.referralId != nil { - localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) - } - if r.recipientIntegrationId != nil { - localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) - } - if r.batchId != nil { - localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) + if r.achievementId != nil { + localVarQueryParams.Add("achievementId", parameterToString(*r.achievementId, "")) } - if r.exactMatch != nil { - localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) + if r.title != nil { + localVarQueryParams.Add("title", parameterToString(*r.title, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -11736,7 +14821,27 @@ func (r apiGetCouponsWithoutTotalCountRequest) Execute() (InlineResponse2009, *_ error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2009 + var v InlineResponse20047 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -11759,99 +14864,78 @@ func (r apiGetCouponsWithoutTotalCountRequest) Execute() (InlineResponse2009, *_ return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCustomerActivityReportRequest struct { - ctx _context.Context - apiService *ManagementApiService - rangeStart *time.Time - rangeEnd *time.Time - applicationId int32 - customerId int32 - pageSize *int32 - skip *int32 -} - -func (r apiGetCustomerActivityReportRequest) RangeStart(rangeStart time.Time) apiGetCustomerActivityReportRequest { - r.rangeStart = &rangeStart - return r +type apiGetCustomerProfilesRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sandbox *bool } -func (r apiGetCustomerActivityReportRequest) RangeEnd(rangeEnd time.Time) apiGetCustomerActivityReportRequest { - r.rangeEnd = &rangeEnd +func (r apiGetCustomerProfilesRequest) PageSize(pageSize int32) apiGetCustomerProfilesRequest { + r.pageSize = &pageSize return r } -func (r apiGetCustomerActivityReportRequest) PageSize(pageSize int32) apiGetCustomerActivityReportRequest { - r.pageSize = &pageSize +func (r apiGetCustomerProfilesRequest) Skip(skip int32) apiGetCustomerProfilesRequest { + r.skip = &skip return r } -func (r apiGetCustomerActivityReportRequest) Skip(skip int32) apiGetCustomerActivityReportRequest { - r.skip = &skip +func (r apiGetCustomerProfilesRequest) Sandbox(sandbox bool) apiGetCustomerProfilesRequest { + r.sandbox = &sandbox return r } /* -GetCustomerActivityReport Get customer's activity report -Fetch the summary report of a given customer in the given application, in a time range. +GetCustomerProfiles List customer profiles +List all customer profiles. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param 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. -@return apiGetCustomerActivityReportRequest +@return apiGetCustomerProfilesRequest */ -func (a *ManagementApiService) GetCustomerActivityReport(ctx _context.Context, applicationId int32, customerId int32) apiGetCustomerActivityReportRequest { - return apiGetCustomerActivityReportRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - customerId: customerId, +func (a *ManagementApiService) GetCustomerProfiles(ctx _context.Context) apiGetCustomerProfilesRequest { + return apiGetCustomerProfilesRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return CustomerActivityReport + @return InlineResponse20025 */ -func (r apiGetCustomerActivityReportRequest) Execute() (CustomerActivityReport, *_nethttp.Response, error) { +func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20025, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue CustomerActivityReport + localVarReturnValue InlineResponse20025 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerActivityReport") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfiles") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/customer_activity_reports/{customerId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) + localVarPath := localBasePath + "/v1/customers/no_total" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") - } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") - } - if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) + if r.sandbox != nil { + localVarQueryParams.Add("sandbox", parameterToString(*r.sandbox, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -11919,7 +15003,7 @@ func (r apiGetCustomerActivityReportRequest) Execute() (CustomerActivityReport, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v CustomerActivityReport + var v InlineResponse20025 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -11942,117 +15026,80 @@ func (r apiGetCustomerActivityReportRequest) Execute() (CustomerActivityReport, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCustomerActivityReportsWithoutTotalCountRequest struct { - ctx _context.Context - apiService *ManagementApiService - rangeStart *time.Time - rangeEnd *time.Time - applicationId int32 - pageSize *int32 - skip *int32 - sort *string - name *string - integrationId *string - campaignName *string - advocateName *string -} - -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) RangeStart(rangeStart time.Time) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.rangeStart = &rangeStart - return r +type apiGetCustomersByAttributesRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *CustomerProfileSearchQuery + pageSize *int32 + skip *int32 + sandbox *bool } -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) RangeEnd(rangeEnd time.Time) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.rangeEnd = &rangeEnd +func (r apiGetCustomersByAttributesRequest) Body(body CustomerProfileSearchQuery) apiGetCustomersByAttributesRequest { + r.body = &body return r } -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetCustomerActivityReportsWithoutTotalCountRequest { +func (r apiGetCustomersByAttributesRequest) PageSize(pageSize int32) apiGetCustomersByAttributesRequest { r.pageSize = &pageSize return r } -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Skip(skip int32) apiGetCustomerActivityReportsWithoutTotalCountRequest { +func (r apiGetCustomersByAttributesRequest) Skip(skip int32) apiGetCustomersByAttributesRequest { r.skip = &skip return r } -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Sort(sort string) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.sort = &sort - return r -} - -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Name(name string) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.name = &name - return r -} - -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) IntegrationId(integrationId string) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.integrationId = &integrationId - return r -} - -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) CampaignName(campaignName string) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.campaignName = &campaignName - return r -} - -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) AdvocateName(advocateName string) apiGetCustomerActivityReportsWithoutTotalCountRequest { - r.advocateName = &advocateName +func (r apiGetCustomersByAttributesRequest) Sandbox(sandbox bool) apiGetCustomersByAttributesRequest { + r.sandbox = &sandbox return r } /* -GetCustomerActivityReportsWithoutTotalCount 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. +GetCustomersByAttributes List customer profiles matching the given attributes +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. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiGetCustomerActivityReportsWithoutTotalCountRequest +@return apiGetCustomersByAttributesRequest */ -func (a *ManagementApiService) GetCustomerActivityReportsWithoutTotalCount(ctx _context.Context, applicationId int32) apiGetCustomerActivityReportsWithoutTotalCountRequest { - return apiGetCustomerActivityReportsWithoutTotalCountRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) GetCustomersByAttributes(ctx _context.Context) apiGetCustomersByAttributesRequest { + return apiGetCustomersByAttributesRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return InlineResponse20026 + @return InlineResponse20024 */ -func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (InlineResponse20026, *_nethttp.Response, error) { +func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20026 + localVarReturnValue InlineResponse20024 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerActivityReportsWithoutTotalCount") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomersByAttributes") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/customer_activity_reports/no_total" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/customer_search/no_total" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.rangeStart == nil { - return localVarReturnValue, nil, reportError("rangeStart is required and must be specified") - } - - if r.rangeEnd == nil { - return localVarReturnValue, nil, reportError("rangeEnd is required and must be specified") + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") } if r.pageSize != nil { @@ -12061,25 +15108,11 @@ func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (Inline if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - localVarQueryParams.Add("rangeStart", parameterToString(*r.rangeStart, "")) - localVarQueryParams.Add("rangeEnd", parameterToString(*r.rangeEnd, "")) - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.integrationId != nil { - localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) - } - if r.campaignName != nil { - localVarQueryParams.Add("campaignName", parameterToString(*r.campaignName, "")) - } - if r.advocateName != nil { - localVarQueryParams.Add("advocateName", parameterToString(*r.advocateName, "")) + if r.sandbox != nil { + localVarQueryParams.Add("sandbox", parameterToString(*r.sandbox, "")) } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -12095,6 +15128,8 @@ func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (Inline if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -12145,7 +15180,7 @@ func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (Inline error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20026 + var v InlineResponse20024 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -12168,77 +15203,88 @@ func (r apiGetCustomerActivityReportsWithoutTotalCountRequest) Execute() (Inline return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCustomerAnalyticsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - customerId int32 - pageSize *int32 - skip *int32 - sort *string +type apiGetEventTypesRequest struct { + ctx _context.Context + apiService *ManagementApiService + name *string + includeOldVersions *bool + pageSize *int32 + skip *int32 + sort *string } -func (r apiGetCustomerAnalyticsRequest) PageSize(pageSize int32) apiGetCustomerAnalyticsRequest { +func (r apiGetEventTypesRequest) Name(name string) apiGetEventTypesRequest { + r.name = &name + return r +} + +func (r apiGetEventTypesRequest) IncludeOldVersions(includeOldVersions bool) apiGetEventTypesRequest { + r.includeOldVersions = &includeOldVersions + return r +} + +func (r apiGetEventTypesRequest) PageSize(pageSize int32) apiGetEventTypesRequest { r.pageSize = &pageSize return r } -func (r apiGetCustomerAnalyticsRequest) Skip(skip int32) apiGetCustomerAnalyticsRequest { +func (r apiGetEventTypesRequest) Skip(skip int32) apiGetEventTypesRequest { r.skip = &skip return r } -func (r apiGetCustomerAnalyticsRequest) Sort(sort string) apiGetCustomerAnalyticsRequest { +func (r apiGetEventTypesRequest) Sort(sort string) apiGetEventTypesRequest { r.sort = &sort return r } /* -GetCustomerAnalytics Get customer's analytics report -Fetch analytics for a given customer in the given application. +GetEventTypes List event types +Fetch all event type definitions for your account. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param 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. -@return apiGetCustomerAnalyticsRequest +@return apiGetEventTypesRequest */ -func (a *ManagementApiService) GetCustomerAnalytics(ctx _context.Context, applicationId int32, customerId int32) apiGetCustomerAnalyticsRequest { - return apiGetCustomerAnalyticsRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - customerId: customerId, +func (a *ManagementApiService) GetEventTypes(ctx _context.Context) apiGetEventTypesRequest { + return apiGetEventTypesRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return CustomerAnalytics + @return InlineResponse20040 */ -func (r apiGetCustomerAnalyticsRequest) Execute() (CustomerAnalytics, *_nethttp.Response, error) { +func (r apiGetEventTypesRequest) Execute() (InlineResponse20040, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue CustomerAnalytics + localVarReturnValue InlineResponse20040 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerAnalytics") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetEventTypes") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/customers/{customerId}/analytics" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) + localVarPath := localBasePath + "/v1/event_types" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } + if r.includeOldVersions != nil { + localVarQueryParams.Add("includeOldVersions", parameterToString(*r.includeOldVersions, "")) + } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } @@ -12315,7 +15361,7 @@ func (r apiGetCustomerAnalyticsRequest) Execute() (CustomerAnalytics, *_nethttp. error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v CustomerAnalytics + var v InlineResponse20040 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -12338,68 +15384,97 @@ func (r apiGetCustomerAnalyticsRequest) Execute() (CustomerAnalytics, *_nethttp. return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCustomerProfileRequest struct { - ctx _context.Context - apiService *ManagementApiService - customerId int32 +type apiGetExportsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + applicationId *float32 + campaignId *int32 + entity *string } -/* -GetCustomerProfile Get customer profile -Return the details of the specified customer profile. +func (r apiGetExportsRequest) PageSize(pageSize int32) apiGetExportsRequest { + r.pageSize = &pageSize + return r +} -
+func (r apiGetExportsRequest) Skip(skip int32) apiGetExportsRequest { + r.skip = &skip + return r +} -

Performance tips

+func (r apiGetExportsRequest) ApplicationId(applicationId float32) apiGetExportsRequest { + r.applicationId = &applicationId + return r +} - You can retrieve the same information via the Integration API, which can save you extra API requests. consider these options: +func (r apiGetExportsRequest) CampaignId(campaignId int32) apiGetExportsRequest { + r.campaignId = &campaignId + return r +} - - 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`. +func (r apiGetExportsRequest) Entity(entity string) apiGetExportsRequest { + r.entity = &entity + return r +} -
+/* +GetExports Get exports +List all past exports - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. -@return apiGetCustomerProfileRequest +@return apiGetExportsRequest */ -func (a *ManagementApiService) GetCustomerProfile(ctx _context.Context, customerId int32) apiGetCustomerProfileRequest { - return apiGetCustomerProfileRequest{ +func (a *ManagementApiService) GetExports(ctx _context.Context) apiGetExportsRequest { + return apiGetExportsRequest{ apiService: a, ctx: ctx, - customerId: customerId, } } /* Execute executes the request - @return CustomerProfile + @return InlineResponse20043 */ -func (r apiGetCustomerProfileRequest) Execute() (CustomerProfile, *_nethttp.Response, error) { +func (r apiGetExportsRequest) Execute() (InlineResponse20043, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue CustomerProfile + localVarReturnValue InlineResponse20043 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfile") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetExports") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/customers/{customerId}" - localVarPath = strings.Replace(localVarPath, "{"+"customerId"+"}", _neturl.QueryEscape(parameterToString(r.customerId, "")), -1) + localVarPath := localBasePath + "/v1/exports" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.applicationId != nil { + localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) + } + if r.campaignId != nil { + localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) + } + if r.entity != nil { + localVarQueryParams.Add("entity", parameterToString(*r.entity, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -12467,7 +15542,7 @@ func (r apiGetCustomerProfileRequest) Execute() (CustomerProfile, *_nethttp.Resp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v CustomerProfile + var v InlineResponse20043 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -12490,78 +15565,63 @@ func (r apiGetCustomerProfileRequest) Execute() (CustomerProfile, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCustomerProfilesRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sandbox *bool -} - -func (r apiGetCustomerProfilesRequest) PageSize(pageSize int32) apiGetCustomerProfilesRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetCustomerProfilesRequest) Skip(skip int32) apiGetCustomerProfilesRequest { - r.skip = &skip - return r -} - -func (r apiGetCustomerProfilesRequest) Sandbox(sandbox bool) apiGetCustomerProfilesRequest { - r.sandbox = &sandbox - return r +type apiGetLoyaltyCardRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string } /* -GetCustomerProfiles List customer profiles -List all customer profiles. +GetLoyaltyCard Get loyalty card +Get the given loyalty card. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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. + - @param 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. -@return apiGetCustomerProfilesRequest +@return apiGetLoyaltyCardRequest */ -func (a *ManagementApiService) GetCustomerProfiles(ctx _context.Context) apiGetCustomerProfilesRequest { - return apiGetCustomerProfilesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiGetLoyaltyCardRequest { + return apiGetLoyaltyCardRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - @return InlineResponse20025 + @return LoyaltyCard */ -func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20025, *_nethttp.Response, error) { +func (r apiGetLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20025 + localVarReturnValue LoyaltyCard ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomerProfiles") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyCard") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/customers/no_total" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sandbox != nil { - localVarQueryParams.Add("sandbox", parameterToString(*r.sandbox, "")) + if strlen(r.loyaltyCardId) > 108 { + return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") } + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -12629,7 +15689,37 @@ func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20025, *_nethttp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20025 + var v LoyaltyCard + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -12652,93 +15742,113 @@ func (r apiGetCustomerProfilesRequest) Execute() (InlineResponse20025, *_nethttp return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetCustomersByAttributesRequest struct { - ctx _context.Context - apiService *ManagementApiService - body *CustomerProfileSearchQuery - pageSize *int32 - skip *int32 - sandbox *bool +type apiGetLoyaltyCardTransactionLogsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string + startDate *time.Time + endDate *time.Time + pageSize *int32 + skip *int32 + subledgerId *string } -func (r apiGetCustomersByAttributesRequest) Body(body CustomerProfileSearchQuery) apiGetCustomersByAttributesRequest { - r.body = &body +func (r apiGetLoyaltyCardTransactionLogsRequest) StartDate(startDate time.Time) apiGetLoyaltyCardTransactionLogsRequest { + r.startDate = &startDate return r } -func (r apiGetCustomersByAttributesRequest) PageSize(pageSize int32) apiGetCustomersByAttributesRequest { +func (r apiGetLoyaltyCardTransactionLogsRequest) EndDate(endDate time.Time) apiGetLoyaltyCardTransactionLogsRequest { + r.endDate = &endDate + return r +} + +func (r apiGetLoyaltyCardTransactionLogsRequest) PageSize(pageSize int32) apiGetLoyaltyCardTransactionLogsRequest { r.pageSize = &pageSize return r } -func (r apiGetCustomersByAttributesRequest) Skip(skip int32) apiGetCustomersByAttributesRequest { +func (r apiGetLoyaltyCardTransactionLogsRequest) Skip(skip int32) apiGetLoyaltyCardTransactionLogsRequest { r.skip = &skip return r } -func (r apiGetCustomersByAttributesRequest) Sandbox(sandbox bool) apiGetCustomersByAttributesRequest { - r.sandbox = &sandbox +func (r apiGetLoyaltyCardTransactionLogsRequest) SubledgerId(subledgerId string) apiGetLoyaltyCardTransactionLogsRequest { + r.subledgerId = &subledgerId return r } /* -GetCustomersByAttributes List customer profiles matching the given attributes -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. +GetLoyaltyCardTransactionLogs List card's transactions +Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) +within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. +If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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. + - @param 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. -@return apiGetCustomersByAttributesRequest +@return apiGetLoyaltyCardTransactionLogsRequest */ -func (a *ManagementApiService) GetCustomersByAttributes(ctx _context.Context) apiGetCustomersByAttributesRequest { - return apiGetCustomersByAttributesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetLoyaltyCardTransactionLogs(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiGetLoyaltyCardTransactionLogsRequest { + return apiGetLoyaltyCardTransactionLogsRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - @return InlineResponse20024 + @return InlineResponse20016 */ -func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_nethttp.Response, error) { +func (r apiGetLoyaltyCardTransactionLogsRequest) Execute() (InlineResponse20016, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20024 + localVarReturnValue InlineResponse20016 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetCustomersByAttributes") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyCardTransactionLogs") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/customer_search/no_total" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") + if strlen(r.loyaltyCardId) > 108 { + return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") } + if r.startDate != nil { + localVarQueryParams.Add("startDate", parameterToString(*r.startDate, "")) + } + if r.endDate != nil { + localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) + } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.sandbox != nil { - localVarQueryParams.Add("sandbox", parameterToString(*r.sandbox, "")) + if r.subledgerId != nil { + localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -12754,8 +15864,6 @@ func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_ne if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -12806,7 +15914,27 @@ func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_ne error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20024 + var v InlineResponse20016 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -12829,88 +15957,86 @@ func (r apiGetCustomersByAttributesRequest) Execute() (InlineResponse20024, *_ne return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetEventTypesRequest struct { - ctx _context.Context - apiService *ManagementApiService - name *string - includeOldVersions *bool - pageSize *int32 - skip *int32 - sort *string +type apiGetLoyaltyCardsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + pageSize *int32 + skip *int32 + sort *string + identifier *string + profileId *int32 } -func (r apiGetEventTypesRequest) Name(name string) apiGetEventTypesRequest { - r.name = &name +func (r apiGetLoyaltyCardsRequest) PageSize(pageSize int32) apiGetLoyaltyCardsRequest { + r.pageSize = &pageSize return r } -func (r apiGetEventTypesRequest) IncludeOldVersions(includeOldVersions bool) apiGetEventTypesRequest { - r.includeOldVersions = &includeOldVersions +func (r apiGetLoyaltyCardsRequest) Skip(skip int32) apiGetLoyaltyCardsRequest { + r.skip = &skip return r } - -func (r apiGetEventTypesRequest) PageSize(pageSize int32) apiGetEventTypesRequest { - r.pageSize = &pageSize + +func (r apiGetLoyaltyCardsRequest) Sort(sort string) apiGetLoyaltyCardsRequest { + r.sort = &sort return r } -func (r apiGetEventTypesRequest) Skip(skip int32) apiGetEventTypesRequest { - r.skip = &skip +func (r apiGetLoyaltyCardsRequest) Identifier(identifier string) apiGetLoyaltyCardsRequest { + r.identifier = &identifier return r } -func (r apiGetEventTypesRequest) Sort(sort string) apiGetEventTypesRequest { - r.sort = &sort +func (r apiGetLoyaltyCardsRequest) ProfileId(profileId int32) apiGetLoyaltyCardsRequest { + r.profileId = &profileId return r } /* -GetEventTypes List event types -Fetch all event type definitions for your account. +GetLoyaltyCards List loyalty cards +For the given card-based loyalty program, list the loyalty cards that match your filter criteria. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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. -@return apiGetEventTypesRequest +@return apiGetLoyaltyCardsRequest */ -func (a *ManagementApiService) GetEventTypes(ctx _context.Context) apiGetEventTypesRequest { - return apiGetEventTypesRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetLoyaltyCards(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyCardsRequest { + return apiGetLoyaltyCardsRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, } } /* Execute executes the request - @return InlineResponse20038 + @return InlineResponse20015 */ -func (r apiGetEventTypesRequest) Execute() (InlineResponse20038, *_nethttp.Response, error) { +func (r apiGetLoyaltyCardsRequest) Execute() (InlineResponse20015, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20038 + localVarReturnValue InlineResponse20015 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetEventTypes") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyCards") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/event_types" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.includeOldVersions != nil { - localVarQueryParams.Add("includeOldVersions", parameterToString(*r.includeOldVersions, "")) - } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } @@ -12920,6 +16046,12 @@ func (r apiGetEventTypesRequest) Execute() (InlineResponse20038, *_nethttp.Respo if r.sort != nil { localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) } + if r.identifier != nil { + localVarQueryParams.Add("identifier", parameterToString(*r.identifier, "")) + } + if r.profileId != nil { + localVarQueryParams.Add("profileId", parameterToString(*r.profileId, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -12987,7 +16119,27 @@ func (r apiGetEventTypesRequest) Execute() (InlineResponse20038, *_nethttp.Respo error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20038 + var v InlineResponse20015 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -13010,97 +16162,66 @@ func (r apiGetEventTypesRequest) Execute() (InlineResponse20038, *_nethttp.Respo return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetExportsRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - applicationId *float32 - campaignId *int32 - entity *string -} - -func (r apiGetExportsRequest) PageSize(pageSize int32) apiGetExportsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetExportsRequest) Skip(skip int32) apiGetExportsRequest { - r.skip = &skip - return r -} - -func (r apiGetExportsRequest) ApplicationId(applicationId float32) apiGetExportsRequest { - r.applicationId = &applicationId - return r +type apiGetLoyaltyPointsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId string + integrationId string } -func (r apiGetExportsRequest) CampaignId(campaignId int32) apiGetExportsRequest { - r.campaignId = &campaignId - return r -} +/* +GetLoyaltyPoints Get customer's full loyalty ledger +Get the loyalty ledger for this profile integration ID. -func (r apiGetExportsRequest) Entity(entity string) apiGetExportsRequest { - r.entity = &entity - return r -} +To get the `integrationId` of the profile from a `sessionId`, use the +[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. -/* -GetExports Get exports -List all past exports +**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). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param loyaltyProgramId The identifier for the loyalty program. + - @param integrationId The identifier of the profile. -@return apiGetExportsRequest +@return apiGetLoyaltyPointsRequest */ -func (a *ManagementApiService) GetExports(ctx _context.Context) apiGetExportsRequest { - return apiGetExportsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetLoyaltyPoints(ctx _context.Context, loyaltyProgramId string, integrationId string) apiGetLoyaltyPointsRequest { + return apiGetLoyaltyPointsRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + integrationId: integrationId, } } /* Execute executes the request - @return InlineResponse20041 + @return LoyaltyLedger */ -func (r apiGetExportsRequest) Execute() (InlineResponse20041, *_nethttp.Response, error) { +func (r apiGetLoyaltyPointsRequest) Execute() (LoyaltyLedger, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20041 + localVarReturnValue LoyaltyLedger ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetExports") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyPoints") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/exports" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.applicationId != nil { - localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) - } - if r.campaignId != nil { - localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) - } - if r.entity != nil { - localVarQueryParams.Add("entity", parameterToString(*r.entity, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -13168,7 +16289,7 @@ func (r apiGetExportsRequest) Execute() (InlineResponse20041, *_nethttp.Response error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20041 + var v LoyaltyLedger err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -13191,63 +16312,60 @@ func (r apiGetExportsRequest) Execute() (InlineResponse20041, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyCardRequest struct { +type apiGetLoyaltyProgramRequest struct { ctx _context.Context apiService *ManagementApiService loyaltyProgramId int32 - loyaltyCardId string } /* -GetLoyaltyCard Get loyalty card -Get the given loyalty card. +GetLoyaltyProgram Get loyalty program +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) + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. + - @param loyaltyProgramId Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiGetLoyaltyCardRequest +@return apiGetLoyaltyProgramRequest */ -func (a *ManagementApiService) GetLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiGetLoyaltyCardRequest { - return apiGetLoyaltyCardRequest{ +func (a *ManagementApiService) GetLoyaltyProgram(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyProgramRequest { + return apiGetLoyaltyProgramRequest{ apiService: a, ctx: ctx, loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - @return LoyaltyCard + @return LoyaltyProgram */ -func (r apiGetLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, error) { +func (r apiGetLoyaltyProgramRequest) Execute() (LoyaltyProgram, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue LoyaltyCard + localVarReturnValue LoyaltyProgram ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyCard") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyProgram") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}" localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") - } - // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -13315,37 +16433,7 @@ func (r apiGetLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, er error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v LoyaltyCard - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v LoyaltyProgram err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -13368,96 +16456,102 @@ func (r apiGetLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyCardTransactionLogsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyCardId string - startDate *time.Time - endDate *time.Time - pageSize *int32 - skip *int32 - subledgerId *string +type apiGetLoyaltyProgramTransactionsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyTransactionType *string + subledgerId *string + startDate *time.Time + endDate *time.Time + pageSize *int32 + skip *int32 +} + +func (r apiGetLoyaltyProgramTransactionsRequest) LoyaltyTransactionType(loyaltyTransactionType string) apiGetLoyaltyProgramTransactionsRequest { + r.loyaltyTransactionType = &loyaltyTransactionType + return r +} + +func (r apiGetLoyaltyProgramTransactionsRequest) SubledgerId(subledgerId string) apiGetLoyaltyProgramTransactionsRequest { + r.subledgerId = &subledgerId + return r } -func (r apiGetLoyaltyCardTransactionLogsRequest) StartDate(startDate time.Time) apiGetLoyaltyCardTransactionLogsRequest { +func (r apiGetLoyaltyProgramTransactionsRequest) StartDate(startDate time.Time) apiGetLoyaltyProgramTransactionsRequest { r.startDate = &startDate return r } -func (r apiGetLoyaltyCardTransactionLogsRequest) EndDate(endDate time.Time) apiGetLoyaltyCardTransactionLogsRequest { +func (r apiGetLoyaltyProgramTransactionsRequest) EndDate(endDate time.Time) apiGetLoyaltyProgramTransactionsRequest { r.endDate = &endDate return r } -func (r apiGetLoyaltyCardTransactionLogsRequest) PageSize(pageSize int32) apiGetLoyaltyCardTransactionLogsRequest { +func (r apiGetLoyaltyProgramTransactionsRequest) PageSize(pageSize int32) apiGetLoyaltyProgramTransactionsRequest { r.pageSize = &pageSize return r } -func (r apiGetLoyaltyCardTransactionLogsRequest) Skip(skip int32) apiGetLoyaltyCardTransactionLogsRequest { +func (r apiGetLoyaltyProgramTransactionsRequest) Skip(skip int32) apiGetLoyaltyProgramTransactionsRequest { r.skip = &skip return r } -func (r apiGetLoyaltyCardTransactionLogsRequest) SubledgerId(subledgerId string) apiGetLoyaltyCardTransactionLogsRequest { - r.subledgerId = &subledgerId - return r -} - /* -GetLoyaltyCardTransactionLogs List card's transactions -Retrieve the transaction logs for the given [loyalty card](https://docs.talon.one/docs/product/loyalty-programs/card-based/card-based-overview) -within the specified [card-based loyalty program](https://docs.talon.one/docs/product/loyalty-programs/overview#loyalty-program-types) with filtering options applied. -If no filtering options are applied, the last 50 loyalty transactions for the given loyalty card are returned. +GetLoyaltyProgramTransactions List loyalty program transactions +Retrieve loyalty program transaction logs in a given loyalty program with filtering options applied. Manual and imported transactions are also included. +**Note:** 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). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. + - @param loyaltyProgramId Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiGetLoyaltyCardTransactionLogsRequest +@return apiGetLoyaltyProgramTransactionsRequest */ -func (a *ManagementApiService) GetLoyaltyCardTransactionLogs(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiGetLoyaltyCardTransactionLogsRequest { - return apiGetLoyaltyCardTransactionLogsRequest{ +func (a *ManagementApiService) GetLoyaltyProgramTransactions(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyProgramTransactionsRequest { + return apiGetLoyaltyProgramTransactionsRequest{ apiService: a, ctx: ctx, loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - @return InlineResponse20015 + @return InlineResponse20014 */ -func (r apiGetLoyaltyCardTransactionLogsRequest) Execute() (InlineResponse20015, *_nethttp.Response, error) { +func (r apiGetLoyaltyProgramTransactionsRequest) Execute() (InlineResponse20014, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20015 + localVarReturnValue InlineResponse20014 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyCardTransactionLogs") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyProgramTransactions") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/logs" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/transactions" localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") + if r.loyaltyTransactionType != nil { + localVarQueryParams.Add("loyaltyTransactionType", parameterToString(*r.loyaltyTransactionType, "")) + } + if r.subledgerId != nil { + localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) } - if r.startDate != nil { localVarQueryParams.Add("startDate", parameterToString(*r.startDate, "")) } @@ -13470,9 +16564,6 @@ func (r apiGetLoyaltyCardTransactionLogsRequest) Execute() (InlineResponse20015, if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.subledgerId != nil { - localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -13540,7 +16631,17 @@ func (r apiGetLoyaltyCardTransactionLogsRequest) Execute() (InlineResponse20015, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20015 + var v InlineResponse20014 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -13583,101 +16684,51 @@ func (r apiGetLoyaltyCardTransactionLogsRequest) Execute() (InlineResponse20015, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyCardsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - pageSize *int32 - skip *int32 - sort *string - identifier *string - profileId *int32 -} - -func (r apiGetLoyaltyCardsRequest) PageSize(pageSize int32) apiGetLoyaltyCardsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetLoyaltyCardsRequest) Skip(skip int32) apiGetLoyaltyCardsRequest { - r.skip = &skip - return r -} - -func (r apiGetLoyaltyCardsRequest) Sort(sort string) apiGetLoyaltyCardsRequest { - r.sort = &sort - return r -} - -func (r apiGetLoyaltyCardsRequest) Identifier(identifier string) apiGetLoyaltyCardsRequest { - r.identifier = &identifier - return r -} - -func (r apiGetLoyaltyCardsRequest) ProfileId(profileId int32) apiGetLoyaltyCardsRequest { - r.profileId = &profileId - return r +type apiGetLoyaltyProgramsRequest struct { + ctx _context.Context + apiService *ManagementApiService } /* -GetLoyaltyCards List loyalty cards -For the given card-based loyalty program, list the loyalty cards that match your filter criteria. - +GetLoyaltyPrograms List loyalty programs +List the loyalty programs of the account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. -@return apiGetLoyaltyCardsRequest +@return apiGetLoyaltyProgramsRequest */ -func (a *ManagementApiService) GetLoyaltyCards(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyCardsRequest { - return apiGetLoyaltyCardsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetLoyaltyPrograms(ctx _context.Context) apiGetLoyaltyProgramsRequest { + return apiGetLoyaltyProgramsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return InlineResponse20014 + @return InlineResponse20013 */ -func (r apiGetLoyaltyCardsRequest) Execute() (InlineResponse20014, *_nethttp.Response, error) { +func (r apiGetLoyaltyProgramsRequest) Execute() (InlineResponse20013, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20014 + localVarReturnValue InlineResponse20013 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyCards") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyPrograms") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.identifier != nil { - localVarQueryParams.Add("identifier", parameterToString(*r.identifier, "")) - } - if r.profileId != nil { - localVarQueryParams.Add("profileId", parameterToString(*r.profileId, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -13745,27 +16796,7 @@ func (r apiGetLoyaltyCardsRequest) Execute() (InlineResponse20014, *_nethttp.Res error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20014 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus + var v InlineResponse20013 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -13788,61 +16819,55 @@ func (r apiGetLoyaltyCardsRequest) Execute() (InlineResponse20014, *_nethttp.Res return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyPointsRequest struct { +type apiGetLoyaltyStatisticsRequest struct { ctx _context.Context apiService *ManagementApiService - loyaltyProgramId string - integrationId string + loyaltyProgramId int32 } /* -GetLoyaltyPoints Get customer's full loyalty ledger -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. +GetLoyaltyStatistics 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. -**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). +**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. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId The identifier for the loyalty program. - - @param integrationId The identifier of the profile. + - @param loyaltyProgramId Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiGetLoyaltyPointsRequest +@return apiGetLoyaltyStatisticsRequest */ -func (a *ManagementApiService) GetLoyaltyPoints(ctx _context.Context, loyaltyProgramId string, integrationId string) apiGetLoyaltyPointsRequest { - return apiGetLoyaltyPointsRequest{ +func (a *ManagementApiService) GetLoyaltyStatistics(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyStatisticsRequest { + return apiGetLoyaltyStatisticsRequest{ apiService: a, ctx: ctx, loyaltyProgramId: loyaltyProgramId, - integrationId: integrationId, } } /* Execute executes the request - @return LoyaltyLedger + @return LoyaltyDashboardData */ -func (r apiGetLoyaltyPointsRequest) Execute() (LoyaltyLedger, *_nethttp.Response, error) { +func (r apiGetLoyaltyStatisticsRequest) Execute() (LoyaltyDashboardData, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue LoyaltyLedger + localVarReturnValue LoyaltyDashboardData ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyPoints") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyStatistics") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/statistics" localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -13909,89 +16934,169 @@ func (r apiGetLoyaltyPointsRequest) Execute() (LoyaltyLedger, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, err } - if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 200 { - var v LoyaltyLedger - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v LoyaltyDashboardData + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiGetReferralsWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + pageSize *int32 + skip *int32 + sort *string + code *string + createdBefore *time.Time + createdAfter *time.Time + valid *string + usable *string + advocate *string +} + +func (r apiGetReferralsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetReferralsWithoutTotalCountRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetReferralsWithoutTotalCountRequest) Skip(skip int32) apiGetReferralsWithoutTotalCountRequest { + r.skip = &skip + return r +} + +func (r apiGetReferralsWithoutTotalCountRequest) Sort(sort string) apiGetReferralsWithoutTotalCountRequest { + r.sort = &sort + return r +} + +func (r apiGetReferralsWithoutTotalCountRequest) Code(code string) apiGetReferralsWithoutTotalCountRequest { + r.code = &code + return r +} - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } +func (r apiGetReferralsWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiGetReferralsWithoutTotalCountRequest { + r.createdBefore = &createdBefore + return r +} - return localVarReturnValue, localVarHTTPResponse, nil +func (r apiGetReferralsWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiGetReferralsWithoutTotalCountRequest { + r.createdAfter = &createdAfter + return r } -type apiGetLoyaltyProgramRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 +func (r apiGetReferralsWithoutTotalCountRequest) Valid(valid string) apiGetReferralsWithoutTotalCountRequest { + r.valid = &valid + return r } -/* -GetLoyaltyProgram Get loyalty program -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). +func (r apiGetReferralsWithoutTotalCountRequest) Usable(usable string) apiGetReferralsWithoutTotalCountRequest { + r.usable = &usable + return r +} -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) +func (r apiGetReferralsWithoutTotalCountRequest) Advocate(advocate string) apiGetReferralsWithoutTotalCountRequest { + r.advocate = &advocate + return r +} +/* +GetReferralsWithoutTotalCount List referrals +List all referrals of the specified campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiGetLoyaltyProgramRequest +@return apiGetReferralsWithoutTotalCountRequest */ -func (a *ManagementApiService) GetLoyaltyProgram(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyProgramRequest { - return apiGetLoyaltyProgramRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetReferralsWithoutTotalCount(ctx _context.Context, applicationId int32, campaignId int32) apiGetReferralsWithoutTotalCountRequest { + return apiGetReferralsWithoutTotalCountRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return LoyaltyProgram + @return InlineResponse20010 */ -func (r apiGetLoyaltyProgramRequest) Execute() (LoyaltyProgram, *_nethttp.Response, error) { +func (r apiGetReferralsWithoutTotalCountRequest) Execute() (InlineResponse20010, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue LoyaltyProgram + localVarReturnValue InlineResponse20010 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyProgram") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetReferralsWithoutTotalCount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.code != nil { + localVarQueryParams.Add("code", parameterToString(*r.code, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.valid != nil { + localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) + } + if r.usable != nil { + localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) + } + if r.advocate != nil { + localVarQueryParams.Add("advocate", parameterToString(*r.advocate, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -14059,7 +17164,7 @@ func (r apiGetLoyaltyProgramRequest) Execute() (LoyaltyProgram, *_nethttp.Respon error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v LoyaltyProgram + var v InlineResponse20010 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14082,114 +17187,56 @@ func (r apiGetLoyaltyProgramRequest) Execute() (LoyaltyProgram, *_nethttp.Respon return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyProgramTransactionsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyTransactionType *string - subledgerId *string - startDate *time.Time - endDate *time.Time - pageSize *int32 - skip *int32 -} - -func (r apiGetLoyaltyProgramTransactionsRequest) LoyaltyTransactionType(loyaltyTransactionType string) apiGetLoyaltyProgramTransactionsRequest { - r.loyaltyTransactionType = &loyaltyTransactionType - return r -} - -func (r apiGetLoyaltyProgramTransactionsRequest) SubledgerId(subledgerId string) apiGetLoyaltyProgramTransactionsRequest { - r.subledgerId = &subledgerId - return r -} - -func (r apiGetLoyaltyProgramTransactionsRequest) StartDate(startDate time.Time) apiGetLoyaltyProgramTransactionsRequest { - r.startDate = &startDate - return r -} - -func (r apiGetLoyaltyProgramTransactionsRequest) EndDate(endDate time.Time) apiGetLoyaltyProgramTransactionsRequest { - r.endDate = &endDate - return r -} - -func (r apiGetLoyaltyProgramTransactionsRequest) PageSize(pageSize int32) apiGetLoyaltyProgramTransactionsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetLoyaltyProgramTransactionsRequest) Skip(skip int32) apiGetLoyaltyProgramTransactionsRequest { - r.skip = &skip - return r +type apiGetRoleRequest struct { + ctx _context.Context + apiService *ManagementApiService + roleId int32 } /* -GetLoyaltyProgramTransactions List loyalty program transactions -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). +GetRole Get role +Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param roleId ID of role. **Note**: To find the ID of a role, use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint. -@return apiGetLoyaltyProgramTransactionsRequest +@return apiGetRoleRequest */ -func (a *ManagementApiService) GetLoyaltyProgramTransactions(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyProgramTransactionsRequest { - return apiGetLoyaltyProgramTransactionsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetRole(ctx _context.Context, roleId int32) apiGetRoleRequest { + return apiGetRoleRequest{ + apiService: a, + ctx: ctx, + roleId: roleId, } } /* Execute executes the request - @return InlineResponse20013 + @return Role */ -func (r apiGetLoyaltyProgramTransactionsRequest) Execute() (InlineResponse20013, *_nethttp.Response, error) { +func (r apiGetRoleRequest) Execute() (Role, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20013 + localVarReturnValue Role ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyProgramTransactions") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRole") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/transactions" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/roles/{roleId}" + localVarPath = strings.Replace(localVarPath, "{"+"roleId"+"}", _neturl.QueryEscape(parameterToString(r.roleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.loyaltyTransactionType != nil { - localVarQueryParams.Add("loyaltyTransactionType", parameterToString(*r.loyaltyTransactionType, "")) - } - if r.subledgerId != nil { - localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) - } - if r.startDate != nil { - localVarQueryParams.Add("startDate", parameterToString(*r.startDate, "")) - } - if r.endDate != nil { - localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) - } - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -14242,52 +17289,22 @@ func (r apiGetLoyaltyProgramTransactionsRequest) Execute() (InlineResponse20013, localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20013 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 200 { + var v Role err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14310,46 +17327,58 @@ func (r apiGetLoyaltyProgramTransactionsRequest) Execute() (InlineResponse20013, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyProgramsRequest struct { - ctx _context.Context - apiService *ManagementApiService +type apiGetRulesetRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + rulesetId int32 } /* -GetLoyaltyPrograms List loyalty programs -List the loyalty programs of the account. +GetRuleset Get ruleset +Retrieve the specified ruleset. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param rulesetId The ID of the ruleset. -@return apiGetLoyaltyProgramsRequest +@return apiGetRulesetRequest */ -func (a *ManagementApiService) GetLoyaltyPrograms(ctx _context.Context) apiGetLoyaltyProgramsRequest { - return apiGetLoyaltyProgramsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) GetRuleset(ctx _context.Context, applicationId int32, campaignId int32, rulesetId int32) apiGetRulesetRequest { + return apiGetRulesetRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + rulesetId: rulesetId, } } /* Execute executes the request - @return InlineResponse20012 + @return Ruleset */ -func (r apiGetLoyaltyProgramsRequest) Execute() (InlineResponse20012, *_nethttp.Response, error) { +func (r apiGetRulesetRequest) Execute() (Ruleset, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20012 + localVarReturnValue Ruleset ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyPrograms") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRuleset") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"rulesetId"+"}", _neturl.QueryEscape(parameterToString(r.rulesetId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -14422,7 +17451,7 @@ func (r apiGetLoyaltyProgramsRequest) Execute() (InlineResponse20012, *_nethttp. error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20012 + var v Ruleset err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14445,60 +17474,89 @@ func (r apiGetLoyaltyProgramsRequest) Execute() (InlineResponse20012, *_nethttp. return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetLoyaltyStatisticsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 +type apiGetRulesetsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + pageSize *int32 + skip *int32 + sort *string } -/* -GetLoyaltyStatistics 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. +func (r apiGetRulesetsRequest) PageSize(pageSize int32) apiGetRulesetsRequest { + r.pageSize = &pageSize + return r +} -**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. +func (r apiGetRulesetsRequest) Skip(skip int32) apiGetRulesetsRequest { + r.skip = &skip + return r +} + +func (r apiGetRulesetsRequest) Sort(sort string) apiGetRulesetsRequest { + r.sort = &sort + return r +} + +/* +GetRulesets List campaign rulesets +List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. +**Important:** The response also includes deleted rules. +You should only consider the latest revision of the returned rulesets. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiGetLoyaltyStatisticsRequest +@return apiGetRulesetsRequest */ -func (a *ManagementApiService) GetLoyaltyStatistics(ctx _context.Context, loyaltyProgramId int32) apiGetLoyaltyStatisticsRequest { - return apiGetLoyaltyStatisticsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) GetRulesets(ctx _context.Context, applicationId int32, campaignId int32) apiGetRulesetsRequest { + return apiGetRulesetsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return LoyaltyDashboardData + @return InlineResponse2007 */ -func (r apiGetLoyaltyStatisticsRequest) Execute() (LoyaltyDashboardData, *_nethttp.Response, error) { +func (r apiGetRulesetsRequest) Execute() (InlineResponse2007, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue LoyaltyDashboardData + localVarReturnValue InlineResponse2007 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetLoyaltyStatistics") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRulesets") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/statistics" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -14566,7 +17624,7 @@ func (r apiGetLoyaltyStatisticsRequest) Execute() (LoyaltyDashboardData, *_netht error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v LoyaltyDashboardData + var v InlineResponse2007 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14589,140 +17647,59 @@ func (r apiGetLoyaltyStatisticsRequest) Execute() (LoyaltyDashboardData, *_netht return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetReferralsWithoutTotalCountRequest struct { +type apiGetStoreRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - campaignId int32 - pageSize *int32 - skip *int32 - sort *string - code *string - createdBefore *time.Time - createdAfter *time.Time - valid *string - usable *string - advocate *string -} - -func (r apiGetReferralsWithoutTotalCountRequest) PageSize(pageSize int32) apiGetReferralsWithoutTotalCountRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) Skip(skip int32) apiGetReferralsWithoutTotalCountRequest { - r.skip = &skip - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) Sort(sort string) apiGetReferralsWithoutTotalCountRequest { - r.sort = &sort - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) Code(code string) apiGetReferralsWithoutTotalCountRequest { - r.code = &code - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiGetReferralsWithoutTotalCountRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiGetReferralsWithoutTotalCountRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) Valid(valid string) apiGetReferralsWithoutTotalCountRequest { - r.valid = &valid - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) Usable(usable string) apiGetReferralsWithoutTotalCountRequest { - r.usable = &usable - return r -} - -func (r apiGetReferralsWithoutTotalCountRequest) Advocate(advocate string) apiGetReferralsWithoutTotalCountRequest { - r.advocate = &advocate - return r + storeId string } /* -GetReferralsWithoutTotalCount List referrals -List all referrals of the specified campaign. +GetStore Get store +Get store details for a specific store ID. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. -@return apiGetReferralsWithoutTotalCountRequest +@return apiGetStoreRequest */ -func (a *ManagementApiService) GetReferralsWithoutTotalCount(ctx _context.Context, applicationId int32, campaignId int32) apiGetReferralsWithoutTotalCountRequest { - return apiGetReferralsWithoutTotalCountRequest{ +func (a *ManagementApiService) GetStore(ctx _context.Context, applicationId int32, storeId string) apiGetStoreRequest { + return apiGetStoreRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - campaignId: campaignId, + storeId: storeId, } } /* Execute executes the request - @return InlineResponse20010 + @return Store */ -func (r apiGetReferralsWithoutTotalCountRequest) Execute() (InlineResponse20010, *_nethttp.Response, error) { +func (r apiGetStoreRequest) Execute() (Store, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20010 - ) - - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetReferralsWithoutTotalCount") - if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.code != nil { - localVarQueryParams.Add("code", parameterToString(*r.code, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.valid != nil { - localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) - } - if r.usable != nil { - localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) - } - if r.advocate != nil { - localVarQueryParams.Add("advocate", parameterToString(*r.advocate, "")) + localVarFileBytes []byte + localVarReturnValue Store + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetStore") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } + + localVarPath := localBasePath + "/v1/applications/{applicationId}/stores/{storeId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"storeId"+"}", _neturl.QueryEscape(parameterToString(r.storeId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -14790,7 +17767,17 @@ func (r apiGetReferralsWithoutTotalCountRequest) Execute() (InlineResponse20010, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20010 + var v Store + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14813,51 +17800,51 @@ func (r apiGetReferralsWithoutTotalCountRequest) Execute() (InlineResponse20010, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetRoleRequest struct { +type apiGetUserRequest struct { ctx _context.Context apiService *ManagementApiService - roleId int32 + userId int32 } /* -GetRole Get role -Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). +GetUser Get user +Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param roleId The ID of role. + - @param userId The ID of the user. -@return apiGetRoleRequest +@return apiGetUserRequest */ -func (a *ManagementApiService) GetRole(ctx _context.Context, roleId int32) apiGetRoleRequest { - return apiGetRoleRequest{ +func (a *ManagementApiService) GetUser(ctx _context.Context, userId int32) apiGetUserRequest { + return apiGetUserRequest{ apiService: a, ctx: ctx, - roleId: roleId, + userId: userId, } } /* Execute executes the request - @return Role + @return User */ -func (r apiGetRoleRequest) Execute() (Role, *_nethttp.Response, error) { +func (r apiGetUserRequest) Execute() (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Role + localVarReturnValue User ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRole") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetUser") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/roles/{roleId}" - localVarPath = strings.Replace(localVarPath, "{"+"roleId"+"}", _neturl.QueryEscape(parameterToString(r.roleId, "")), -1) + localVarPath := localBasePath + "/v1/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.QueryEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -14930,7 +17917,7 @@ func (r apiGetRoleRequest) Execute() (Role, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Role + var v User err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14953,63 +17940,79 @@ func (r apiGetRoleRequest) Execute() (Role, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetRulesetRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - rulesetId int32 +type apiGetUsersRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string +} + +func (r apiGetUsersRequest) PageSize(pageSize int32) apiGetUsersRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetUsersRequest) Skip(skip int32) apiGetUsersRequest { + r.skip = &skip + return r +} + +func (r apiGetUsersRequest) Sort(sort string) apiGetUsersRequest { + r.sort = &sort + return r } /* -GetRuleset Get ruleset -Retrieve the specified ruleset. +GetUsers List users in account +Retrieve all users in your account. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param rulesetId The ID of the ruleset. -@return apiGetRulesetRequest +@return apiGetUsersRequest */ -func (a *ManagementApiService) GetRuleset(ctx _context.Context, applicationId int32, campaignId int32, rulesetId int32) apiGetRulesetRequest { - return apiGetRulesetRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, - rulesetId: rulesetId, +func (a *ManagementApiService) GetUsers(ctx _context.Context) apiGetUsersRequest { + return apiGetUsersRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return Ruleset + @return InlineResponse20041 */ -func (r apiGetRulesetRequest) Execute() (Ruleset, *_nethttp.Response, error) { +func (r apiGetUsersRequest) Execute() (InlineResponse20041, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Ruleset + localVarReturnValue InlineResponse20041 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRuleset") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetUsers") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"rulesetId"+"}", _neturl.QueryEscape(parameterToString(r.rulesetId, "")), -1) + localVarPath := localBasePath + "/v1/users" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -15077,7 +18080,7 @@ func (r apiGetRulesetRequest) Execute() (Ruleset, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Ruleset + var v InlineResponse20041 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -15100,89 +18103,55 @@ func (r apiGetRulesetRequest) Execute() (Ruleset, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetRulesetsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - pageSize *int32 - skip *int32 - sort *string -} - -func (r apiGetRulesetsRequest) PageSize(pageSize int32) apiGetRulesetsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetRulesetsRequest) Skip(skip int32) apiGetRulesetsRequest { - r.skip = &skip - return r -} - -func (r apiGetRulesetsRequest) Sort(sort string) apiGetRulesetsRequest { - r.sort = &sort - return r +type apiGetWebhookRequest struct { + ctx _context.Context + apiService *ManagementApiService + webhookId int32 } /* -GetRulesets List campaign rulesets -List all rulesets of this campaign. A ruleset is a revision of the rules of a campaign. -**Important:** The response also includes deleted rules. -You should only consider the latest revision of the returned rulesets. - +GetWebhook Get webhook +Returns a webhook by its id. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param 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**. -@return apiGetRulesetsRequest +@return apiGetWebhookRequest */ -func (a *ManagementApiService) GetRulesets(ctx _context.Context, applicationId int32, campaignId int32) apiGetRulesetsRequest { - return apiGetRulesetsRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, +func (a *ManagementApiService) GetWebhook(ctx _context.Context, webhookId int32) apiGetWebhookRequest { + return apiGetWebhookRequest{ + apiService: a, + ctx: ctx, + webhookId: webhookId, } } /* Execute executes the request - @return InlineResponse2007 + @return Webhook */ -func (r apiGetRulesetsRequest) Execute() (InlineResponse2007, *_nethttp.Response, error) { +func (r apiGetWebhookRequest) Execute() (Webhook, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2007 + localVarReturnValue Webhook ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRulesets") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhook") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/rulesets" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath := localBasePath + "/v1/webhooks/{webhookId}" + localVarPath = strings.Replace(localVarPath, "{"+"webhookId"+"}", _neturl.QueryEscape(parameterToString(r.webhookId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -15250,7 +18219,7 @@ func (r apiGetRulesetsRequest) Execute() (InlineResponse2007, *_nethttp.Response error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2007 + var v Webhook err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -15273,59 +18242,134 @@ func (r apiGetRulesetsRequest) Execute() (InlineResponse2007, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetStoreRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - storeId string +type apiGetWebhookActivationLogsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string + integrationRequestUuid *string + webhookId *float32 + applicationId *float32 + campaignId *float32 + createdBefore *time.Time + createdAfter *time.Time +} + +func (r apiGetWebhookActivationLogsRequest) PageSize(pageSize int32) apiGetWebhookActivationLogsRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetWebhookActivationLogsRequest) Skip(skip int32) apiGetWebhookActivationLogsRequest { + r.skip = &skip + return r +} + +func (r apiGetWebhookActivationLogsRequest) Sort(sort string) apiGetWebhookActivationLogsRequest { + r.sort = &sort + return r +} + +func (r apiGetWebhookActivationLogsRequest) IntegrationRequestUuid(integrationRequestUuid string) apiGetWebhookActivationLogsRequest { + r.integrationRequestUuid = &integrationRequestUuid + return r +} + +func (r apiGetWebhookActivationLogsRequest) WebhookId(webhookId float32) apiGetWebhookActivationLogsRequest { + r.webhookId = &webhookId + return r +} + +func (r apiGetWebhookActivationLogsRequest) ApplicationId(applicationId float32) apiGetWebhookActivationLogsRequest { + r.applicationId = &applicationId + return r +} + +func (r apiGetWebhookActivationLogsRequest) CampaignId(campaignId float32) apiGetWebhookActivationLogsRequest { + r.campaignId = &campaignId + return r +} + +func (r apiGetWebhookActivationLogsRequest) CreatedBefore(createdBefore time.Time) apiGetWebhookActivationLogsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiGetWebhookActivationLogsRequest) CreatedAfter(createdAfter time.Time) apiGetWebhookActivationLogsRequest { + r.createdAfter = &createdAfter + return r } /* -GetStore Get store -Get store details for a specific store ID. +GetWebhookActivationLogs List webhook activation log entries +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). + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. -@return apiGetStoreRequest +@return apiGetWebhookActivationLogsRequest */ -func (a *ManagementApiService) GetStore(ctx _context.Context, applicationId int32, storeId string) apiGetStoreRequest { - return apiGetStoreRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - storeId: storeId, +func (a *ManagementApiService) GetWebhookActivationLogs(ctx _context.Context) apiGetWebhookActivationLogsRequest { + return apiGetWebhookActivationLogsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return Store + @return InlineResponse20038 */ -func (r apiGetStoreRequest) Execute() (Store, *_nethttp.Response, error) { +func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20038, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Store + localVarReturnValue InlineResponse20038 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetStore") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhookActivationLogs") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/stores/{storeId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"storeId"+"}", _neturl.QueryEscape(parameterToString(r.storeId, "")), -1) + localVarPath := localBasePath + "/v1/webhook_activation_logs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.integrationRequestUuid != nil { + localVarQueryParams.Add("integrationRequestUuid", parameterToString(*r.integrationRequestUuid, "")) + } + if r.webhookId != nil { + localVarQueryParams.Add("webhookId", parameterToString(*r.webhookId, "")) + } + if r.applicationId != nil { + localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) + } + if r.campaignId != nil { + localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -15393,17 +18437,7 @@ func (r apiGetStoreRequest) Execute() (Store, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Store - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v InlineResponse20038 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -15426,56 +18460,141 @@ func (r apiGetStoreRequest) Execute() (Store, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetUserRequest struct { - ctx _context.Context - apiService *ManagementApiService - userId int32 +type apiGetWebhookLogsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string + status *string + webhookId *float32 + applicationId *float32 + campaignId *float32 + requestUuid *string + createdBefore *time.Time + createdAfter *time.Time } -/* -GetUser Get user -Retrieve the data (including an invitation code) for a user. Non-admin users can only get their own profile. +func (r apiGetWebhookLogsRequest) PageSize(pageSize int32) apiGetWebhookLogsRequest { + r.pageSize = &pageSize + return r +} + +func (r apiGetWebhookLogsRequest) Skip(skip int32) apiGetWebhookLogsRequest { + r.skip = &skip + return r +} + +func (r apiGetWebhookLogsRequest) Sort(sort string) apiGetWebhookLogsRequest { + r.sort = &sort + return r +} + +func (r apiGetWebhookLogsRequest) Status(status string) apiGetWebhookLogsRequest { + r.status = &status + return r +} + +func (r apiGetWebhookLogsRequest) WebhookId(webhookId float32) apiGetWebhookLogsRequest { + r.webhookId = &webhookId + return r +} + +func (r apiGetWebhookLogsRequest) ApplicationId(applicationId float32) apiGetWebhookLogsRequest { + r.applicationId = &applicationId + return r +} + +func (r apiGetWebhookLogsRequest) CampaignId(campaignId float32) apiGetWebhookLogsRequest { + r.campaignId = &campaignId + return r +} + +func (r apiGetWebhookLogsRequest) RequestUuid(requestUuid string) apiGetWebhookLogsRequest { + r.requestUuid = &requestUuid + return r +} + +func (r apiGetWebhookLogsRequest) CreatedBefore(createdBefore time.Time) apiGetWebhookLogsRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiGetWebhookLogsRequest) CreatedAfter(createdAfter time.Time) apiGetWebhookLogsRequest { + r.createdAfter = &createdAfter + return r +} +/* +GetWebhookLogs List webhook log entries +Retrieve all webhook log entries. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param userId The ID of the user. -@return apiGetUserRequest +@return apiGetWebhookLogsRequest */ -func (a *ManagementApiService) GetUser(ctx _context.Context, userId int32) apiGetUserRequest { - return apiGetUserRequest{ +func (a *ManagementApiService) GetWebhookLogs(ctx _context.Context) apiGetWebhookLogsRequest { + return apiGetWebhookLogsRequest{ apiService: a, ctx: ctx, - userId: userId, } } /* Execute executes the request - @return User + @return InlineResponse20039 */ -func (r apiGetUserRequest) Execute() (User, *_nethttp.Response, error) { +func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20039, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue User + localVarReturnValue InlineResponse20039 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetUser") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhookLogs") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/users/{userId}" - localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.QueryEscape(parameterToString(r.userId, "")), -1) + localVarPath := localBasePath + "/v1/webhook_logs" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.status != nil { + localVarQueryParams.Add("status", parameterToString(*r.status, "")) + } + if r.webhookId != nil { + localVarQueryParams.Add("webhookId", parameterToString(*r.webhookId, "")) + } + if r.applicationId != nil { + localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) + } + if r.campaignId != nil { + localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) + } + if r.requestUuid != nil { + localVarQueryParams.Add("requestUuid", parameterToString(*r.requestUuid, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -15543,7 +18662,7 @@ func (r apiGetUserRequest) Execute() (User, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v User + var v InlineResponse20039 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -15566,39 +18685,68 @@ func (r apiGetUserRequest) Execute() (User, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetUsersRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string +type apiGetWebhooksRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationIds *string + sort *string + pageSize *int32 + skip *int32 + creationType *string + visibility *string + outgoingIntegrationsTypeId *int32 + title *string } -func (r apiGetUsersRequest) PageSize(pageSize int32) apiGetUsersRequest { +func (r apiGetWebhooksRequest) ApplicationIds(applicationIds string) apiGetWebhooksRequest { + r.applicationIds = &applicationIds + return r +} + +func (r apiGetWebhooksRequest) Sort(sort string) apiGetWebhooksRequest { + r.sort = &sort + return r +} + +func (r apiGetWebhooksRequest) PageSize(pageSize int32) apiGetWebhooksRequest { r.pageSize = &pageSize return r } -func (r apiGetUsersRequest) Skip(skip int32) apiGetUsersRequest { +func (r apiGetWebhooksRequest) Skip(skip int32) apiGetWebhooksRequest { r.skip = &skip return r } -func (r apiGetUsersRequest) Sort(sort string) apiGetUsersRequest { - r.sort = &sort +func (r apiGetWebhooksRequest) CreationType(creationType string) apiGetWebhooksRequest { + r.creationType = &creationType return r } -/* -GetUsers List users in account -Retrieve all users in your account. +func (r apiGetWebhooksRequest) Visibility(visibility string) apiGetWebhooksRequest { + r.visibility = &visibility + return r +} + +func (r apiGetWebhooksRequest) OutgoingIntegrationsTypeId(outgoingIntegrationsTypeId int32) apiGetWebhooksRequest { + r.outgoingIntegrationsTypeId = &outgoingIntegrationsTypeId + return r +} + +func (r apiGetWebhooksRequest) Title(title string) apiGetWebhooksRequest { + r.title = &title + return r +} +/* +GetWebhooks List webhooks +List all webhooks. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). -@return apiGetUsersRequest +@return apiGetWebhooksRequest */ -func (a *ManagementApiService) GetUsers(ctx _context.Context) apiGetUsersRequest { - return apiGetUsersRequest{ +func (a *ManagementApiService) GetWebhooks(ctx _context.Context) apiGetWebhooksRequest { + return apiGetWebhooksRequest{ apiService: a, ctx: ctx, } @@ -15607,37 +18755,52 @@ func (a *ManagementApiService) GetUsers(ctx _context.Context) apiGetUsersRequest /* Execute executes the request - @return InlineResponse20039 + @return InlineResponse20037 */ -func (r apiGetUsersRequest) Execute() (InlineResponse20039, *_nethttp.Response, error) { +func (r apiGetWebhooksRequest) Execute() (InlineResponse20037, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20039 + localVarReturnValue InlineResponse20037 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetUsers") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhooks") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/users" + localVarPath := localBasePath + "/v1/webhooks" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.applicationIds != nil { + localVarQueryParams.Add("applicationIds", parameterToString(*r.applicationIds, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) } if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + if r.creationType != nil { + localVarQueryParams.Add("creationType", parameterToString(*r.creationType, "")) + } + if r.visibility != nil { + localVarQueryParams.Add("visibility", parameterToString(*r.visibility, "")) + } + if r.outgoingIntegrationsTypeId != nil { + localVarQueryParams.Add("outgoingIntegrationsTypeId", parameterToString(*r.outgoingIntegrationsTypeId, "")) + } + if r.title != nil { + localVarQueryParams.Add("title", parameterToString(*r.title, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -15706,7 +18869,7 @@ func (r apiGetUsersRequest) Execute() (InlineResponse20039, *_nethttp.Response, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20039 + var v InlineResponse20037 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -15729,57 +18892,84 @@ func (r apiGetUsersRequest) Execute() (InlineResponse20039, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetWebhookRequest struct { - ctx _context.Context - apiService *ManagementApiService - webhookId int32 +type apiImportAccountCollectionRequest struct { + ctx _context.Context + apiService *ManagementApiService + collectionId int32 + upFile *string +} + +func (r apiImportAccountCollectionRequest) UpFile(upFile string) apiImportAccountCollectionRequest { + r.upFile = &upFile + return r } /* -GetWebhook Get webhook -Returns a webhook by its id. +ImportAccountCollection Import data into existing account-level collection +Upload a CSV file containing the collection of string values that should be attached as payload for collection. +The file should be sent as multipart data. + +The import **replaces** the initial content of the collection. + +The CSV file **must** only contain the following column: + +- `item`: the values in your collection. + +A collection is limited to 500,000 items. + +Example: + +``` +item +Addidas +Nike +Asics +``` + +**Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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**. + - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. -@return apiGetWebhookRequest +@return apiImportAccountCollectionRequest */ -func (a *ManagementApiService) GetWebhook(ctx _context.Context, webhookId int32) apiGetWebhookRequest { - return apiGetWebhookRequest{ - apiService: a, - ctx: ctx, - webhookId: webhookId, +func (a *ManagementApiService) ImportAccountCollection(ctx _context.Context, collectionId int32) apiImportAccountCollectionRequest { + return apiImportAccountCollectionRequest{ + apiService: a, + ctx: ctx, + collectionId: collectionId, } } /* Execute executes the request - @return Webhook + @return Import */ -func (r apiGetWebhookRequest) Execute() (Webhook, *_nethttp.Response, error) { +func (r apiImportAccountCollectionRequest) Execute() (Import, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Webhook + localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhook") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportAccountCollection") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/webhooks/{webhookId}" - localVarPath = strings.Replace(localVarPath, "{"+"webhookId"+"}", _neturl.QueryEscape(parameterToString(r.webhookId, "")), -1) + localVarPath := localBasePath + "/v1/collections/{collectionId}/import" + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"multipart/form-data"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -15795,6 +18985,9 @@ func (r apiGetWebhookRequest) Execute() (Webhook, *_nethttp.Response, error) { if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.upFile != nil { + localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -15845,7 +19038,27 @@ func (r apiGetWebhookRequest) Execute() (Webhook, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Webhook + var v Import + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -15868,136 +19081,82 @@ func (r apiGetWebhookRequest) Execute() (Webhook, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetWebhookActivationLogsRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string - integrationRequestUuid *string - webhookId *float32 - applicationId *float32 - campaignId *float32 - createdBefore *time.Time - createdAfter *time.Time -} - -func (r apiGetWebhookActivationLogsRequest) PageSize(pageSize int32) apiGetWebhookActivationLogsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetWebhookActivationLogsRequest) Skip(skip int32) apiGetWebhookActivationLogsRequest { - r.skip = &skip - return r +type apiImportAllowedListRequest struct { + ctx _context.Context + apiService *ManagementApiService + attributeId int32 + upFile *string } -func (r apiGetWebhookActivationLogsRequest) Sort(sort string) apiGetWebhookActivationLogsRequest { - r.sort = &sort +func (r apiImportAllowedListRequest) UpFile(upFile string) apiImportAllowedListRequest { + r.upFile = &upFile return r } -func (r apiGetWebhookActivationLogsRequest) IntegrationRequestUuid(integrationRequestUuid string) apiGetWebhookActivationLogsRequest { - r.integrationRequestUuid = &integrationRequestUuid - return r -} +/* +ImportAllowedList Import allowed values for attribute +Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. -func (r apiGetWebhookActivationLogsRequest) WebhookId(webhookId float32) apiGetWebhookActivationLogsRequest { - r.webhookId = &webhookId - return r -} +The file should be sent as multipart data. -func (r apiGetWebhookActivationLogsRequest) ApplicationId(applicationId float32) apiGetWebhookActivationLogsRequest { - r.applicationId = &applicationId - return r -} +The import **replaces** the previous list of allowed values for this attribute, if any. -func (r apiGetWebhookActivationLogsRequest) CampaignId(campaignId float32) apiGetWebhookActivationLogsRequest { - r.campaignId = &campaignId - return r -} +The CSV file **must** only contain the following column: +- `item` (required): the values in your allowed list, for example a list of SKU's. -func (r apiGetWebhookActivationLogsRequest) CreatedBefore(createdBefore time.Time) apiGetWebhookActivationLogsRequest { - r.createdBefore = &createdBefore - return r -} +An allowed list is limited to 500,000 items. -func (r apiGetWebhookActivationLogsRequest) CreatedAfter(createdAfter time.Time) apiGetWebhookActivationLogsRequest { - r.createdAfter = &createdAfter - return r -} +Example: -/* -GetWebhookActivationLogs List webhook activation log entries -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). +```text +item +CS-VG-04032021-UP-50D-10 +CS-DV-04042021-UP-49D-12 +CS-DG-02082021-UP-50G-07 +``` - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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**. -@return apiGetWebhookActivationLogsRequest +@return apiImportAllowedListRequest */ -func (a *ManagementApiService) GetWebhookActivationLogs(ctx _context.Context) apiGetWebhookActivationLogsRequest { - return apiGetWebhookActivationLogsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) ImportAllowedList(ctx _context.Context, attributeId int32) apiImportAllowedListRequest { + return apiImportAllowedListRequest{ + apiService: a, + ctx: ctx, + attributeId: attributeId, } } /* Execute executes the request - @return InlineResponse20036 + @return Import */ -func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20036, *_nethttp.Response, error) { +func (r apiImportAllowedListRequest) Execute() (Import, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20036 + localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhookActivationLogs") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportAllowedList") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/webhook_activation_logs" + localVarPath := localBasePath + "/v1/attributes/{attributeId}/allowed_list/import" + localVarPath = strings.Replace(localVarPath, "{"+"attributeId"+"}", _neturl.QueryEscape(parameterToString(r.attributeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.integrationRequestUuid != nil { - localVarQueryParams.Add("integrationRequestUuid", parameterToString(*r.integrationRequestUuid, "")) - } - if r.webhookId != nil { - localVarQueryParams.Add("webhookId", parameterToString(*r.webhookId, "")) - } - if r.applicationId != nil { - localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) - } - if r.campaignId != nil { - localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"multipart/form-data"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -16013,6 +19172,9 @@ func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20036, *_ne if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.upFile != nil { + localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -16063,7 +19225,37 @@ func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20036, *_ne error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20036 + var v Import + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -16086,143 +19278,79 @@ func (r apiGetWebhookActivationLogsRequest) Execute() (InlineResponse20036, *_ne return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetWebhookLogsRequest struct { - ctx _context.Context - apiService *ManagementApiService - pageSize *int32 - skip *int32 - sort *string - status *string - webhookId *float32 - applicationId *float32 - campaignId *float32 - requestUuid *string - createdBefore *time.Time - createdAfter *time.Time -} - -func (r apiGetWebhookLogsRequest) PageSize(pageSize int32) apiGetWebhookLogsRequest { - r.pageSize = &pageSize - return r -} - -func (r apiGetWebhookLogsRequest) Skip(skip int32) apiGetWebhookLogsRequest { - r.skip = &skip - return r -} - -func (r apiGetWebhookLogsRequest) Sort(sort string) apiGetWebhookLogsRequest { - r.sort = &sort - return r +type apiImportAudiencesMembershipsRequest struct { + ctx _context.Context + apiService *ManagementApiService + audienceId int32 + upFile *string } -func (r apiGetWebhookLogsRequest) Status(status string) apiGetWebhookLogsRequest { - r.status = &status +func (r apiImportAudiencesMembershipsRequest) UpFile(upFile string) apiImportAudiencesMembershipsRequest { + r.upFile = &upFile return r } -func (r apiGetWebhookLogsRequest) WebhookId(webhookId float32) apiGetWebhookLogsRequest { - r.webhookId = &webhookId - return r -} +/* +ImportAudiencesMemberships Import audience members +Upload a CSV file containing the integration IDs of the members you want to add to an audience. -func (r apiGetWebhookLogsRequest) ApplicationId(applicationId float32) apiGetWebhookLogsRequest { - r.applicationId = &applicationId - return r -} +The file should be sent as multipart data and should contain only the following column (required): +- `profileintegrationid`: The integration ID of the customer profile. -func (r apiGetWebhookLogsRequest) CampaignId(campaignId float32) apiGetWebhookLogsRequest { - r.campaignId = &campaignId - return r -} +The import **replaces** the previous list of audience members. -func (r apiGetWebhookLogsRequest) RequestUuid(requestUuid string) apiGetWebhookLogsRequest { - r.requestUuid = &requestUuid - return r -} +**Note:** We recommend limiting your file size to 500MB. -func (r apiGetWebhookLogsRequest) CreatedBefore(createdBefore time.Time) apiGetWebhookLogsRequest { - r.createdBefore = &createdBefore - return r -} +Example: -func (r apiGetWebhookLogsRequest) CreatedAfter(createdAfter time.Time) apiGetWebhookLogsRequest { - r.createdAfter = &createdAfter - return r -} +```text +profileintegrationid +charles +alexa +``` -/* -GetWebhookLogs List webhook log entries -Retrieve all webhook log entries. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param audienceId The ID of the audience. -@return apiGetWebhookLogsRequest +@return apiImportAudiencesMembershipsRequest */ -func (a *ManagementApiService) GetWebhookLogs(ctx _context.Context) apiGetWebhookLogsRequest { - return apiGetWebhookLogsRequest{ +func (a *ManagementApiService) ImportAudiencesMemberships(ctx _context.Context, audienceId int32) apiImportAudiencesMembershipsRequest { + return apiImportAudiencesMembershipsRequest{ apiService: a, ctx: ctx, + audienceId: audienceId, } } /* Execute executes the request - @return InlineResponse20037 + @return Import */ -func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20037, *_nethttp.Response, error) { +func (r apiImportAudiencesMembershipsRequest) Execute() (Import, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20037 + localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhookLogs") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportAudiencesMemberships") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/webhook_logs" + localVarPath := localBasePath + "/v1/audiences/{audienceId}/memberships/import" + localVarPath = strings.Replace(localVarPath, "{"+"audienceId"+"}", _neturl.QueryEscape(parameterToString(r.audienceId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.status != nil { - localVarQueryParams.Add("status", parameterToString(*r.status, "")) - } - if r.webhookId != nil { - localVarQueryParams.Add("webhookId", parameterToString(*r.webhookId, "")) - } - if r.applicationId != nil { - localVarQueryParams.Add("applicationId", parameterToString(*r.applicationId, "")) - } - if r.campaignId != nil { - localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) - } - if r.requestUuid != nil { - localVarQueryParams.Add("requestUuid", parameterToString(*r.requestUuid, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"multipart/form-data"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -16238,6 +19366,9 @@ func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20037, *_nethttp.Resp if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.upFile != nil { + localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -16288,7 +19419,37 @@ func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20037, *_nethttp.Resp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20037 + var v Import + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponse + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -16311,125 +19472,92 @@ func (r apiGetWebhookLogsRequest) Execute() (InlineResponse20037, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetWebhooksRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationIds *string - sort *string - pageSize *int32 - skip *int32 - creationType *string - visibility *string - outgoingIntegrationsTypeId *int32 - title *string +type apiImportCollectionRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + collectionId int32 + upFile *string } -func (r apiGetWebhooksRequest) ApplicationIds(applicationIds string) apiGetWebhooksRequest { - r.applicationIds = &applicationIds +func (r apiImportCollectionRequest) UpFile(upFile string) apiImportCollectionRequest { + r.upFile = &upFile return r } -func (r apiGetWebhooksRequest) Sort(sort string) apiGetWebhooksRequest { - r.sort = &sort - return r -} +/* +ImportCollection Import data into existing campaign-level collection +Upload a CSV file containing the collection of string values that should be attached as payload for collection. +The file should be sent as multipart data. -func (r apiGetWebhooksRequest) PageSize(pageSize int32) apiGetWebhooksRequest { - r.pageSize = &pageSize - return r -} +The import **replaces** the initial content of the collection. -func (r apiGetWebhooksRequest) Skip(skip int32) apiGetWebhooksRequest { - r.skip = &skip - return r -} +The CSV file **must** only contain the following column: -func (r apiGetWebhooksRequest) CreationType(creationType string) apiGetWebhooksRequest { - r.creationType = &creationType - return r -} +- `item`: the values in your collection. -func (r apiGetWebhooksRequest) Visibility(visibility string) apiGetWebhooksRequest { - r.visibility = &visibility - return r -} +A collection is limited to 500,000 items. -func (r apiGetWebhooksRequest) OutgoingIntegrationsTypeId(outgoingIntegrationsTypeId int32) apiGetWebhooksRequest { - r.outgoingIntegrationsTypeId = &outgoingIntegrationsTypeId - return r -} +Example: -func (r apiGetWebhooksRequest) Title(title string) apiGetWebhooksRequest { - r.title = &title - return r -} +``` +item +Addidas +Nike +Asics +``` + +**Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. -/* -GetWebhooks List webhooks -List all webhooks. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. -@return apiGetWebhooksRequest +@return apiImportCollectionRequest */ -func (a *ManagementApiService) GetWebhooks(ctx _context.Context) apiGetWebhooksRequest { - return apiGetWebhooksRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) ImportCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiImportCollectionRequest { + return apiImportCollectionRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + collectionId: collectionId, } } /* Execute executes the request - @return InlineResponse20035 + @return Import */ -func (r apiGetWebhooksRequest) Execute() (InlineResponse20035, *_nethttp.Response, error) { +func (r apiImportCollectionRequest) Execute() (Import, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20035 + localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetWebhooks") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportCollection") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/webhooks" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.applicationIds != nil { - localVarQueryParams.Add("applicationIds", parameterToString(*r.applicationIds, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.creationType != nil { - localVarQueryParams.Add("creationType", parameterToString(*r.creationType, "")) - } - if r.visibility != nil { - localVarQueryParams.Add("visibility", parameterToString(*r.visibility, "")) - } - if r.outgoingIntegrationsTypeId != nil { - localVarQueryParams.Add("outgoingIntegrationsTypeId", parameterToString(*r.outgoingIntegrationsTypeId, "")) - } - if r.title != nil { - localVarQueryParams.Add("title", parameterToString(*r.title, "")) - } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"multipart/form-data"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -16445,6 +19573,9 @@ func (r apiGetWebhooksRequest) Execute() (InlineResponse20035, *_nethttp.Respons if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.upFile != nil { + localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) + } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -16495,7 +19626,17 @@ func (r apiGetWebhooksRequest) Execute() (InlineResponse20035, *_nethttp.Respons error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20035 + var v Import + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -16518,52 +19659,76 @@ func (r apiGetWebhooksRequest) Execute() (InlineResponse20035, *_nethttp.Respons return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportAccountCollectionRequest struct { - ctx _context.Context - apiService *ManagementApiService - collectionId int32 - upFile *string +type apiImportCouponsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + skipDuplicates *bool + upFile *string } -func (r apiImportAccountCollectionRequest) UpFile(upFile string) apiImportAccountCollectionRequest { +func (r apiImportCouponsRequest) SkipDuplicates(skipDuplicates bool) apiImportCouponsRequest { + r.skipDuplicates = &skipDuplicates + return r +} + +func (r apiImportCouponsRequest) UpFile(upFile string) apiImportCouponsRequest { r.upFile = &upFile return r } /* -ImportAccountCollection Import data into existing account-level collection -Upload a CSV file containing the collection of string values that should be attached as payload for collection. -The file should be sent as multipart data. +ImportCoupons Import coupons +Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. -The import **replaces** the initial content of the collection. +The CSV file contains the following columns: -The CSV file **must** only contain the following column: + - `value` (required): The coupon code. -- `item`: the values in your collection. + - `expirydate`: The end date in RFC3339 of the code redemption period. -A collection is limited to 500,000 items. + - `startdate`: The start date in RFC3339 of the code redemption period. -Example: + - `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). -``` -item -Addidas -Nike -Asics + - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. + + - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. + + - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. + + For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) + called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `"{"category": "10_off"}"`. + +You can use the time zone of your choice. It is converted to UTC internally by Talon.One. + +**Note:** We recommend limiting your file size to 500MB. + +**Example:** + +```text +"value","expirydate","startdate","recipientintegrationid","limitval","attributes","discountlimit" +COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,"{""Category"": ""10_off""}",2.4 ``` -**Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. +Once imported, you can find the `batchId` in the Campaign Manager or by +using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiImportAccountCollectionRequest +@return apiImportCouponsRequest */ -func (a *ManagementApiService) ImportAccountCollection(ctx _context.Context, collectionId int32) apiImportAccountCollectionRequest { - return apiImportAccountCollectionRequest{ - apiService: a, - ctx: ctx, - collectionId: collectionId, +func (a *ManagementApiService) ImportCoupons(ctx _context.Context, applicationId int32, campaignId int32) apiImportCouponsRequest { + return apiImportCouponsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } @@ -16572,7 +19737,7 @@ Execute executes the request @return Import */ -func (r apiImportAccountCollectionRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiImportCouponsRequest) Execute() (Import, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -16582,18 +19747,22 @@ func (r apiImportAccountCollectionRequest) Execute() (Import, *_nethttp.Response localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportAccountCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportCoupons") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections/{collectionId}/import" - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.skipDuplicates != nil { + localVarQueryParams.Add("skipDuplicates", parameterToString(*r.skipDuplicates, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"multipart/form-data"} @@ -16671,26 +19840,6 @@ func (r apiImportAccountCollectionRequest) Execute() (Import, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -16707,50 +19856,48 @@ func (r apiImportAccountCollectionRequest) Execute() (Import, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportAllowedListRequest struct { - ctx _context.Context - apiService *ManagementApiService - attributeId int32 - upFile *string +type apiImportLoyaltyCardsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + upFile *string } -func (r apiImportAllowedListRequest) UpFile(upFile string) apiImportAllowedListRequest { +func (r apiImportLoyaltyCardsRequest) UpFile(upFile string) apiImportLoyaltyCardsRequest { r.upFile = &upFile return r } /* -ImportAllowedList Import allowed values for attribute -Upload a CSV file containing a list of [picklist values](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#picklist-values) for the specified attribute. - -The file should be sent as multipart data. +ImportLoyaltyCards 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. -The import **replaces** the previous list of allowed values for this attribute, if any. +It contains the following columns for each card: -The CSV file **must** only contain the following column: -- `item` (required): the values in your allowed list, for example a list of SKU's. +- `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. -An allowed list is limited to 500,000 items. +**Note:** We recommend limiting your file size to 500MB. -Example: +**Example:** -```text -item -CS-VG-04032021-UP-50D-10 -CS-DV-04042021-UP-49D-12 -CS-DG-02082021-UP-50G-07 +```csv +identifier,state,customerprofileids +123-456-789AT,active,Alexa001;UserA ``` - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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**. + - @param 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. -@return apiImportAllowedListRequest +@return apiImportLoyaltyCardsRequest */ -func (a *ManagementApiService) ImportAllowedList(ctx _context.Context, attributeId int32) apiImportAllowedListRequest { - return apiImportAllowedListRequest{ - apiService: a, - ctx: ctx, - attributeId: attributeId, +func (a *ManagementApiService) ImportLoyaltyCards(ctx _context.Context, loyaltyProgramId int32) apiImportLoyaltyCardsRequest { + return apiImportLoyaltyCardsRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, } } @@ -16759,7 +19906,7 @@ Execute executes the request @return Import */ -func (r apiImportAllowedListRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiImportLoyaltyCardsRequest) Execute() (Import, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -16769,13 +19916,13 @@ func (r apiImportAllowedListRequest) Execute() (Import, *_nethttp.Response, erro localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportAllowedList") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportLoyaltyCards") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/attributes/{attributeId}/allowed_list/import" - localVarPath = strings.Replace(localVarPath, "{"+"attributeId"+"}", _neturl.QueryEscape(parameterToString(r.attributeId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/import_cards" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -16860,16 +20007,6 @@ func (r apiImportAllowedListRequest) Execute() (Import, *_nethttp.Response, erro newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 401 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -16904,58 +20041,60 @@ func (r apiImportAllowedListRequest) Execute() (Import, *_nethttp.Response, erro return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportCollectionRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - collectionId int32 - upFile *string +type apiImportLoyaltyCustomersTiersRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + upFile *string } -func (r apiImportCollectionRequest) UpFile(upFile string) apiImportCollectionRequest { +func (r apiImportLoyaltyCustomersTiersRequest) UpFile(upFile string) apiImportLoyaltyCustomersTiersRequest { r.upFile = &upFile return r } -/* -ImportCollection Import data into existing campaign-level collection -Upload a CSV file containing the collection of string values that should be attached as payload for collection. -The file should be sent as multipart data. +/* +ImportLoyaltyCustomersTiers Import customers into loyalty tiers +Upload a CSV file containing existing customers to be assigned to existing tiers. +Send the file as multipart data. + +**Important:** This endpoint only works with loyalty programs with advanced tiers (with expiration and downgrade policy) feature enabled. -The import **replaces** the initial content of the collection. +The CSV file should contain the following columns: +- `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. +- `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. +- `tiername`: The name of an existing tier to assign to the customer. +- `expirydate`: The expiration date of the tier. It should be a future date. -The CSV file **must** only contain the following column: +About customer assignment to a tier: +- If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. +- If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. -- `item`: the values in your collection. +**Note:** We recommend not using this endpoint to update the tier of a customer. +To update a customer's tier, you can [add](/management-api#tag/Loyalty/operation/addLoyaltyPoints) or [deduct](/management-api#tag/Loyalty/operation/removeLoyaltyPoints) their loyalty points. -A collection is limited to 500,000 items. +You can use the time zone of your choice. It is converted to UTC internally by Talon.One. -Example: +**Note:** We recommend limiting your file size to 500MB. +**Example:** +```csv +subledgerid,customerprofileid,tiername,expirydate +SUB1,alexa,Gold,2024-03-21T07:32:14Z +,george,Silver,2025-04-16T21:12:37Z +SUB2,avocado,Bronze,2026-05-03T11:47:01Z ``` -item -Addidas -Nike -Asics -``` - -**Note:** Before sending a request to this endpoint, ensure the data in the CSV to import is different from the data currently stored in the collection. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. + - @param loyaltyProgramId Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiImportCollectionRequest +@return apiImportLoyaltyCustomersTiersRequest */ -func (a *ManagementApiService) ImportCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiImportCollectionRequest { - return apiImportCollectionRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, - collectionId: collectionId, +func (a *ManagementApiService) ImportLoyaltyCustomersTiers(ctx _context.Context, loyaltyProgramId int32) apiImportLoyaltyCustomersTiersRequest { + return apiImportLoyaltyCustomersTiersRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, } } @@ -16964,7 +20103,7 @@ Execute executes the request @return Import */ -func (r apiImportCollectionRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiImportLoyaltyCustomersTiersRequest) Execute() (Import, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -16974,15 +20113,13 @@ func (r apiImportCollectionRequest) Execute() (Import, *_nethttp.Response, error localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportLoyaltyCustomersTiers") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -17067,6 +20204,16 @@ func (r apiImportCollectionRequest) Execute() (Import, *_nethttp.Response, error newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) @@ -17075,6 +20222,16 @@ func (r apiImportCollectionRequest) Execute() (Import, *_nethttp.Response, error return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17091,70 +20248,73 @@ func (r apiImportCollectionRequest) Execute() (Import, *_nethttp.Response, error return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportCouponsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - upFile *string +type apiImportLoyaltyPointsRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + upFile *string } -func (r apiImportCouponsRequest) UpFile(upFile string) apiImportCouponsRequest { +func (r apiImportLoyaltyPointsRequest) UpFile(upFile string) apiImportLoyaltyPointsRequest { r.upFile = &upFile return r } /* -ImportCoupons Import coupons -Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. - -The CSV file contains the following columns: - - - `value` (required): The coupon code. +ImportLoyaltyPoints Import loyalty points +Upload a CSV file containing the loyalty points you want to import into a given loyalty program. +Send the file as multipart data. - - `expirydate`: The end date in RFC3339 of the code redemption period. +Depending on the type of loyalty program, you can import points into a given customer profile or loyalty card. - - `startdate`: The start date in RFC3339 of the code redemption period. +The CSV file contains the following columns: - - `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). +- `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. +- `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. +- `amount`: The amount of points to award to the customer profile. +- `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. - - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. + **Note**: It must be an RFC3339 timestamp string or string `immediate`. Empty or missing values are considered `immediate`. - - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. +- `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. - - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. + **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. - For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) - called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `"{"category": "10_off"}"`. +- `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:** +**Example for profile-based programs:** ```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 +customerprofileid,amount,startdate,expirydate,subledgerid,reason +URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement ``` -Once imported, you can find the `batchId` in the Campaign Manager or by -using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). +**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 +``` - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param loyaltyProgramId Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiImportCouponsRequest +@return apiImportLoyaltyPointsRequest */ -func (a *ManagementApiService) ImportCoupons(ctx _context.Context, applicationId int32, campaignId int32) apiImportCouponsRequest { - return apiImportCouponsRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, +func (a *ManagementApiService) ImportLoyaltyPoints(ctx _context.Context, loyaltyProgramId int32) apiImportLoyaltyPointsRequest { + return apiImportLoyaltyPointsRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, } } @@ -17163,7 +20323,7 @@ Execute executes the request @return Import */ -func (r apiImportCouponsRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiImportLoyaltyPointsRequest) Execute() (Import, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -17173,14 +20333,13 @@ func (r apiImportCouponsRequest) Execute() (Import, *_nethttp.Response, error) { localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportCoupons") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportLoyaltyPoints") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/import_points" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -17279,48 +20438,58 @@ func (r apiImportCouponsRequest) Execute() (Import, *_nethttp.Response, error) { return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportLoyaltyCardsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - upFile *string +type apiImportPoolGiveawaysRequest struct { + ctx _context.Context + apiService *ManagementApiService + poolId int32 + upFile *string } -func (r apiImportLoyaltyCardsRequest) UpFile(upFile string) apiImportLoyaltyCardsRequest { +func (r apiImportPoolGiveawaysRequest) UpFile(upFile string) apiImportPoolGiveawaysRequest { r.upFile = &upFile return r } /* -ImportLoyaltyCards 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. +ImportPoolGiveaways 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. -It contains the following columns for each card: +The CSV file contains the following columns: +- `code` (required): The code of your giveaway, for instance, a gift card redemption code. +- `startdate`: The start date in RFC3339 of the code redemption period. +- `enddate`: The last date in RFC3339 of the code redemption period. +- `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks. -- `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. + For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) + called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `"{"provider": "myPartnerCompany"}"`. -**Note:** We recommend limiting your file size to 500MB. +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 setting of your choice. The values are converted to UTC internally by Talon.One. + +**Note:** + +- We recommend limiting your file size to 500MB. +- You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. **Example:** -```csv -identifier,state,customerprofileids -123-456-789AT,active,Alexa001;UserA +```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""}" ``` - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. -@return apiImportLoyaltyCardsRequest +@return apiImportPoolGiveawaysRequest */ -func (a *ManagementApiService) ImportLoyaltyCards(ctx _context.Context, loyaltyProgramId int32) apiImportLoyaltyCardsRequest { - return apiImportLoyaltyCardsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) ImportPoolGiveaways(ctx _context.Context, poolId int32) apiImportPoolGiveawaysRequest { + return apiImportPoolGiveawaysRequest{ + apiService: a, + ctx: ctx, + poolId: poolId, } } @@ -17329,7 +20498,7 @@ Execute executes the request @return Import */ -func (r apiImportLoyaltyCardsRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiImportPoolGiveawaysRequest) Execute() (Import, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -17339,13 +20508,13 @@ func (r apiImportLoyaltyCardsRequest) Execute() (Import, *_nethttp.Response, err localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportLoyaltyCards") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportPoolGiveaways") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/import_cards" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/giveaways/pools/{poolId}/import" + localVarPath = strings.Replace(localVarPath, "{"+"poolId"+"}", _neturl.QueryEscape(parameterToString(r.poolId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -17428,26 +20597,6 @@ func (r apiImportLoyaltyCardsRequest) Execute() (Import, *_nethttp.Response, err return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17464,58 +20613,65 @@ func (r apiImportLoyaltyCardsRequest) Execute() (Import, *_nethttp.Response, err return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportLoyaltyCustomersTiersRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - upFile *string +type apiImportReferralsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + upFile *string } -func (r apiImportLoyaltyCustomersTiersRequest) UpFile(upFile string) apiImportLoyaltyCustomersTiersRequest { +func (r apiImportReferralsRequest) UpFile(upFile string) apiImportReferralsRequest { r.upFile = &upFile return r } /* -ImportLoyaltyCustomersTiers Import customers into loyalty tiers -Upload a CSV file containing existing customers to be assigned to existing tiers. -Send the file as multipart data. +ImportReferrals Import referrals +Upload a CSV file containing the referrals that should be created. +The file should be sent as multipart data. -**Important:** This endpoint only works with loyalty programs with advanced tiers (with expiration and downgrade policy) feature enabled. +The CSV file contains the following columns: -The CSV file should contain the following columns: -- `subledgerid` (optional): The ID of the subledger. If this field is empty, the main ledger will be used. -- `customerprofileid`: The integration ID of the customer profile to whom the tier should be assigned. -- `tiername`: The name of an existing tier to assign to the customer. -- `expirydate`: The expiration date of the tier. It should be a future date. +- `code` (required): The referral code. +- `advocateprofileintegrationid` (required): The profile ID of the advocate. +- `startdate`: The start date in RFC3339 of the code redemption period. +- `expirydate`: The end date in RFC3339 of the code redemption period. +- `limitval`: The maximum number of redemptions of this code. Defaults to `1` when left blank. +- `attributes`: A JSON object describing _custom_ referral attribute names and their values, enclosed with double quotation marks. -About customer assignment to a tier: -- If the customer isn't already in a tier, the customer is assigned to the specified tier during the tier import. -- If the customer is already in a tier, the customer is assigned to match the new information provided in the CSV file. -- If the customer is already in the tier that's specified in the CSV file, only the expiration date is updated. + For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) + called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `"{"category": "10_off"}"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. +**Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) +is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) +endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) +endpoint to create the customer profiles. + **Note:** We recommend limiting your file size to 500MB. **Example:** -```csv -subledgerid,customerprofileid,tiername,expirydate -SUB1,alexa,Gold,2024-03-21T07:32:14Z -,george,Silver,2025-04-16T21:12:37Z -SUB2,avocado,Bronze,2026-05-03T11:47:01Z + +```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""}" ``` - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiImportLoyaltyCustomersTiersRequest +@return apiImportReferralsRequest */ -func (a *ManagementApiService) ImportLoyaltyCustomersTiers(ctx _context.Context, loyaltyProgramId int32) apiImportLoyaltyCustomersTiersRequest { - return apiImportLoyaltyCustomersTiersRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) ImportReferrals(ctx _context.Context, applicationId int32, campaignId int32) apiImportReferralsRequest { + return apiImportReferralsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } @@ -17524,7 +20680,7 @@ Execute executes the request @return Import */ -func (r apiImportLoyaltyCustomersTiersRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiImportReferralsRequest) Execute() (Import, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} @@ -17534,13 +20690,14 @@ func (r apiImportLoyaltyCustomersTiersRequest) Execute() (Import, *_nethttp.Resp localVarReturnValue Import ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportLoyaltyCustomersTiers") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportReferrals") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/import_customers_tiers" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -17623,36 +20780,6 @@ func (r apiImportLoyaltyCustomersTiersRequest) Execute() (Import, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v } return localVarReturnValue, localVarHTTPResponse, newErr } @@ -17669,105 +20796,98 @@ func (r apiImportLoyaltyCustomersTiersRequest) Execute() (Import, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportLoyaltyPointsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - upFile *string +type apiListAccountCollectionsRequest struct { + ctx _context.Context + apiService *ManagementApiService + pageSize *int32 + skip *int32 + sort *string + withTotalResultSize *bool + name *string } -func (r apiImportLoyaltyPointsRequest) UpFile(upFile string) apiImportLoyaltyPointsRequest { - r.upFile = &upFile +func (r apiListAccountCollectionsRequest) PageSize(pageSize int32) apiListAccountCollectionsRequest { + r.pageSize = &pageSize return r } -/* -ImportLoyaltyPoints Import loyalty points -Upload a CSV file containing the loyalty points you want to import into a given loyalty program. -Send the file as multipart data. - -Depending on the loyalty program type, you can import the points into a given customer profile or into a given _active_ loyalty card. - -The CSV file contains the following columns: - -- `customerprofileid` (optional): For profile-based loyalty programs, the integration ID of the customer profile where the loyalty points are imported. -- `identifier` (optional): For card-based loyalty programs, the identifier of the loyalty card where the loyalty points are imported. -- `amount`: The amount of points to award to the customer profile. -- `startdate` (optional): The earliest date when the points can be redeemed. The points are `active` from this date until the expiration date. - - **Note**: It must be an RFC3339 timestamp string or string `immediate`. Empty or missing values are considered `immediate`. - -- `expirydate` (optional): The latest date when the points can be redeemed. The points are `expired` after this date. - - **Note**: It must be an RFC3339 timestamp string or string `unlimited`. Empty or missing values are considered `unlimited`. - -- `subledgerid` (optional): The ID of the subledger that should received the points. -- `reason` (optional): The reason why these points are awarded. - -You can use the time zone of your choice. It is converted to UTC internally by Talon.One. - -**Note:** For existing customer profiles and loyalty cards, the imported points are added to any previous active or pending points, depending on the -value provided for `startdate`. If `startdate` matches the current date, the imported points are _active_. If it is later, the points are _pending_ until -the date provided for `startdate` is reached. - -**Note:** We recommend limiting your file size to 500MB. - -**Example for profile-based programs:** +func (r apiListAccountCollectionsRequest) Skip(skip int32) apiListAccountCollectionsRequest { + r.skip = &skip + return r +} -```text -customerprofileid,amount,startdate,expirydate,subledgerid,reason -URNGV8294NV,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement -``` +func (r apiListAccountCollectionsRequest) Sort(sort string) apiListAccountCollectionsRequest { + r.sort = &sort + return r +} -**Example for card-based programs:** +func (r apiListAccountCollectionsRequest) WithTotalResultSize(withTotalResultSize bool) apiListAccountCollectionsRequest { + r.withTotalResultSize = &withTotalResultSize + return r +} -```text -identifier,amount,startdate,expirydate,subledgerid,reason -summer-loyalty-card-0543,100,2009-11-10T23:00:00Z,2009-11-11T23:00:00Z,subledger1,appeasement -``` +func (r apiListAccountCollectionsRequest) Name(name string) apiListAccountCollectionsRequest { + r.name = &name + return r +} +/* +ListAccountCollections List collections in account +List account-level collections in the account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. -@return apiImportLoyaltyPointsRequest +@return apiListAccountCollectionsRequest */ -func (a *ManagementApiService) ImportLoyaltyPoints(ctx _context.Context, loyaltyProgramId int32) apiImportLoyaltyPointsRequest { - return apiImportLoyaltyPointsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) ListAccountCollections(ctx _context.Context) apiListAccountCollectionsRequest { + return apiListAccountCollectionsRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return Import + @return InlineResponse20017 */ -func (r apiImportLoyaltyPointsRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiListAccountCollectionsRequest) Execute() (InlineResponse20017, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Import + localVarReturnValue InlineResponse20017 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportLoyaltyPoints") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListAccountCollections") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/import_points" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/collections" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.withTotalResultSize != nil { + localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + } + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"multipart/form-data"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -17783,9 +20903,6 @@ func (r apiImportLoyaltyPointsRequest) Execute() (Import, *_nethttp.Response, er if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.upFile != nil { - localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) - } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -17836,7 +20953,37 @@ func (r apiImportLoyaltyPointsRequest) Execute() (Import, *_nethttp.Response, er error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Import + var v InlineResponse20017 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -17856,93 +21003,91 @@ func (r apiImportLoyaltyPointsRequest) Execute() (Import, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil +} + +type apiListAchievementsRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + pageSize *int32 + skip *int32 + title *string +} + +func (r apiListAchievementsRequest) PageSize(pageSize int32) apiListAchievementsRequest { + r.pageSize = &pageSize + return r } -type apiImportPoolGiveawaysRequest struct { - ctx _context.Context - apiService *ManagementApiService - poolId int32 - upFile *string +func (r apiListAchievementsRequest) Skip(skip int32) apiListAchievementsRequest { + r.skip = &skip + return r } -func (r apiImportPoolGiveawaysRequest) UpFile(upFile string) apiImportPoolGiveawaysRequest { - r.upFile = &upFile +func (r apiListAchievementsRequest) Title(title string) apiListAchievementsRequest { + r.title = &title return r } /* -ImportPoolGiveaways 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 contains the following columns: -- `code` (required): the code of your giveaway, for instance, a gift card redemption code. -- `startdate`: the start date in RFC3339 of the code redemption period. -- `enddate`: the last date in RFC3339 of the code redemption period. -- `attributes`: A JSON object describing _custom_ giveaway attribute names and their values, enclosed with double quotation marks. - - For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) - called `provider` associated with the giveaway entity, the object in the CSV file, when opened in a text editor, must be: `"{"provider": "myPartnerCompany"}"`. - -The `startdate` and `enddate` have nothing to do with the _validity_ of the codes. They are only used by the Rule Engine to award the codes or not. -You can use the time zone of your choice. The values are converted to UTC internally by Talon.One. - -**Note:** - -- We recommend limiting your file size to 500MB. -- You can import the same code multiple times. Duplicate codes are treated and distributed to customers as unique codes. - -**Example:** - -```text -code,startdate,enddate,attributes -GIVEAWAY1,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Amazon""}" -GIVEAWAY2,2020-11-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Amazon""}" -GIVEAWAY3,2021-01-10T23:00:00Z,2022-11-11T23:00:00Z,"{""provider"": ""Aliexpress""}" -``` - +ListAchievements List achievements +List all the achievements for a specific campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param poolId The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiImportPoolGiveawaysRequest +@return apiListAchievementsRequest */ -func (a *ManagementApiService) ImportPoolGiveaways(ctx _context.Context, poolId int32) apiImportPoolGiveawaysRequest { - return apiImportPoolGiveawaysRequest{ - apiService: a, - ctx: ctx, - poolId: poolId, +func (a *ManagementApiService) ListAchievements(ctx _context.Context, applicationId int32, campaignId int32) apiListAchievementsRequest { + return apiListAchievementsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return Import + @return InlineResponse20046 */ -func (r apiImportPoolGiveawaysRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiListAchievementsRequest) Execute() (InlineResponse20046, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Import + localVarReturnValue InlineResponse20046 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportPoolGiveaways") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListAchievements") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/giveaways/pools/{poolId}/import" - localVarPath = strings.Replace(localVarPath, "{"+"poolId"+"}", _neturl.QueryEscape(parameterToString(r.poolId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/achievements" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.title != nil { + localVarQueryParams.Add("title", parameterToString(*r.title, "")) + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"multipart/form-data"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -17958,9 +21103,6 @@ func (r apiImportPoolGiveawaysRequest) Execute() (Import, *_nethttp.Response, er if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.upFile != nil { - localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) - } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -18011,7 +21153,7 @@ func (r apiImportPoolGiveawaysRequest) Execute() (Import, *_nethttp.Response, er error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Import + var v InlineResponse20046 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -18034,98 +21176,103 @@ func (r apiImportPoolGiveawaysRequest) Execute() (Import, *_nethttp.Response, er return localVarReturnValue, localVarHTTPResponse, nil } -type apiImportReferralsRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - upFile *string +type apiListCatalogItemsRequest struct { + ctx _context.Context + apiService *ManagementApiService + catalogId int32 + pageSize *int32 + skip *int32 + withTotalResultSize *bool + sku *[]string + productNames *[]string } -func (r apiImportReferralsRequest) UpFile(upFile string) apiImportReferralsRequest { - r.upFile = &upFile +func (r apiListCatalogItemsRequest) PageSize(pageSize int32) apiListCatalogItemsRequest { + r.pageSize = &pageSize return r } -/* -ImportReferrals 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, enclosed with double quotation marks. - - For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) - called `category` associated with the referral entity, the object in the CSV file, when opened in a text editor, must be: `"{"category": "10_off"}"`. - -You can use the time zone of your choice. It is converted to UTC internally by Talon.One. +func (r apiListCatalogItemsRequest) Skip(skip int32) apiListCatalogItemsRequest { + r.skip = &skip + return r +} -**Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) -is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) -endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) -endpoint to create the customer profiles. +func (r apiListCatalogItemsRequest) WithTotalResultSize(withTotalResultSize bool) apiListCatalogItemsRequest { + r.withTotalResultSize = &withTotalResultSize + return r +} -**Note:** We recommend limiting your file size to 500MB. +func (r apiListCatalogItemsRequest) Sku(sku []string) apiListCatalogItemsRequest { + r.sku = &sku + return r +} -**Example:** +func (r apiListCatalogItemsRequest) ProductNames(productNames []string) apiListCatalogItemsRequest { + r.productNames = &productNames + return r +} -```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""}" -``` +/* +ListCatalogItems List items in a catalog +Return a paginated list of cart items in the given catalog. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. -@return apiImportReferralsRequest +@return apiListCatalogItemsRequest */ -func (a *ManagementApiService) ImportReferrals(ctx _context.Context, applicationId int32, campaignId int32) apiImportReferralsRequest { - return apiImportReferralsRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, +func (a *ManagementApiService) ListCatalogItems(ctx _context.Context, catalogId int32) apiListCatalogItemsRequest { + return apiListCatalogItemsRequest{ + apiService: a, + ctx: ctx, + catalogId: catalogId, } } /* Execute executes the request - @return Import + @return InlineResponse20035 */ -func (r apiImportReferralsRequest) Execute() (Import, *_nethttp.Response, error) { +func (r apiListCatalogItemsRequest) Execute() (InlineResponse20035, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Import + localVarReturnValue InlineResponse20035 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ImportReferrals") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCatalogItems") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath := localBasePath + "/v1/catalogs/{catalogId}/items" + localVarPath = strings.Replace(localVarPath, "{"+"catalogId"+"}", _neturl.QueryEscape(parameterToString(r.catalogId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.withTotalResultSize != nil { + localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) + } + if r.sku != nil { + localVarQueryParams.Add("sku", parameterToString(*r.sku, "csv")) + } + if r.productNames != nil { + localVarQueryParams.Add("productNames", parameterToString(*r.productNames, "csv")) + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"multipart/form-data"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -18141,9 +21288,6 @@ func (r apiImportReferralsRequest) Execute() (Import, *_nethttp.Response, error) if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - if r.upFile != nil { - localVarFormParams.Add("upFile", parameterToString(*r.upFile, "")) - } if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -18194,7 +21338,7 @@ func (r apiImportReferralsRequest) Execute() (Import, *_nethttp.Response, error) error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Import + var v InlineResponse20035 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -18217,9 +21361,11 @@ func (r apiImportReferralsRequest) Execute() (Import, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } -type apiListAccountCollectionsRequest struct { +type apiListCollectionsRequest struct { ctx _context.Context apiService *ManagementApiService + applicationId int32 + campaignId int32 pageSize *int32 skip *int32 sort *string @@ -18227,66 +21373,72 @@ type apiListAccountCollectionsRequest struct { name *string } -func (r apiListAccountCollectionsRequest) PageSize(pageSize int32) apiListAccountCollectionsRequest { +func (r apiListCollectionsRequest) PageSize(pageSize int32) apiListCollectionsRequest { r.pageSize = &pageSize return r } -func (r apiListAccountCollectionsRequest) Skip(skip int32) apiListAccountCollectionsRequest { +func (r apiListCollectionsRequest) Skip(skip int32) apiListCollectionsRequest { r.skip = &skip return r } -func (r apiListAccountCollectionsRequest) Sort(sort string) apiListAccountCollectionsRequest { +func (r apiListCollectionsRequest) Sort(sort string) apiListCollectionsRequest { r.sort = &sort return r } -func (r apiListAccountCollectionsRequest) WithTotalResultSize(withTotalResultSize bool) apiListAccountCollectionsRequest { +func (r apiListCollectionsRequest) WithTotalResultSize(withTotalResultSize bool) apiListCollectionsRequest { r.withTotalResultSize = &withTotalResultSize return r } -func (r apiListAccountCollectionsRequest) Name(name string) apiListAccountCollectionsRequest { +func (r apiListCollectionsRequest) Name(name string) apiListCollectionsRequest { r.name = &name return r } /* -ListAccountCollections List collections in account -List account-level collections in the account. +ListCollections List collections in campaign +List collections in a given campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiListAccountCollectionsRequest +@return apiListCollectionsRequest */ -func (a *ManagementApiService) ListAccountCollections(ctx _context.Context) apiListAccountCollectionsRequest { - return apiListAccountCollectionsRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) ListCollections(ctx _context.Context, applicationId int32, campaignId int32) apiListCollectionsRequest { + return apiListCollectionsRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return InlineResponse20016 + @return InlineResponse20017 */ -func (r apiListAccountCollectionsRequest) Execute() (InlineResponse20016, *_nethttp.Response, error) { +func (r apiListCollectionsRequest) Execute() (InlineResponse20017, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20016 + localVarReturnValue InlineResponse20017 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListAccountCollections") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCollections") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -18374,27 +21526,7 @@ func (r apiListAccountCollectionsRequest) Execute() (InlineResponse20016, *_neth error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20016 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus + var v InlineResponse20017 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -18427,75 +21559,80 @@ func (r apiListAccountCollectionsRequest) Execute() (InlineResponse20016, *_neth return localVarReturnValue, localVarHTTPResponse, nil } -type apiListCatalogItemsRequest struct { +type apiListCollectionsInApplicationRequest struct { ctx _context.Context apiService *ManagementApiService - catalogId int32 + applicationId int32 pageSize *int32 skip *int32 + sort *string withTotalResultSize *bool - sku *string + name *string } -func (r apiListCatalogItemsRequest) PageSize(pageSize int32) apiListCatalogItemsRequest { +func (r apiListCollectionsInApplicationRequest) PageSize(pageSize int32) apiListCollectionsInApplicationRequest { r.pageSize = &pageSize return r } -func (r apiListCatalogItemsRequest) Skip(skip int32) apiListCatalogItemsRequest { +func (r apiListCollectionsInApplicationRequest) Skip(skip int32) apiListCollectionsInApplicationRequest { r.skip = &skip return r } -func (r apiListCatalogItemsRequest) WithTotalResultSize(withTotalResultSize bool) apiListCatalogItemsRequest { +func (r apiListCollectionsInApplicationRequest) Sort(sort string) apiListCollectionsInApplicationRequest { + r.sort = &sort + return r +} + +func (r apiListCollectionsInApplicationRequest) WithTotalResultSize(withTotalResultSize bool) apiListCollectionsInApplicationRequest { r.withTotalResultSize = &withTotalResultSize return r } -func (r apiListCatalogItemsRequest) Sku(sku string) apiListCatalogItemsRequest { - r.sku = &sku +func (r apiListCollectionsInApplicationRequest) Name(name string) apiListCollectionsInApplicationRequest { + r.name = &name return r } /* -ListCatalogItems List items in a catalog -Return a paginated list of cart items in the given catalog. - +ListCollectionsInApplication List collections in Application +List campaign-level collections from all campaigns in a given Application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param catalogId The ID of the catalog. You can find the ID in the Campaign Manager in **Account** > **Tools** > **Cart item catalogs**. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiListCatalogItemsRequest +@return apiListCollectionsInApplicationRequest */ -func (a *ManagementApiService) ListCatalogItems(ctx _context.Context, catalogId int32) apiListCatalogItemsRequest { - return apiListCatalogItemsRequest{ - apiService: a, - ctx: ctx, - catalogId: catalogId, +func (a *ManagementApiService) ListCollectionsInApplication(ctx _context.Context, applicationId int32) apiListCollectionsInApplicationRequest { + return apiListCollectionsInApplicationRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return InlineResponse20033 + @return InlineResponse20017 */ -func (r apiListCatalogItemsRequest) Execute() (InlineResponse20033, *_nethttp.Response, error) { +func (r apiListCollectionsInApplicationRequest) Execute() (InlineResponse20017, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20033 + localVarReturnValue InlineResponse20017 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCatalogItems") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCollectionsInApplication") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/catalogs/{catalogId}/items" - localVarPath = strings.Replace(localVarPath, "{"+"catalogId"+"}", _neturl.QueryEscape(parameterToString(r.catalogId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/collections" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -18507,11 +21644,14 @@ func (r apiListCatalogItemsRequest) Execute() (InlineResponse20033, *_nethttp.Re if r.skip != nil { localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } if r.withTotalResultSize != nil { localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) } - if r.sku != nil { - localVarQueryParams.Add("sku", parameterToString(*r.sku, "")) + if r.name != nil { + localVarQueryParams.Add("name", parameterToString(*r.name, "")) } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -18580,7 +21720,17 @@ func (r apiListCatalogItemsRequest) Execute() (InlineResponse20033, *_nethttp.Re error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20033 + var v InlineResponse20017 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -18603,84 +21753,98 @@ func (r apiListCatalogItemsRequest) Execute() (InlineResponse20033, *_nethttp.Re return localVarReturnValue, localVarHTTPResponse, nil } -type apiListCollectionsRequest struct { +type apiListStoresRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - campaignId int32 pageSize *int32 skip *int32 sort *string withTotalResultSize *bool + campaignId *float32 name *string + integrationId *string + query *string } -func (r apiListCollectionsRequest) PageSize(pageSize int32) apiListCollectionsRequest { +func (r apiListStoresRequest) PageSize(pageSize int32) apiListStoresRequest { r.pageSize = &pageSize return r } -func (r apiListCollectionsRequest) Skip(skip int32) apiListCollectionsRequest { +func (r apiListStoresRequest) Skip(skip int32) apiListStoresRequest { r.skip = &skip return r } -func (r apiListCollectionsRequest) Sort(sort string) apiListCollectionsRequest { +func (r apiListStoresRequest) Sort(sort string) apiListStoresRequest { r.sort = &sort return r } -func (r apiListCollectionsRequest) WithTotalResultSize(withTotalResultSize bool) apiListCollectionsRequest { +func (r apiListStoresRequest) WithTotalResultSize(withTotalResultSize bool) apiListStoresRequest { r.withTotalResultSize = &withTotalResultSize return r } -func (r apiListCollectionsRequest) Name(name string) apiListCollectionsRequest { +func (r apiListStoresRequest) CampaignId(campaignId float32) apiListStoresRequest { + r.campaignId = &campaignId + return r +} + +func (r apiListStoresRequest) Name(name string) apiListStoresRequest { r.name = &name return r } +func (r apiListStoresRequest) IntegrationId(integrationId string) apiListStoresRequest { + r.integrationId = &integrationId + return r +} + +func (r apiListStoresRequest) Query(query string) apiListStoresRequest { + r.query = &query + return r +} + /* -ListCollections List collections in campaign -List collections in a given campaign. +ListStores List stores +List all stores for a specific Application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiListCollectionsRequest +@return apiListStoresRequest */ -func (a *ManagementApiService) ListCollections(ctx _context.Context, applicationId int32, campaignId int32) apiListCollectionsRequest { - return apiListCollectionsRequest{ +func (a *ManagementApiService) ListStores(ctx _context.Context, applicationId int32) apiListStoresRequest { + return apiListStoresRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - campaignId: campaignId, } } /* Execute executes the request - @return InlineResponse20018 + @return InlineResponse20045 */ -func (r apiListCollectionsRequest) Execute() (InlineResponse20018, *_nethttp.Response, error) { +func (r apiListStoresRequest) Execute() (InlineResponse20045, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20018 + localVarReturnValue InlineResponse20045 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCollections") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListStores") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections" + localVarPath := localBasePath + "/v1/applications/{applicationId}/stores" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -18698,9 +21862,18 @@ func (r apiListCollectionsRequest) Execute() (InlineResponse20018, *_nethttp.Res if r.withTotalResultSize != nil { localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) } + if r.campaignId != nil { + localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) + } if r.name != nil { localVarQueryParams.Add("name", parameterToString(*r.name, "")) } + if r.integrationId != nil { + localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) + } + if r.query != nil { + localVarQueryParams.Add("query", parameterToString(*r.query, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -18768,17 +21941,7 @@ func (r apiListCollectionsRequest) Execute() (InlineResponse20018, *_nethttp.Res error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20018 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v InlineResponse20045 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -18801,102 +21964,204 @@ func (r apiListCollectionsRequest) Execute() (InlineResponse20018, *_nethttp.Res return localVarReturnValue, localVarHTTPResponse, nil } -type apiListCollectionsInApplicationRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - pageSize *int32 - skip *int32 - sort *string - withTotalResultSize *bool - name *string +type apiNotificationActivationRequest struct { + ctx _context.Context + apiService *ManagementApiService + notificationId int32 + body *NotificationActivation } -func (r apiListCollectionsInApplicationRequest) PageSize(pageSize int32) apiListCollectionsInApplicationRequest { - r.pageSize = &pageSize +func (r apiNotificationActivationRequest) Body(body NotificationActivation) apiNotificationActivationRequest { + r.body = &body return r } -func (r apiListCollectionsInApplicationRequest) Skip(skip int32) apiListCollectionsInApplicationRequest { - r.skip = &skip - return r -} +/* +NotificationActivation Activate or deactivate notification +Activate or deactivate the given notification. +When `enabled` is false, updates will no longer be sent for the given notification. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. + +@return apiNotificationActivationRequest +*/ +func (a *ManagementApiService) NotificationActivation(ctx _context.Context, notificationId int32) apiNotificationActivationRequest { + return apiNotificationActivationRequest{ + apiService: a, + ctx: ctx, + notificationId: notificationId, + } +} + +/* +Execute executes the request +*/ +func (r apiNotificationActivationRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPut + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.NotificationActivation") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/notifications/{notificationId}/activation" + localVarPath = strings.Replace(localVarPath, "{"+"notificationId"+"}", _neturl.QueryEscape(parameterToString(r.notificationId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } -func (r apiListCollectionsInApplicationRequest) Sort(sort string) apiListCollectionsInApplicationRequest { - r.sort = &sort - return r + return localVarHTTPResponse, nil } -func (r apiListCollectionsInApplicationRequest) WithTotalResultSize(withTotalResultSize bool) apiListCollectionsInApplicationRequest { - r.withTotalResultSize = &withTotalResultSize - return r +type apiPostAddedDeductedPointsNotificationRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + body *NewBaseNotification } -func (r apiListCollectionsInApplicationRequest) Name(name string) apiListCollectionsInApplicationRequest { - r.name = &name +func (r apiPostAddedDeductedPointsNotificationRequest) Body(body NewBaseNotification) apiPostAddedDeductedPointsNotificationRequest { + r.body = &body return r } /* -ListCollectionsInApplication List collections in Application -List campaign-level collections from all campaigns in a given Application. +PostAddedDeductedPointsNotification Create notification about added or deducted loyalty points +Create a notification about added or deducted loyalty points in a given profile-based loyalty program. +A notification for added or deducted loyalty points is different from regular webhooks +in that it is loyalty program-scoped and has a predefined payload. + +For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications). + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiListCollectionsInApplicationRequest +@return apiPostAddedDeductedPointsNotificationRequest */ -func (a *ManagementApiService) ListCollectionsInApplication(ctx _context.Context, applicationId int32) apiListCollectionsInApplicationRequest { - return apiListCollectionsInApplicationRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) PostAddedDeductedPointsNotification(ctx _context.Context, loyaltyProgramId int32) apiPostAddedDeductedPointsNotificationRequest { + return apiPostAddedDeductedPointsNotificationRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, } } /* Execute executes the request - @return InlineResponse20018 + @return BaseNotification */ -func (r apiListCollectionsInApplicationRequest) Execute() (InlineResponse20018, *_nethttp.Response, error) { +func (r apiPostAddedDeductedPointsNotificationRequest) Execute() (BaseNotification, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20018 + localVarReturnValue BaseNotification ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListCollectionsInApplication") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.PostAddedDeductedPointsNotification") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/collections" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.withTotalResultSize != nil { - localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -18912,6 +22177,8 @@ func (r apiListCollectionsInApplicationRequest) Execute() (InlineResponse20018, if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -18962,7 +22229,27 @@ func (r apiListCollectionsInApplicationRequest) Execute() (InlineResponse20018, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20018 + var v BaseNotification + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -18995,64 +22282,32 @@ func (r apiListCollectionsInApplicationRequest) Execute() (InlineResponse20018, return localVarReturnValue, localVarHTTPResponse, nil } -type apiListStoresRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - pageSize *int32 - skip *int32 - sort *string - withTotalResultSize *bool - campaignId *float32 - name *string - integrationId *string -} - -func (r apiListStoresRequest) PageSize(pageSize int32) apiListStoresRequest { - r.pageSize = &pageSize - return r -} - -func (r apiListStoresRequest) Skip(skip int32) apiListStoresRequest { - r.skip = &skip - return r -} - -func (r apiListStoresRequest) Sort(sort string) apiListStoresRequest { - r.sort = &sort - return r -} - -func (r apiListStoresRequest) WithTotalResultSize(withTotalResultSize bool) apiListStoresRequest { - r.withTotalResultSize = &withTotalResultSize - return r +type apiPostCatalogsStrikethroughNotificationRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + body *NewBaseNotification } -func (r apiListStoresRequest) CampaignId(campaignId float32) apiListStoresRequest { - r.campaignId = &campaignId +func (r apiPostCatalogsStrikethroughNotificationRequest) Body(body NewBaseNotification) apiPostCatalogsStrikethroughNotificationRequest { + r.body = &body return r } -func (r apiListStoresRequest) Name(name string) apiListStoresRequest { - r.name = &name - return r -} +/* +PostCatalogsStrikethroughNotification Create strikethrough notification +Create a notification for the in the given Application. +For more information, see [Managing notifications](https://docs.talon.one/docs/product/applications/outbound-notifications). -func (r apiListStoresRequest) IntegrationId(integrationId string) apiListStoresRequest { - r.integrationId = &integrationId - return r -} +See the [payload](https://docs.talon.one/outbound-notifications) you will receive. -/* -ListStores List stores -List all stores for a specific Application. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiListStoresRequest +@return apiPostCatalogsStrikethroughNotificationRequest */ -func (a *ManagementApiService) ListStores(ctx _context.Context, applicationId int32) apiListStoresRequest { - return apiListStoresRequest{ +func (a *ManagementApiService) PostCatalogsStrikethroughNotification(ctx _context.Context, applicationId int32) apiPostCatalogsStrikethroughNotificationRequest { + return apiPostCatalogsStrikethroughNotificationRequest{ apiService: a, ctx: ctx, applicationId: applicationId, @@ -19062,53 +22317,36 @@ func (a *ManagementApiService) ListStores(ctx _context.Context, applicationId in /* Execute executes the request - @return InlineResponse20043 + @return BaseNotification */ -func (r apiListStoresRequest) Execute() (InlineResponse20043, *_nethttp.Response, error) { +func (r apiPostCatalogsStrikethroughNotificationRequest) Execute() (BaseNotification, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodGet + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse20043 + localVarReturnValue BaseNotification ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListStores") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.PostCatalogsStrikethroughNotification") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/stores" + localVarPath := localBasePath + "/v1/applications/{applicationId}/catalogs/notifications/strikethrough" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.withTotalResultSize != nil { - localVarQueryParams.Add("withTotalResultSize", parameterToString(*r.withTotalResultSize, "")) - } - if r.campaignId != nil { - localVarQueryParams.Add("campaignId", parameterToString(*r.campaignId, "")) - } - if r.name != nil { - localVarQueryParams.Add("name", parameterToString(*r.name, "")) - } - if r.integrationId != nil { - localVarQueryParams.Add("integrationId", parameterToString(*r.integrationId, "")) + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") } + // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -19124,6 +22362,8 @@ func (r apiListStoresRequest) Execute() (InlineResponse20043, *_nethttp.Response if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + // body params + localVarPostBody = r.body if r.ctx != nil { // API Key Authentication if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { @@ -19151,30 +22391,60 @@ func (r apiListStoresRequest) Execute() (InlineResponse20043, *_nethttp.Response localVarHeaderParams["Authorization"] = key } } - } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := r.apiService.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20043 + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v BaseNotification + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -19197,62 +22467,64 @@ func (r apiListStoresRequest) Execute() (InlineResponse20043, *_nethttp.Response return localVarReturnValue, localVarHTTPResponse, nil } -type apiNotificationActivationRequest struct { - ctx _context.Context - apiService *ManagementApiService - notificationId int32 - body *NotificationActivation +type apiPostPendingPointsNotificationRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + body *NewBaseNotification } -func (r apiNotificationActivationRequest) Body(body NotificationActivation) apiNotificationActivationRequest { +func (r apiPostPendingPointsNotificationRequest) Body(body NewBaseNotification) apiPostPendingPointsNotificationRequest { r.body = &body return r } /* -NotificationActivation Activate or deactivate notification -Activate or deactivate the given notification. -When `enabled` is false, updates will no longer be sent for the given notification. +PostPendingPointsNotification Create notification about pending loyalty points +Create a notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/managing-loyalty-notifications). - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param notificationId The ID of the notification. Get it with the appropriate _List notifications_ endpoint. + - @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. -@return apiNotificationActivationRequest +@return apiPostPendingPointsNotificationRequest */ -func (a *ManagementApiService) NotificationActivation(ctx _context.Context, notificationId int32) apiNotificationActivationRequest { - return apiNotificationActivationRequest{ - apiService: a, - ctx: ctx, - notificationId: notificationId, +func (a *ManagementApiService) PostPendingPointsNotification(ctx _context.Context, loyaltyProgramId int32) apiPostPendingPointsNotificationRequest { + return apiPostPendingPointsNotificationRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, } } /* Execute executes the request + + @return BaseNotification */ -func (r apiNotificationActivationRequest) Execute() (*_nethttp.Response, error) { +func (r apiPostPendingPointsNotificationRequest) Execute() (BaseNotification, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue BaseNotification ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.NotificationActivation") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.PostPendingPointsNotification") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/notifications/{notificationId}/activation" - localVarPath = strings.Replace(localVarPath, "{"+"notificationId"+"}", _neturl.QueryEscape(parameterToString(r.notificationId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.body == nil { - return nil, reportError("body is required and must be specified") + return localVarReturnValue, nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -19265,7 +22537,7 @@ func (r apiNotificationActivationRequest) Execute() (*_nethttp.Response, error) } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -19304,18 +22576,18 @@ func (r apiNotificationActivationRequest) Execute() (*_nethttp.Response, error) } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -19323,74 +22595,126 @@ func (r apiNotificationActivationRequest) Execute() (*_nethttp.Response, error) body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 200 { + var v BaseNotification + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiPostAddedDeductedPointsNotificationRequest struct { +type apiRemoveLoyaltyPointsRequest struct { ctx _context.Context apiService *ManagementApiService - loyaltyProgramId int32 - body *NewBaseNotification + loyaltyProgramId string + integrationId string + body *DeductLoyaltyPoints } -func (r apiPostAddedDeductedPointsNotificationRequest) Body(body NewBaseNotification) apiPostAddedDeductedPointsNotificationRequest { +func (r apiRemoveLoyaltyPointsRequest) Body(body DeductLoyaltyPoints) apiRemoveLoyaltyPointsRequest { r.body = &body return r } /* -PostAddedDeductedPointsNotification Create notification about added or deducted loyalty points -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. +RemoveLoyaltyPoints Deduct points from customer profile +Deduct points from the specified loyalty program and specified customer profile. + +**Important:** +- Only active points can be deducted. +- Only pending points are rolled back when a session is cancelled or reopened. -For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-loyalty-notifications). +To get the `integrationId` of the profile from a `sessionId`, use the +[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. + - @param loyaltyProgramId The identifier for the loyalty program. + - @param integrationId The identifier of the profile. -@return apiPostAddedDeductedPointsNotificationRequest +@return apiRemoveLoyaltyPointsRequest */ -func (a *ManagementApiService) PostAddedDeductedPointsNotification(ctx _context.Context, loyaltyProgramId int32) apiPostAddedDeductedPointsNotificationRequest { - return apiPostAddedDeductedPointsNotificationRequest{ +func (a *ManagementApiService) RemoveLoyaltyPoints(ctx _context.Context, loyaltyProgramId string, integrationId string) apiRemoveLoyaltyPointsRequest { + return apiRemoveLoyaltyPointsRequest{ apiService: a, ctx: ctx, loyaltyProgramId: loyaltyProgramId, + integrationId: integrationId, } } /* Execute executes the request - - @return BaseNotification */ -func (r apiPostAddedDeductedPointsNotificationRequest) Execute() (BaseNotification, *_nethttp.Response, error) { +func (r apiRemoveLoyaltyPointsRequest) Execute() (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue BaseNotification ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.PostAddedDeductedPointsNotification") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.RemoveLoyaltyPoints") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/notifications/added_deducted_points" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points" localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") + return nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -19442,18 +22766,18 @@ func (r apiPostAddedDeductedPointsNotificationRequest) Execute() (BaseNotificati } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -19461,114 +22785,89 @@ func (r apiPostAddedDeductedPointsNotificationRequest) Execute() (BaseNotificati body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v BaseNotification - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } if localVarHTTPResponse.StatusCode == 400 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 401 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type apiPostCatalogsStrikethroughNotificationRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - body *NewBaseNotification +type apiResetPasswordRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *NewPassword } -func (r apiPostCatalogsStrikethroughNotificationRequest) Body(body NewBaseNotification) apiPostCatalogsStrikethroughNotificationRequest { +func (r apiResetPasswordRequest) Body(body NewPassword) apiResetPasswordRequest { r.body = &body return r } /* -PostCatalogsStrikethroughNotification Create strikethrough notification -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. +ResetPassword Reset password +Consumes the supplied password reset token and updates the password for +the associated account. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiPostCatalogsStrikethroughNotificationRequest +@return apiResetPasswordRequest */ -func (a *ManagementApiService) PostCatalogsStrikethroughNotification(ctx _context.Context, applicationId int32) apiPostCatalogsStrikethroughNotificationRequest { - return apiPostCatalogsStrikethroughNotificationRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) ResetPassword(ctx _context.Context) apiResetPasswordRequest { + return apiResetPasswordRequest{ + apiService: a, + ctx: ctx, } } /* Execute executes the request - @return BaseNotification + @return NewPassword */ -func (r apiPostCatalogsStrikethroughNotificationRequest) Execute() (BaseNotification, *_nethttp.Response, error) { +func (r apiResetPasswordRequest) Execute() (NewPassword, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue BaseNotification + localVarReturnValue NewPassword ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.PostCatalogsStrikethroughNotification") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ResetPassword") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/catalogs/notifications/strikethrough" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath := localBasePath + "/v1/reset_password" localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -19646,38 +22945,8 @@ func (r apiPostCatalogsStrikethroughNotificationRequest) Execute() (BaseNotifica body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v BaseNotification - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 204 { + var v NewPassword err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -19700,57 +22969,140 @@ func (r apiPostCatalogsStrikethroughNotificationRequest) Execute() (BaseNotifica return localVarReturnValue, localVarHTTPResponse, nil } -type apiPostPendingPointsNotificationRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - body *NewBaseNotification +type apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + body *map[string]interface{} + pageSize *int32 + skip *int32 + sort *string + value *string + createdBefore *time.Time + createdAfter *time.Time + valid *string + usable *string + referralId *int32 + recipientIntegrationId *string + batchId *string + exactMatch *bool + campaignState *string } -func (r apiPostPendingPointsNotificationRequest) Body(body NewBaseNotification) apiPostPendingPointsNotificationRequest { +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Body(body map[string]interface{}) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { r.body = &body return r } +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) PageSize(pageSize int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.pageSize = &pageSize + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Skip(skip int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.skip = &skip + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Sort(sort string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.sort = &sort + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Value(value string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.value = &value + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Valid(valid string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.valid = &valid + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Usable(usable string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.usable = &usable + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) ReferralId(referralId int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.referralId = &referralId + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) RecipientIntegrationId(recipientIntegrationId string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.recipientIntegrationId = &recipientIntegrationId + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) BatchId(batchId string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.batchId = &batchId + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) ExactMatch(exactMatch bool) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.exactMatch = &exactMatch + return r +} + +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) CampaignState(campaignState string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + r.campaignState = &campaignState + return r +} + /* -PostPendingPointsNotification Create notification about pending loyalty points -Create a notification about pending loyalty points for a given profile-based loyalty program. For more information, see [Managing loyalty notifications](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-loyalty-notifications). +SearchCouponsAdvancedApplicationWideWithoutTotalCount List coupons that match the given attributes (without total count) +List the coupons whose attributes match the query criteria in all the campaigns of the given Application. + +The match is successful if all the attributes of the request are found in a coupon, +even if the coupon has more attributes that are not present on the request. + +**Note:** The total count is not included in the response. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. -@return apiPostPendingPointsNotificationRequest +@return apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest */ -func (a *ManagementApiService) PostPendingPointsNotification(ctx _context.Context, loyaltyProgramId int32) apiPostPendingPointsNotificationRequest { - return apiPostPendingPointsNotificationRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, +func (a *ManagementApiService) SearchCouponsAdvancedApplicationWideWithoutTotalCount(ctx _context.Context, applicationId int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { + return apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, } } /* Execute executes the request - @return BaseNotification + @return InlineResponse2009 */ -func (r apiPostPendingPointsNotificationRequest) Execute() (BaseNotification, *_nethttp.Response, error) { +func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue BaseNotification + localVarReturnValue InlineResponse2009 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.PostPendingPointsNotification") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.SearchCouponsAdvancedApplicationWideWithoutTotalCount") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/notifications/pending_points" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/coupons_search_advanced/no_total" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -19760,6 +23112,45 @@ func (r apiPostPendingPointsNotificationRequest) Execute() (BaseNotification, *_ return localVarReturnValue, nil, reportError("body is required and must be specified") } + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.valid != nil { + localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) + } + if r.usable != nil { + localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) + } + if r.referralId != nil { + localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) + } + if r.recipientIntegrationId != nil { + localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) + } + if r.batchId != nil { + localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) + } + if r.exactMatch != nil { + localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) + } + if r.campaignState != nil { + localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -19808,58 +23199,28 @@ func (r apiPostPendingPointsNotificationRequest) Execute() (BaseNotification, *_ } } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := r.apiService.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 200 { - var v BaseNotification - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 200 { + var v InlineResponse2009 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -19882,74 +23243,184 @@ func (r apiPostPendingPointsNotificationRequest) Execute() (BaseNotification, *_ return localVarReturnValue, localVarHTTPResponse, nil } -type apiRemoveLoyaltyPointsRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId string - integrationId string - body *DeductLoyaltyPoints +type apiSearchCouponsAdvancedWithoutTotalCountRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + body *map[string]interface{} + pageSize *int32 + skip *int32 + sort *string + value *string + createdBefore *time.Time + createdAfter *time.Time + valid *string + usable *string + referralId *int32 + recipientIntegrationId *string + exactMatch *bool + batchId *string } -func (r apiRemoveLoyaltyPointsRequest) Body(body DeductLoyaltyPoints) apiRemoveLoyaltyPointsRequest { +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Body(body map[string]interface{}) apiSearchCouponsAdvancedWithoutTotalCountRequest { r.body = &body return r } +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) PageSize(pageSize int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.pageSize = &pageSize + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Skip(skip int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.skip = &skip + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Sort(sort string) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.sort = &sort + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Value(value string) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.value = &value + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.createdBefore = &createdBefore + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.createdAfter = &createdAfter + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Valid(valid string) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.valid = &valid + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Usable(usable string) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.usable = &usable + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) ReferralId(referralId int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.referralId = &referralId + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) RecipientIntegrationId(recipientIntegrationId string) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.recipientIntegrationId = &recipientIntegrationId + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) ExactMatch(exactMatch bool) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.exactMatch = &exactMatch + return r +} + +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) BatchId(batchId string) apiSearchCouponsAdvancedWithoutTotalCountRequest { + r.batchId = &batchId + return r +} + /* -RemoveLoyaltyPoints Deduct points from customer profile -Deduct points from the specified loyalty program and specified customer profile. +SearchCouponsAdvancedWithoutTotalCount List coupons that match the given attributes in campaign (without total count) +List the coupons whose attributes match the query criteria +in the given campaign. -**Important:** -- Only active points can be deducted. -- Only pending points are rolled back when a session is cancelled or reopened. +The match is successful if all the attributes of the request are found in a coupon, +even if the coupon has more attributes that are not present on the request. -To get the `integrationId` of the profile from a `sessionId`, use the -[Update customer session](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint. +**Note:** The total count is not included in the response. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param loyaltyProgramId The identifier for the loyalty program. - - @param integrationId The identifier of the profile. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiRemoveLoyaltyPointsRequest +@return apiSearchCouponsAdvancedWithoutTotalCountRequest */ -func (a *ManagementApiService) RemoveLoyaltyPoints(ctx _context.Context, loyaltyProgramId string, integrationId string) apiRemoveLoyaltyPointsRequest { - return apiRemoveLoyaltyPointsRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - integrationId: integrationId, +func (a *ManagementApiService) SearchCouponsAdvancedWithoutTotalCount(ctx _context.Context, applicationId int32, campaignId int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { + return apiSearchCouponsAdvancedWithoutTotalCountRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request + + @return InlineResponse2009 */ -func (r apiRemoveLoyaltyPointsRequest) Execute() (*_nethttp.Response, error) { +func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPut + localVarHTTPMethod = _nethttp.MethodPost localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue InlineResponse2009 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.RemoveLoyaltyPoints") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.SearchCouponsAdvancedWithoutTotalCount") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/deduct_points" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"integrationId"+"}", _neturl.QueryEscape(parameterToString(r.integrationId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.body == nil { - return nil, reportError("body is required and must be specified") + return localVarReturnValue, nil, reportError("body is required and must be specified") } + if r.pageSize != nil { + localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) + } + if r.skip != nil { + localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) + } + if r.sort != nil { + localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) + } + if r.value != nil { + localVarQueryParams.Add("value", parameterToString(*r.value, "")) + } + if r.createdBefore != nil { + localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) + } + if r.createdAfter != nil { + localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) + } + if r.valid != nil { + localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) + } + if r.usable != nil { + localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) + } + if r.referralId != nil { + localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) + } + if r.recipientIntegrationId != nil { + localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) + } + if r.exactMatch != nil { + localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) + } + if r.batchId != nil { + localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -19999,18 +23470,18 @@ func (r apiRemoveLoyaltyPointsRequest) Execute() (*_nethttp.Response, error) { } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -20018,96 +23489,98 @@ func (r apiRemoveLoyaltyPointsRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 200 { + var v InlineResponse2009 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type apiResetPasswordRequest struct { - ctx _context.Context - apiService *ManagementApiService - body *NewPassword +type apiTransferLoyaltyCardRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string + body *TransferLoyaltyCard } -func (r apiResetPasswordRequest) Body(body NewPassword) apiResetPasswordRequest { +func (r apiTransferLoyaltyCardRequest) Body(body TransferLoyaltyCard) apiTransferLoyaltyCardRequest { r.body = &body return r } /* -ResetPassword Reset password -Consumes the supplied password reset token and updates the password for -the associated account. +TransferLoyaltyCard 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_. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + - @param 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. + - @param 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. -@return apiResetPasswordRequest +@return apiTransferLoyaltyCardRequest */ -func (a *ManagementApiService) ResetPassword(ctx _context.Context) apiResetPasswordRequest { - return apiResetPasswordRequest{ - apiService: a, - ctx: ctx, +func (a *ManagementApiService) TransferLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiTransferLoyaltyCardRequest { + return apiTransferLoyaltyCardRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - - @return NewPassword */ -func (r apiResetPasswordRequest) Execute() (NewPassword, *_nethttp.Response, error) { +func (r apiTransferLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue NewPassword ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ResetPassword") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.TransferLoyaltyCard") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/reset_password" + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if strlen(r.loyaltyCardId) > 108 { + return nil, reportError("loyaltyCardId must have less than 108 elements") + } + if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") + return nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -20159,18 +23632,18 @@ func (r apiResetPasswordRequest) Execute() (NewPassword, *_nethttp.Response, err } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -20178,212 +23651,100 @@ func (r apiResetPasswordRequest) Execute() (NewPassword, *_nethttp.Response, err body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 204 { - var v NewPassword + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } newErr.model = v + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - body *map[string]interface{} - pageSize *int32 - skip *int32 - sort *string - value *string - createdBefore *time.Time - createdAfter *time.Time - valid *string - usable *string - referralId *int32 - recipientIntegrationId *string - batchId *string - exactMatch *bool - campaignState *string +type apiUpdateAccountCollectionRequest struct { + ctx _context.Context + apiService *ManagementApiService + collectionId int32 + body *UpdateCollection } -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Body(body map[string]interface{}) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { +func (r apiUpdateAccountCollectionRequest) Body(body UpdateCollection) apiUpdateAccountCollectionRequest { r.body = &body return r } -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) PageSize(pageSize int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.pageSize = &pageSize - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Skip(skip int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.skip = &skip - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Sort(sort string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.sort = &sort - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Value(value string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.value = &value - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Valid(valid string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.valid = &valid - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Usable(usable string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.usable = &usable - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) ReferralId(referralId int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.referralId = &referralId - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) RecipientIntegrationId(recipientIntegrationId string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.recipientIntegrationId = &recipientIntegrationId - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) BatchId(batchId string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.batchId = &batchId - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) ExactMatch(exactMatch bool) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.exactMatch = &exactMatch - return r -} - -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) CampaignState(campaignState string) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - r.campaignState = &campaignState - return r -} - /* -SearchCouponsAdvancedApplicationWideWithoutTotalCount List coupons that match the given attributes (without total count) -List the coupons whose attributes match the query criteria in all the campaigns of the given Application. - -The match is successful if all the attributes of the request are found in a coupon, -even if the coupon has more attributes that are not present on the request. - -**Note:** The total count is not included in the response. - +UpdateAccountCollection Update account-level collection +Edit the description of a given account-level collection and enable or disable the collection in the specified Applications. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. -@return apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest +@return apiUpdateAccountCollectionRequest */ -func (a *ManagementApiService) SearchCouponsAdvancedApplicationWideWithoutTotalCount(ctx _context.Context, applicationId int32) apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest { - return apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, +func (a *ManagementApiService) UpdateAccountCollection(ctx _context.Context, collectionId int32) apiUpdateAccountCollectionRequest { + return apiUpdateAccountCollectionRequest{ + apiService: a, + ctx: ctx, + collectionId: collectionId, } } /* Execute executes the request - @return InlineResponse2009 + @return Collection */ -func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { +func (r apiUpdateAccountCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2009 - ) - - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.SearchCouponsAdvancedApplicationWideWithoutTotalCount") - if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v1/applications/{applicationId}/coupons_search_advanced/no_total" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") - } - - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.value != nil { - localVarQueryParams.Add("value", parameterToString(*r.value, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.valid != nil { - localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) - } - if r.usable != nil { - localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) - } - if r.referralId != nil { - localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) - } - if r.recipientIntegrationId != nil { - localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) - } - if r.batchId != nil { - localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) - } - if r.exactMatch != nil { - localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) + localVarReturnValue Collection + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAccountCollection") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - if r.campaignState != nil { - localVarQueryParams.Add("campaignState", parameterToString(*r.campaignState, "")) + + localVarPath := localBasePath + "/v1/collections/{collectionId}" + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.body == nil { + return localVarReturnValue, nil, reportError("body is required and must be specified") } + // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -20453,7 +23814,37 @@ func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Execute error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2009 + var v Collection + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -20476,139 +23867,64 @@ func (r apiSearchCouponsAdvancedApplicationWideWithoutTotalCountRequest) Execute return localVarReturnValue, localVarHTTPResponse, nil } -type apiSearchCouponsAdvancedWithoutTotalCountRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - body *map[string]interface{} - pageSize *int32 - skip *int32 - sort *string - value *string - createdBefore *time.Time - createdAfter *time.Time - valid *string - usable *string - referralId *int32 - recipientIntegrationId *string - exactMatch *bool - batchId *string +type apiUpdateAchievementRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + achievementId int32 + body *UpdateAchievement } -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Body(body map[string]interface{}) apiSearchCouponsAdvancedWithoutTotalCountRequest { +func (r apiUpdateAchievementRequest) Body(body UpdateAchievement) apiUpdateAchievementRequest { r.body = &body return r } -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) PageSize(pageSize int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.pageSize = &pageSize - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Skip(skip int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.skip = &skip - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Sort(sort string) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.sort = &sort - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Value(value string) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.value = &value - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) CreatedBefore(createdBefore time.Time) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.createdBefore = &createdBefore - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) CreatedAfter(createdAfter time.Time) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.createdAfter = &createdAfter - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Valid(valid string) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.valid = &valid - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Usable(usable string) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.usable = &usable - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) ReferralId(referralId int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.referralId = &referralId - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) RecipientIntegrationId(recipientIntegrationId string) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.recipientIntegrationId = &recipientIntegrationId - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) ExactMatch(exactMatch bool) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.exactMatch = &exactMatch - return r -} - -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) BatchId(batchId string) apiSearchCouponsAdvancedWithoutTotalCountRequest { - r.batchId = &batchId - return r -} - /* -SearchCouponsAdvancedWithoutTotalCount List coupons that match the given attributes in campaign (without total count) -List the coupons whose attributes match the query criteria -in the given campaign. - -The match is successful if all the attributes of the request are found in a coupon, -even if the coupon has more attributes that are not present on the request. - -**Note:** The total count is not included in the response. - +UpdateAchievement Update achievement +Update the details of a specific achievement. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param achievementId The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. -@return apiSearchCouponsAdvancedWithoutTotalCountRequest +@return apiUpdateAchievementRequest */ -func (a *ManagementApiService) SearchCouponsAdvancedWithoutTotalCount(ctx _context.Context, applicationId int32, campaignId int32) apiSearchCouponsAdvancedWithoutTotalCountRequest { - return apiSearchCouponsAdvancedWithoutTotalCountRequest{ +func (a *ManagementApiService) UpdateAchievement(ctx _context.Context, applicationId int32, campaignId int32, achievementId int32) apiUpdateAchievementRequest { + return apiUpdateAchievementRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, + achievementId: achievementId, } } /* Execute executes the request - @return InlineResponse2009 + @return Achievement */ -func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Execute() (InlineResponse2009, *_nethttp.Response, error) { +func (r apiUpdateAchievementRequest) Execute() (Achievement, *_nethttp.Response, error) { var ( - localVarHTTPMethod = _nethttp.MethodPost + localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue InlineResponse2009 + localVarReturnValue Achievement ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.SearchCouponsAdvancedWithoutTotalCount") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAchievement") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons_search_advanced/no_total" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"achievementId"+"}", _neturl.QueryEscape(parameterToString(r.achievementId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -20618,42 +23934,6 @@ func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Execute() (InlineRespo return localVarReturnValue, nil, reportError("body is required and must be specified") } - if r.pageSize != nil { - localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) - } - if r.skip != nil { - localVarQueryParams.Add("skip", parameterToString(*r.skip, "")) - } - if r.sort != nil { - localVarQueryParams.Add("sort", parameterToString(*r.sort, "")) - } - if r.value != nil { - localVarQueryParams.Add("value", parameterToString(*r.value, "")) - } - if r.createdBefore != nil { - localVarQueryParams.Add("createdBefore", parameterToString(*r.createdBefore, "")) - } - if r.createdAfter != nil { - localVarQueryParams.Add("createdAfter", parameterToString(*r.createdAfter, "")) - } - if r.valid != nil { - localVarQueryParams.Add("valid", parameterToString(*r.valid, "")) - } - if r.usable != nil { - localVarQueryParams.Add("usable", parameterToString(*r.usable, "")) - } - if r.referralId != nil { - localVarQueryParams.Add("referralId", parameterToString(*r.referralId, "")) - } - if r.recipientIntegrationId != nil { - localVarQueryParams.Add("recipientIntegrationId", parameterToString(*r.recipientIntegrationId, "")) - } - if r.exactMatch != nil { - localVarQueryParams.Add("exactMatch", parameterToString(*r.exactMatch, "")) - } - if r.batchId != nil { - localVarQueryParams.Add("batchId", parameterToString(*r.batchId, "")) - } // to determine the Content-Type header localVarHTTPContentTypes := []string{"application/json"} @@ -20723,7 +24003,37 @@ func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Execute() (InlineRespo error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse2009 + var v Achievement + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -20746,74 +24056,64 @@ func (r apiSearchCouponsAdvancedWithoutTotalCountRequest) Execute() (InlineRespo return localVarReturnValue, localVarHTTPResponse, nil } -type apiTransferLoyaltyCardRequest struct { +type apiUpdateAdditionalCostRequest struct { ctx _context.Context apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyCardId string - body *TransferLoyaltyCard + additionalCostId int32 + body *NewAdditionalCost } -func (r apiTransferLoyaltyCardRequest) Body(body TransferLoyaltyCard) apiTransferLoyaltyCardRequest { +func (r apiUpdateAdditionalCostRequest) Body(body NewAdditionalCost) apiUpdateAdditionalCostRequest { r.body = &body return r } /* -TransferLoyaltyCard 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_. +UpdateAdditionalCost Update additional cost +Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the `name` property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. + - @param 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**. -@return apiTransferLoyaltyCardRequest +@return apiUpdateAdditionalCostRequest */ -func (a *ManagementApiService) TransferLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiTransferLoyaltyCardRequest { - return apiTransferLoyaltyCardRequest{ +func (a *ManagementApiService) UpdateAdditionalCost(ctx _context.Context, additionalCostId int32) apiUpdateAdditionalCostRequest { + return apiUpdateAdditionalCostRequest{ apiService: a, ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, + additionalCostId: additionalCostId, } } /* Execute executes the request + + @return AccountAdditionalCost */ -func (r apiTransferLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { +func (r apiUpdateAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue AccountAdditionalCost ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.TransferLoyaltyCard") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAdditionalCost") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/transfer" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) + localVarPath := localBasePath + "/v1/additional_costs/{additionalCostId}" + localVarPath = strings.Replace(localVarPath, "{"+"additionalCostId"+"}", _neturl.QueryEscape(parameterToString(r.additionalCostId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return nil, reportError("loyaltyCardId must have less than 108 elements") - } - if r.body == nil { - return nil, reportError("body is required and must be specified") + return localVarReturnValue, nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -20865,18 +24165,18 @@ func (r apiTransferLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -20884,91 +24184,85 @@ func (r apiTransferLoyaltyCardRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus + if localVarHTTPResponse.StatusCode == 200 { + var v AccountAdditionalCost err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.model = v - return localVarHTTPResponse, newErr } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateAccountCollectionRequest struct { - ctx _context.Context - apiService *ManagementApiService - collectionId int32 - body *UpdateCollection +type apiUpdateAttributeRequest struct { + ctx _context.Context + apiService *ManagementApiService + attributeId int32 + body *NewAttribute } -func (r apiUpdateAccountCollectionRequest) Body(body UpdateCollection) apiUpdateAccountCollectionRequest { +func (r apiUpdateAttributeRequest) Body(body NewAttribute) apiUpdateAttributeRequest { r.body = &body return r } /* -UpdateAccountCollection Update account-level collection -Edit the description of a given account-level collection and enable or disable the collection in the specified Applications. +UpdateAttribute Update custom attribute +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. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param collectionId The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. + - @param 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**. -@return apiUpdateAccountCollectionRequest +@return apiUpdateAttributeRequest */ -func (a *ManagementApiService) UpdateAccountCollection(ctx _context.Context, collectionId int32) apiUpdateAccountCollectionRequest { - return apiUpdateAccountCollectionRequest{ - apiService: a, - ctx: ctx, - collectionId: collectionId, +func (a *ManagementApiService) UpdateAttribute(ctx _context.Context, attributeId int32) apiUpdateAttributeRequest { + return apiUpdateAttributeRequest{ + apiService: a, + ctx: ctx, + attributeId: attributeId, } } /* Execute executes the request - @return Collection + @return Attribute */ -func (r apiUpdateAccountCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { +func (r apiUpdateAttributeRequest) Execute() (Attribute, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Collection + localVarReturnValue Attribute ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAccountCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAttribute") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/collections/{collectionId}" - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) + localVarPath := localBasePath + "/v1/attributes/{attributeId}" + localVarPath = strings.Replace(localVarPath, "{"+"attributeId"+"}", _neturl.QueryEscape(parameterToString(r.attributeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -21047,37 +24341,7 @@ func (r apiUpdateAccountCollectionRequest) Execute() (Collection, *_nethttp.Resp error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Collection - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponseWithStatus + var v Attribute err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -21100,57 +24364,60 @@ func (r apiUpdateAccountCollectionRequest) Execute() (Collection, *_nethttp.Resp return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateAdditionalCostRequest struct { - ctx _context.Context - apiService *ManagementApiService - additionalCostId int32 - body *NewAdditionalCost +type apiUpdateCampaignRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + body *UpdateCampaign } -func (r apiUpdateAdditionalCostRequest) Body(body NewAdditionalCost) apiUpdateAdditionalCostRequest { +func (r apiUpdateCampaignRequest) Body(body UpdateCampaign) apiUpdateCampaignRequest { r.body = &body return r } /* -UpdateAdditionalCost Update additional cost -Updates an existing additional cost. Once created, the only property of an additional cost that cannot be changed is the `name` property (or **API name** in the Campaign Manager). This restriction is in place to prevent accidentally breaking live integrations. - +UpdateCampaign Update campaign +Update the given campaign. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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**. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. -@return apiUpdateAdditionalCostRequest +@return apiUpdateCampaignRequest */ -func (a *ManagementApiService) UpdateAdditionalCost(ctx _context.Context, additionalCostId int32) apiUpdateAdditionalCostRequest { - return apiUpdateAdditionalCostRequest{ - apiService: a, - ctx: ctx, - additionalCostId: additionalCostId, +func (a *ManagementApiService) UpdateCampaign(ctx _context.Context, applicationId int32, campaignId int32) apiUpdateCampaignRequest { + return apiUpdateCampaignRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, } } /* Execute executes the request - @return AccountAdditionalCost + @return Campaign */ -func (r apiUpdateAdditionalCostRequest) Execute() (AccountAdditionalCost, *_nethttp.Response, error) { +func (r apiUpdateCampaignRequest) Execute() (Campaign, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue AccountAdditionalCost + localVarReturnValue Campaign ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAdditionalCost") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCampaign") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/additional_costs/{additionalCostId}" - localVarPath = strings.Replace(localVarPath, "{"+"additionalCostId"+"}", _neturl.QueryEscape(parameterToString(r.additionalCostId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -21229,7 +24496,7 @@ func (r apiUpdateAdditionalCostRequest) Execute() (AccountAdditionalCost, *_neth error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v AccountAdditionalCost + var v Campaign err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -21252,61 +24519,64 @@ func (r apiUpdateAdditionalCostRequest) Execute() (AccountAdditionalCost, *_neth return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateAttributeRequest struct { - ctx _context.Context - apiService *ManagementApiService - attributeId int32 - body *NewAttribute +type apiUpdateCollectionRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + collectionId int32 + body *UpdateCampaignCollection } -func (r apiUpdateAttributeRequest) Body(body NewAttribute) apiUpdateAttributeRequest { +func (r apiUpdateCollectionRequest) Body(body UpdateCampaignCollection) apiUpdateCollectionRequest { r.body = &body return r } /* -UpdateAttribute Update custom attribute -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. - +UpdateCollection Update campaign-level collection's description +Edit the description of a given campaign-level collection. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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**. + - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. + - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. -@return apiUpdateAttributeRequest +@return apiUpdateCollectionRequest */ -func (a *ManagementApiService) UpdateAttribute(ctx _context.Context, attributeId int32) apiUpdateAttributeRequest { - return apiUpdateAttributeRequest{ - apiService: a, - ctx: ctx, - attributeId: attributeId, +func (a *ManagementApiService) UpdateCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiUpdateCollectionRequest { + return apiUpdateCollectionRequest{ + apiService: a, + ctx: ctx, + applicationId: applicationId, + campaignId: campaignId, + collectionId: collectionId, } } /* Execute executes the request - @return Attribute + @return Collection */ -func (r apiUpdateAttributeRequest) Execute() (Attribute, *_nethttp.Response, error) { +func (r apiUpdateCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Attribute + localVarReturnValue Collection ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateAttribute") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCollection") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/attributes/{attributeId}" - localVarPath = strings.Replace(localVarPath, "{"+"attributeId"+"}", _neturl.QueryEscape(parameterToString(r.attributeId, "")), -1) + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}" + localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -21385,7 +24655,17 @@ func (r apiUpdateAttributeRequest) Execute() (Attribute, *_nethttp.Response, err error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Attribute + var v Collection + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -21408,60 +24688,74 @@ func (r apiUpdateAttributeRequest) Execute() (Attribute, *_nethttp.Response, err return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateCampaignRequest struct { +type apiUpdateCouponRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 campaignId int32 - body *UpdateCampaign + couponId string + body *UpdateCoupon } -func (r apiUpdateCampaignRequest) Body(body UpdateCampaign) apiUpdateCampaignRequest { +func (r apiUpdateCouponRequest) Body(body UpdateCoupon) apiUpdateCouponRequest { r.body = &body return r } /* -UpdateCampaign Update campaign -Update the given campaign. +UpdateCoupon Update 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.

+ +
+ - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param 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. -@return apiUpdateCampaignRequest +@return apiUpdateCouponRequest */ -func (a *ManagementApiService) UpdateCampaign(ctx _context.Context, applicationId int32, campaignId int32) apiUpdateCampaignRequest { - return apiUpdateCampaignRequest{ +func (a *ManagementApiService) UpdateCoupon(ctx _context.Context, applicationId int32, campaignId int32, couponId string) apiUpdateCouponRequest { + return apiUpdateCouponRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, + couponId: couponId, } } /* Execute executes the request - @return Campaign + @return Coupon */ -func (r apiUpdateCampaignRequest) Execute() (Campaign, *_nethttp.Response, error) { +func (r apiUpdateCouponRequest) Execute() (Coupon, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Campaign + localVarReturnValue Coupon ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCampaign") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCoupon") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"couponId"+"}", _neturl.QueryEscape(parameterToString(r.couponId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -21540,7 +24834,7 @@ func (r apiUpdateCampaignRequest) Execute() (Campaign, *_nethttp.Response, error error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Campaign + var v Coupon err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -21563,71 +24857,80 @@ func (r apiUpdateCampaignRequest) Execute() (Campaign, *_nethttp.Response, error return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateCollectionRequest struct { +type apiUpdateCouponBatchRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 campaignId int32 - collectionId int32 - body *UpdateCampaignCollection + body *UpdateCouponBatch } -func (r apiUpdateCollectionRequest) Body(body UpdateCampaignCollection) apiUpdateCollectionRequest { +func (r apiUpdateCouponBatchRequest) Body(body UpdateCouponBatch) apiUpdateCouponBatchRequest { r.body = &body return r } /* -UpdateCollection Update campaign-level collection's description -Edit the description of a given campaign-level collection. +UpdateCouponBatch Update coupons +Update all coupons, or a specific batch of coupons in the given campaign. +You can find the `batchId` in the **Coupons** view of your Application +in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount). + +
+ +

Important

+ +
    +
  • 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). + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param collectionId The ID of the collection. You can get it with the [List collections in Application](#operation/listCollectionsInApplication) endpoint. -@return apiUpdateCollectionRequest +@return apiUpdateCouponBatchRequest */ -func (a *ManagementApiService) UpdateCollection(ctx _context.Context, applicationId int32, campaignId int32, collectionId int32) apiUpdateCollectionRequest { - return apiUpdateCollectionRequest{ +func (a *ManagementApiService) UpdateCouponBatch(ctx _context.Context, applicationId int32, campaignId int32) apiUpdateCouponBatchRequest { + return apiUpdateCouponBatchRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, - collectionId: collectionId, } } /* Execute executes the request - - @return Collection */ -func (r apiUpdateCollectionRequest) Execute() (Collection, *_nethttp.Response, error) { +func (r apiUpdateCouponBatchRequest) Execute() (*_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Collection ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCollection") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCouponBatch") if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + return nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"collectionId"+"}", _neturl.QueryEscape(parameterToString(r.collectionId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.body == nil { - return localVarReturnValue, nil, reportError("body is required and must be specified") + return nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -21640,7 +24943,7 @@ func (r apiUpdateCollectionRequest) Execute() (Collection, *_nethttp.Response, e } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} + localVarHTTPHeaderAccepts := []string{} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -21679,18 +24982,18 @@ func (r apiUpdateCollectionRequest) Execute() (Collection, *_nethttp.Response, e } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return localVarReturnValue, nil, err + return nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarReturnValue, localVarHTTPResponse, err + return localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -21698,113 +25001,75 @@ func (r apiUpdateCollectionRequest) Execute() (Collection, *_nethttp.Response, e body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 200 { - var v Collection - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr + return localVarHTTPResponse, newErr } - return localVarReturnValue, localVarHTTPResponse, nil + return localVarHTTPResponse, nil } -type apiUpdateCouponRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - couponId string - body *UpdateCoupon +type apiUpdateLoyaltyCardRequest struct { + ctx _context.Context + apiService *ManagementApiService + loyaltyProgramId int32 + loyaltyCardId string + body *UpdateLoyaltyCard } -func (r apiUpdateCouponRequest) Body(body UpdateCoupon) apiUpdateCouponRequest { +func (r apiUpdateLoyaltyCardRequest) Body(body UpdateLoyaltyCard) apiUpdateLoyaltyCardRequest { r.body = &body return r } /* -UpdateCoupon Update 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.

- -
- +UpdateLoyaltyCard Update loyalty card status +Update the status of the given loyalty card. A card can be _active_ or _inactive_. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param 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. + - @param 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. + - @param 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. -@return apiUpdateCouponRequest +@return apiUpdateLoyaltyCardRequest */ -func (a *ManagementApiService) UpdateCoupon(ctx _context.Context, applicationId int32, campaignId int32, couponId string) apiUpdateCouponRequest { - return apiUpdateCouponRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - campaignId: campaignId, - couponId: couponId, +func (a *ManagementApiService) UpdateLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiUpdateLoyaltyCardRequest { + return apiUpdateLoyaltyCardRequest{ + apiService: a, + ctx: ctx, + loyaltyProgramId: loyaltyProgramId, + loyaltyCardId: loyaltyCardId, } } /* Execute executes the request - @return Coupon + @return LoyaltyCard */ -func (r apiUpdateCouponRequest) Execute() (Coupon, *_nethttp.Response, error) { +func (r apiUpdateLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Coupon + localVarReturnValue LoyaltyCard ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCoupon") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateLoyaltyCard") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"couponId"+"}", _neturl.QueryEscape(parameterToString(r.couponId, "")), -1) + localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}" + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} + if strlen(r.loyaltyCardId) > 108 { + return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") + } + if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -21878,7 +25143,37 @@ func (r apiUpdateCouponRequest) Execute() (Coupon, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Coupon + var v LoyaltyCard + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -21899,82 +25194,73 @@ func (r apiUpdateCouponRequest) Execute() (Coupon, *_nethttp.Response, error) { } return localVarReturnValue, localVarHTTPResponse, nil -} - -type apiUpdateCouponBatchRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - campaignId int32 - body *UpdateCouponBatch -} - -func (r apiUpdateCouponBatchRequest) Body(body UpdateCouponBatch) apiUpdateCouponBatchRequest { - r.body = &body - return r -} - -/* -UpdateCouponBatch Update coupons -Update all coupons, or a specific batch of coupons in the given campaign. -You can find the `batchId` in the **Coupons** view of your Application -in the Campaign Manager, or you can use [List coupons](#operation/getCouponsWithoutTotalCount). - -
- -

Important

- -
    -
  • 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.
  • -
+} -
+type apiUpdateReferralRequest struct { + ctx _context.Context + apiService *ManagementApiService + applicationId int32 + campaignId int32 + referralId string + body *UpdateReferral +} -To update a specific coupon, use [Update coupon](#operation/updateCoupon). +func (r apiUpdateReferralRequest) Body(body UpdateReferral) apiUpdateReferralRequest { + r.body = &body + return r +} +/* +UpdateReferral Update referral +Update the specified referral. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. + - @param referralId The ID of the referral code. -@return apiUpdateCouponBatchRequest +@return apiUpdateReferralRequest */ -func (a *ManagementApiService) UpdateCouponBatch(ctx _context.Context, applicationId int32, campaignId int32) apiUpdateCouponBatchRequest { - return apiUpdateCouponBatchRequest{ +func (a *ManagementApiService) UpdateReferral(ctx _context.Context, applicationId int32, campaignId int32, referralId string) apiUpdateReferralRequest { + return apiUpdateReferralRequest{ apiService: a, ctx: ctx, applicationId: applicationId, campaignId: campaignId, + referralId: referralId, } } /* Execute executes the request + + @return Referral */ -func (r apiUpdateCouponBatchRequest) Execute() (*_nethttp.Response, error) { +func (r apiUpdateReferralRequest) Execute() (Referral, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte + localVarReturnValue Referral ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateCouponBatch") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateReferral") if err != nil { - return nil, GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/coupons" + localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"referralId"+"}", _neturl.QueryEscape(parameterToString(r.referralId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} if r.body == nil { - return nil, reportError("body is required and must be specified") + return localVarReturnValue, nil, reportError("body is required and must be specified") } // to determine the Content-Type header @@ -21987,7 +25273,7 @@ func (r apiUpdateCouponBatchRequest) Execute() (*_nethttp.Response, error) { } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -22026,18 +25312,18 @@ func (r apiUpdateCouponBatchRequest) Execute() (*_nethttp.Response, error) { } req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := r.apiService.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -22045,75 +25331,85 @@ func (r apiUpdateCouponBatchRequest) Execute() (*_nethttp.Response, error) { body: localVarBody, error: localVarHTTPResponse.Status, } - return localVarHTTPResponse, newErr + if localVarHTTPResponse.StatusCode == 200 { + var v Referral + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateLoyaltyCardRequest struct { - ctx _context.Context - apiService *ManagementApiService - loyaltyProgramId int32 - loyaltyCardId string - body *UpdateLoyaltyCard +type apiUpdateRoleV2Request struct { + ctx _context.Context + apiService *ManagementApiService + roleId int32 + body *RoleV2Base } -func (r apiUpdateLoyaltyCardRequest) Body(body UpdateLoyaltyCard) apiUpdateLoyaltyCardRequest { +func (r apiUpdateRoleV2Request) Body(body RoleV2Base) apiUpdateRoleV2Request { r.body = &body return r } /* -UpdateLoyaltyCard Update loyalty card status -Update the status of the given loyalty card. A card can be _active_ or _inactive_. +UpdateRoleV2 Update role +Update a specific role. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param 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. - - @param 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. + - @param roleId The ID of role. -@return apiUpdateLoyaltyCardRequest +@return apiUpdateRoleV2Request */ -func (a *ManagementApiService) UpdateLoyaltyCard(ctx _context.Context, loyaltyProgramId int32, loyaltyCardId string) apiUpdateLoyaltyCardRequest { - return apiUpdateLoyaltyCardRequest{ - apiService: a, - ctx: ctx, - loyaltyProgramId: loyaltyProgramId, - loyaltyCardId: loyaltyCardId, +func (a *ManagementApiService) UpdateRoleV2(ctx _context.Context, roleId int32) apiUpdateRoleV2Request { + return apiUpdateRoleV2Request{ + apiService: a, + ctx: ctx, + roleId: roleId, } } /* Execute executes the request - @return LoyaltyCard + @return RoleV2 */ -func (r apiUpdateLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, error) { +func (r apiUpdateRoleV2Request) Execute() (RoleV2, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue LoyaltyCard + localVarReturnValue RoleV2 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateLoyaltyCard") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateRoleV2") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}" - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyProgramId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyProgramId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"loyaltyCardId"+"}", _neturl.QueryEscape(parameterToString(r.loyaltyCardId, "")), -1) + localVarPath := localBasePath + "/v2/roles/{roleId}" + localVarPath = strings.Replace(localVarPath, "{"+"roleId"+"}", _neturl.QueryEscape(parameterToString(r.roleId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} localVarFormParams := _neturl.Values{} - if strlen(r.loyaltyCardId) > 108 { - return localVarReturnValue, nil, reportError("loyaltyCardId must have less than 108 elements") - } - if r.body == nil { return localVarReturnValue, nil, reportError("body is required and must be specified") } @@ -22187,37 +25483,7 @@ func (r apiUpdateLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v LoyaltyCard - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v RoleV2 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -22240,64 +25506,60 @@ func (r apiUpdateLoyaltyCardRequest) Execute() (LoyaltyCard, *_nethttp.Response, return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateReferralRequest struct { +type apiUpdateStoreRequest struct { ctx _context.Context apiService *ManagementApiService applicationId int32 - campaignId int32 - referralId string - body *UpdateReferral + storeId string + body *NewStore } -func (r apiUpdateReferralRequest) Body(body UpdateReferral) apiUpdateReferralRequest { +func (r apiUpdateStoreRequest) Body(body NewStore) apiUpdateStoreRequest { r.body = &body return r } /* -UpdateReferral Update referral -Update the specified referral. +UpdateStore Update store +Update store details for a specific store ID. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param campaignId The ID of the campaign. It is displayed in your Talon.One deployment URL. - - @param referralId The ID of the referral code. + - @param storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. -@return apiUpdateReferralRequest +@return apiUpdateStoreRequest */ -func (a *ManagementApiService) UpdateReferral(ctx _context.Context, applicationId int32, campaignId int32, referralId string) apiUpdateReferralRequest { - return apiUpdateReferralRequest{ +func (a *ManagementApiService) UpdateStore(ctx _context.Context, applicationId int32, storeId string) apiUpdateStoreRequest { + return apiUpdateStoreRequest{ apiService: a, ctx: ctx, applicationId: applicationId, - campaignId: campaignId, - referralId: referralId, + storeId: storeId, } } /* Execute executes the request - @return Referral + @return Store */ -func (r apiUpdateReferralRequest) Execute() (Referral, *_nethttp.Response, error) { +func (r apiUpdateStoreRequest) Execute() (Store, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Referral + localVarReturnValue Store ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateReferral") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateStore") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId}" + localVarPath := localBasePath + "/v1/applications/{applicationId}/stores/{storeId}" localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"campaignId"+"}", _neturl.QueryEscape(parameterToString(r.campaignId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"referralId"+"}", _neturl.QueryEscape(parameterToString(r.referralId, "")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"storeId"+"}", _neturl.QueryEscape(parameterToString(r.storeId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -22376,7 +25638,27 @@ func (r apiUpdateReferralRequest) Execute() (Referral, *_nethttp.Response, error error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Referral + var v Store + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 400 { + var v ErrorResponseWithStatus + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v ErrorResponseWithStatus err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -22399,60 +25681,56 @@ func (r apiUpdateReferralRequest) Execute() (Referral, *_nethttp.Response, error return localVarReturnValue, localVarHTTPResponse, nil } -type apiUpdateStoreRequest struct { - ctx _context.Context - apiService *ManagementApiService - applicationId int32 - storeId string - body *NewStore +type apiUpdateUserRequest struct { + ctx _context.Context + apiService *ManagementApiService + userId int32 + body *UpdateUser } -func (r apiUpdateStoreRequest) Body(body NewStore) apiUpdateStoreRequest { +func (r apiUpdateUserRequest) Body(body UpdateUser) apiUpdateUserRequest { r.body = &body return r } /* -UpdateStore Update store -Update store details for a specific store ID. +UpdateUser Update user +Update the details of a specific user. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param applicationId The ID of the Application. It is displayed in your Talon.One deployment URL. - - @param storeId The ID of the store. You can get this ID with the [List stores](#tag/Stores/operation/listStores) endpoint. + - @param userId The ID of the user. -@return apiUpdateStoreRequest +@return apiUpdateUserRequest */ -func (a *ManagementApiService) UpdateStore(ctx _context.Context, applicationId int32, storeId string) apiUpdateStoreRequest { - return apiUpdateStoreRequest{ - apiService: a, - ctx: ctx, - applicationId: applicationId, - storeId: storeId, +func (a *ManagementApiService) UpdateUser(ctx _context.Context, userId int32) apiUpdateUserRequest { + return apiUpdateUserRequest{ + apiService: a, + ctx: ctx, + userId: userId, } } /* Execute executes the request - @return Store + @return User */ -func (r apiUpdateStoreRequest) Execute() (Store, *_nethttp.Response, error) { +func (r apiUpdateUserRequest) Execute() (User, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodPut localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Store + localVarReturnValue User ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateStore") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.UpdateUser") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/applications/{applicationId}/stores/{storeId}" - localVarPath = strings.Replace(localVarPath, "{"+"applicationId"+"}", _neturl.QueryEscape(parameterToString(r.applicationId, "")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"storeId"+"}", _neturl.QueryEscape(parameterToString(r.storeId, "")), -1) + localVarPath := localBasePath + "/v1/users/{userId}" + localVarPath = strings.Replace(localVarPath, "{"+"userId"+"}", _neturl.QueryEscape(parameterToString(r.userId, "")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := _neturl.Values{} @@ -22531,27 +25809,7 @@ func (r apiUpdateStoreRequest) Execute() (Store, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Store - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponseWithStatus - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponseWithStatus + var v User err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/configuration.go b/configuration.go index 084a5e2e..b9cc4256 100644 --- a/configuration.go +++ b/configuration.go @@ -97,7 +97,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/5.0.0/go", + UserAgent: "OpenAPI-Generator/6.0.0/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/docs/AccountDashboardStatistic.md b/docs/AccountDashboardStatistic.md index e926bb23..a81f665d 100644 --- a/docs/AccountDashboardStatistic.md +++ b/docs/AccountDashboardStatistic.md @@ -8,7 +8,6 @@ Name | Type | Description | Notes **Discounts** | Pointer to [**[]AccountDashboardStatisticDiscount**](AccountDashboardStatisticDiscount.md) | Aggregated statistic for account discount. | [optional] **LoyaltyPoints** | Pointer to [**[]AccountDashboardStatisticLoyaltyPoints**](AccountDashboardStatisticLoyaltyPoints.md) | Aggregated statistic for account loyalty points. | [optional] **Referrals** | Pointer to [**[]AccountDashboardStatisticReferrals**](AccountDashboardStatisticReferrals.md) | Aggregated statistic for account referrals. | [optional] -**ApiCalls** | Pointer to [**[]AccountDashboardStatisticApiCalls**](AccountDashboardStatisticApiCalls.md) | Aggregated statistic for the number of account API calls. | [optional] **Campaigns** | Pointer to [**AccountDashboardStatisticCampaigns**](AccountDashboardStatisticCampaigns.md) | | ## Methods @@ -113,31 +112,6 @@ HasReferrals returns a boolean if a field has been set. SetReferrals gets a reference to the given []AccountDashboardStatisticReferrals and assigns it to the Referrals field. -### GetApiCalls - -`func (o *AccountDashboardStatistic) GetApiCalls() []AccountDashboardStatisticApiCalls` - -GetApiCalls returns the ApiCalls field if non-nil, zero value otherwise. - -### GetApiCallsOk - -`func (o *AccountDashboardStatistic) GetApiCallsOk() ([]AccountDashboardStatisticApiCalls, bool)` - -GetApiCallsOk returns a tuple with the ApiCalls field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasApiCalls - -`func (o *AccountDashboardStatistic) HasApiCalls() bool` - -HasApiCalls returns a boolean if a field has been set. - -### SetApiCalls - -`func (o *AccountDashboardStatistic) SetApiCalls(v []AccountDashboardStatisticApiCalls)` - -SetApiCalls gets a reference to the given []AccountDashboardStatisticApiCalls and assigns it to the ApiCalls field. - ### GetCampaigns `func (o *AccountDashboardStatistic) GetCampaigns() AccountDashboardStatisticCampaigns` diff --git a/docs/Achievement.md b/docs/Achievement.md new file mode 100644 index 00000000..e355134e --- /dev/null +++ b/docs/Achievement.md @@ -0,0 +1,325 @@ +# Achievement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | Internal ID of this entity. | +**Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. | +**Name** | Pointer to **string** | The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. | +**Title** | Pointer to **string** | The display name for the achievement in the Campaign Manager. | +**Description** | Pointer to **string** | A description of the achievement. | +**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. | +**Period** | Pointer to **string** | The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. | +**PeriodEndOverride** | Pointer to [**TimePoint**](TimePoint.md) | | [optional] +**CampaignId** | Pointer to **int32** | ID of the campaign, to which the achievement belongs to | +**UserId** | Pointer to **int32** | ID of the user that created this achievement. | +**CreatedBy** | Pointer to **string** | Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. | +**HasProgress** | Pointer to **bool** | Indicates if a customer has made progress in the achievement. | [optional] + +## Methods + +### GetId + +`func (o *Achievement) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *Achievement) GetIdOk() (int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *Achievement) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *Achievement) SetId(v int32)` + +SetId gets a reference to the given int32 and assigns it to the Id field. + +### GetCreated + +`func (o *Achievement) GetCreated() time.Time` + +GetCreated returns the Created field if non-nil, zero value otherwise. + +### GetCreatedOk + +`func (o *Achievement) GetCreatedOk() (time.Time, bool)` + +GetCreatedOk returns a tuple with the Created field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCreated + +`func (o *Achievement) HasCreated() bool` + +HasCreated returns a boolean if a field has been set. + +### SetCreated + +`func (o *Achievement) SetCreated(v time.Time)` + +SetCreated gets a reference to the given time.Time and assigns it to the Created field. + +### GetName + +`func (o *Achievement) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Achievement) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Achievement) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Achievement) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetTitle + +`func (o *Achievement) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *Achievement) GetTitleOk() (string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTitle + +`func (o *Achievement) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### SetTitle + +`func (o *Achievement) SetTitle(v string)` + +SetTitle gets a reference to the given string and assigns it to the Title field. + +### GetDescription + +`func (o *Achievement) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *Achievement) GetDescriptionOk() (string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDescription + +`func (o *Achievement) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescription + +`func (o *Achievement) SetDescription(v string)` + +SetDescription gets a reference to the given string and assigns it to the Description field. + +### GetTarget + +`func (o *Achievement) GetTarget() float32` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *Achievement) GetTargetOk() (float32, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTarget + +`func (o *Achievement) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### SetTarget + +`func (o *Achievement) SetTarget(v float32)` + +SetTarget gets a reference to the given float32 and assigns it to the Target field. + +### GetPeriod + +`func (o *Achievement) GetPeriod() string` + +GetPeriod returns the Period field if non-nil, zero value otherwise. + +### GetPeriodOk + +`func (o *Achievement) GetPeriodOk() (string, bool)` + +GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriod + +`func (o *Achievement) HasPeriod() bool` + +HasPeriod returns a boolean if a field has been set. + +### SetPeriod + +`func (o *Achievement) SetPeriod(v string)` + +SetPeriod gets a reference to the given string and assigns it to the Period field. + +### GetPeriodEndOverride + +`func (o *Achievement) GetPeriodEndOverride() TimePoint` + +GetPeriodEndOverride returns the PeriodEndOverride field if non-nil, zero value otherwise. + +### GetPeriodEndOverrideOk + +`func (o *Achievement) GetPeriodEndOverrideOk() (TimePoint, bool)` + +GetPeriodEndOverrideOk returns a tuple with the PeriodEndOverride field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriodEndOverride + +`func (o *Achievement) HasPeriodEndOverride() bool` + +HasPeriodEndOverride returns a boolean if a field has been set. + +### SetPeriodEndOverride + +`func (o *Achievement) SetPeriodEndOverride(v TimePoint)` + +SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field. + +### GetCampaignId + +`func (o *Achievement) GetCampaignId() int32` + +GetCampaignId returns the CampaignId field if non-nil, zero value otherwise. + +### GetCampaignIdOk + +`func (o *Achievement) GetCampaignIdOk() (int32, bool)` + +GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignId + +`func (o *Achievement) HasCampaignId() bool` + +HasCampaignId returns a boolean if a field has been set. + +### SetCampaignId + +`func (o *Achievement) SetCampaignId(v int32)` + +SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. + +### GetUserId + +`func (o *Achievement) GetUserId() int32` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *Achievement) GetUserIdOk() (int32, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUserId + +`func (o *Achievement) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### SetUserId + +`func (o *Achievement) SetUserId(v int32)` + +SetUserId gets a reference to the given int32 and assigns it to the UserId field. + +### GetCreatedBy + +`func (o *Achievement) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *Achievement) GetCreatedByOk() (string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCreatedBy + +`func (o *Achievement) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### SetCreatedBy + +`func (o *Achievement) SetCreatedBy(v string)` + +SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. + +### GetHasProgress + +`func (o *Achievement) GetHasProgress() bool` + +GetHasProgress returns the HasProgress field if non-nil, zero value otherwise. + +### GetHasProgressOk + +`func (o *Achievement) GetHasProgressOk() (bool, bool)` + +GetHasProgressOk returns a tuple with the HasProgress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasProgress + +`func (o *Achievement) HasHasProgress() bool` + +HasHasProgress returns a boolean if a field has been set. + +### SetHasProgress + +`func (o *Achievement) SetHasProgress(v bool)` + +SetHasProgress gets a reference to the given bool and assigns it to the HasProgress field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AchievementAdditionalProperties.md b/docs/AchievementAdditionalProperties.md new file mode 100644 index 00000000..16258b0f --- /dev/null +++ b/docs/AchievementAdditionalProperties.md @@ -0,0 +1,117 @@ +# AchievementAdditionalProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignId** | Pointer to **int32** | ID of the campaign, to which the achievement belongs to | +**UserId** | Pointer to **int32** | ID of the user that created this achievement. | +**CreatedBy** | Pointer to **string** | Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. | +**HasProgress** | Pointer to **bool** | Indicates if a customer has made progress in the achievement. | [optional] + +## Methods + +### GetCampaignId + +`func (o *AchievementAdditionalProperties) GetCampaignId() int32` + +GetCampaignId returns the CampaignId field if non-nil, zero value otherwise. + +### GetCampaignIdOk + +`func (o *AchievementAdditionalProperties) GetCampaignIdOk() (int32, bool)` + +GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignId + +`func (o *AchievementAdditionalProperties) HasCampaignId() bool` + +HasCampaignId returns a boolean if a field has been set. + +### SetCampaignId + +`func (o *AchievementAdditionalProperties) SetCampaignId(v int32)` + +SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. + +### GetUserId + +`func (o *AchievementAdditionalProperties) GetUserId() int32` + +GetUserId returns the UserId field if non-nil, zero value otherwise. + +### GetUserIdOk + +`func (o *AchievementAdditionalProperties) GetUserIdOk() (int32, bool)` + +GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUserId + +`func (o *AchievementAdditionalProperties) HasUserId() bool` + +HasUserId returns a boolean if a field has been set. + +### SetUserId + +`func (o *AchievementAdditionalProperties) SetUserId(v int32)` + +SetUserId gets a reference to the given int32 and assigns it to the UserId field. + +### GetCreatedBy + +`func (o *AchievementAdditionalProperties) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *AchievementAdditionalProperties) GetCreatedByOk() (string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCreatedBy + +`func (o *AchievementAdditionalProperties) HasCreatedBy() bool` + +HasCreatedBy returns a boolean if a field has been set. + +### SetCreatedBy + +`func (o *AchievementAdditionalProperties) SetCreatedBy(v string)` + +SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field. + +### GetHasProgress + +`func (o *AchievementAdditionalProperties) GetHasProgress() bool` + +GetHasProgress returns the HasProgress field if non-nil, zero value otherwise. + +### GetHasProgressOk + +`func (o *AchievementAdditionalProperties) GetHasProgressOk() (bool, bool)` + +GetHasProgressOk returns a tuple with the HasProgress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasProgress + +`func (o *AchievementAdditionalProperties) HasHasProgress() bool` + +HasHasProgress returns a boolean if a field has been set. + +### SetHasProgress + +`func (o *AchievementAdditionalProperties) SetHasProgress(v bool)` + +SetHasProgress gets a reference to the given bool and assigns it to the HasProgress field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AchievementProgress.md b/docs/AchievementProgress.md new file mode 100644 index 00000000..3a29822a --- /dev/null +++ b/docs/AchievementProgress.md @@ -0,0 +1,273 @@ +# AchievementProgress + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AchievementId** | Pointer to **int32** | The internal ID of the achievement. | +**Name** | Pointer to **string** | The internal name of the achievement used in API requests. | +**Title** | Pointer to **string** | The display name of the achievement in the Campaign Manager. | +**CampaignId** | Pointer to **int32** | The ID of the campaign the achievement belongs to. | +**Status** | Pointer to **string** | The status of the achievement. | +**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. | [optional] +**Progress** | Pointer to **float32** | The current progress of the customer in the achievement. | +**StartDate** | Pointer to [**time.Time**](time.Time.md) | Timestamp at which the customer started the achievement. | +**CompletionDate** | Pointer to [**time.Time**](time.Time.md) | Timestamp at which point the customer completed the achievement. | [optional] +**EndDate** | Pointer to [**time.Time**](time.Time.md) | Timestamp at which point the achievement ends and resets for the customer. | + +## Methods + +### GetAchievementId + +`func (o *AchievementProgress) GetAchievementId() int32` + +GetAchievementId returns the AchievementId field if non-nil, zero value otherwise. + +### GetAchievementIdOk + +`func (o *AchievementProgress) GetAchievementIdOk() (int32, bool)` + +GetAchievementIdOk returns a tuple with the AchievementId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAchievementId + +`func (o *AchievementProgress) HasAchievementId() bool` + +HasAchievementId returns a boolean if a field has been set. + +### SetAchievementId + +`func (o *AchievementProgress) SetAchievementId(v int32)` + +SetAchievementId gets a reference to the given int32 and assigns it to the AchievementId field. + +### GetName + +`func (o *AchievementProgress) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *AchievementProgress) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *AchievementProgress) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *AchievementProgress) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetTitle + +`func (o *AchievementProgress) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *AchievementProgress) GetTitleOk() (string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTitle + +`func (o *AchievementProgress) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### SetTitle + +`func (o *AchievementProgress) SetTitle(v string)` + +SetTitle gets a reference to the given string and assigns it to the Title field. + +### GetCampaignId + +`func (o *AchievementProgress) GetCampaignId() int32` + +GetCampaignId returns the CampaignId field if non-nil, zero value otherwise. + +### GetCampaignIdOk + +`func (o *AchievementProgress) GetCampaignIdOk() (int32, bool)` + +GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignId + +`func (o *AchievementProgress) HasCampaignId() bool` + +HasCampaignId returns a boolean if a field has been set. + +### SetCampaignId + +`func (o *AchievementProgress) SetCampaignId(v int32)` + +SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. + +### GetStatus + +`func (o *AchievementProgress) GetStatus() string` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *AchievementProgress) GetStatusOk() (string, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *AchievementProgress) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *AchievementProgress) SetStatus(v string)` + +SetStatus gets a reference to the given string and assigns it to the Status field. + +### GetTarget + +`func (o *AchievementProgress) GetTarget() float32` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *AchievementProgress) GetTargetOk() (float32, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTarget + +`func (o *AchievementProgress) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### SetTarget + +`func (o *AchievementProgress) SetTarget(v float32)` + +SetTarget gets a reference to the given float32 and assigns it to the Target field. + +### GetProgress + +`func (o *AchievementProgress) GetProgress() float32` + +GetProgress returns the Progress field if non-nil, zero value otherwise. + +### GetProgressOk + +`func (o *AchievementProgress) GetProgressOk() (float32, bool)` + +GetProgressOk returns a tuple with the Progress field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgress + +`func (o *AchievementProgress) HasProgress() bool` + +HasProgress returns a boolean if a field has been set. + +### SetProgress + +`func (o *AchievementProgress) SetProgress(v float32)` + +SetProgress gets a reference to the given float32 and assigns it to the Progress field. + +### GetStartDate + +`func (o *AchievementProgress) GetStartDate() time.Time` + +GetStartDate returns the StartDate field if non-nil, zero value otherwise. + +### GetStartDateOk + +`func (o *AchievementProgress) GetStartDateOk() (time.Time, bool)` + +GetStartDateOk returns a tuple with the StartDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStartDate + +`func (o *AchievementProgress) HasStartDate() bool` + +HasStartDate returns a boolean if a field has been set. + +### SetStartDate + +`func (o *AchievementProgress) SetStartDate(v time.Time)` + +SetStartDate gets a reference to the given time.Time and assigns it to the StartDate field. + +### GetCompletionDate + +`func (o *AchievementProgress) GetCompletionDate() time.Time` + +GetCompletionDate returns the CompletionDate field if non-nil, zero value otherwise. + +### GetCompletionDateOk + +`func (o *AchievementProgress) GetCompletionDateOk() (time.Time, bool)` + +GetCompletionDateOk returns a tuple with the CompletionDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCompletionDate + +`func (o *AchievementProgress) HasCompletionDate() bool` + +HasCompletionDate returns a boolean if a field has been set. + +### SetCompletionDate + +`func (o *AchievementProgress) SetCompletionDate(v time.Time)` + +SetCompletionDate gets a reference to the given time.Time and assigns it to the CompletionDate field. + +### GetEndDate + +`func (o *AchievementProgress) GetEndDate() time.Time` + +GetEndDate returns the EndDate field if non-nil, zero value otherwise. + +### GetEndDateOk + +`func (o *AchievementProgress) GetEndDateOk() (time.Time, bool)` + +GetEndDateOk returns a tuple with the EndDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEndDate + +`func (o *AchievementProgress) HasEndDate() bool` + +HasEndDate returns a boolean if a field has been set. + +### SetEndDate + +`func (o *AchievementProgress) SetEndDate(v time.Time)` + +SetEndDate gets a reference to the given time.Time and assigns it to the EndDate field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AddItemCatalogAction.md b/docs/AddItemCatalogAction.md index 47380355..a4cff900 100644 --- a/docs/AddItemCatalogAction.md +++ b/docs/AddItemCatalogAction.md @@ -7,7 +7,8 @@ Name | Type | Description | Notes **Sku** | Pointer to **string** | The unique SKU of the item to add. | **Price** | Pointer to **float32** | Price of the item. | [optional] **Attributes** | Pointer to [**map[string]interface{}**](.md) | The attributes of the item to add. | [optional] -**ReplaceIfExists** | Pointer to **bool** | Indicates whether to replace the attributes of the item if the same SKU exists. | [optional] [default to false] +**Product** | Pointer to [**Product**](Product.md) | | [optional] +**ReplaceIfExists** | Pointer to **bool** | Indicates whether to replace the attributes of the item if the same SKU exists. **Note**: When set to `true`: - If you do not provide a new `price` value, the existing `price` value is retained. - If you do not provide a new `product` value, the `product` value is set to `null`. | [optional] [default to false] ## Methods @@ -86,6 +87,31 @@ HasAttributes returns a boolean if a field has been set. SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field. +### GetProduct + +`func (o *AddItemCatalogAction) GetProduct() Product` + +GetProduct returns the Product field if non-nil, zero value otherwise. + +### GetProductOk + +`func (o *AddItemCatalogAction) GetProductOk() (Product, bool)` + +GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProduct + +`func (o *AddItemCatalogAction) HasProduct() bool` + +HasProduct returns a boolean if a field has been set. + +### SetProduct + +`func (o *AddItemCatalogAction) SetProduct(v Product)` + +SetProduct gets a reference to the given Product and assigns it to the Product field. + ### GetReplaceIfExists `func (o *AddItemCatalogAction) GetReplaceIfExists() bool` diff --git a/docs/AdditionalCampaignProperties.md b/docs/AdditionalCampaignProperties.md index 54a4697f..302905e8 100644 --- a/docs/AdditionalCampaignProperties.md +++ b/docs/AdditionalCampaignProperties.md @@ -25,6 +25,7 @@ Name | Type | Description | Notes **CreatedBy** | Pointer to **string** | Name of the user who created this campaign if available. | [optional] **UpdatedBy** | Pointer to **string** | Name of the user who last updated this campaign if available. | [optional] **TemplateId** | Pointer to **int32** | The ID of the Campaign Template this Campaign was created from. | [optional] +**FrontendState** | Pointer to **string** | A campaign state described exactly as in the Campaign Manager. | ## Methods @@ -553,6 +554,31 @@ HasTemplateId returns a boolean if a field has been set. SetTemplateId gets a reference to the given int32 and assigns it to the TemplateId field. +### GetFrontendState + +`func (o *AdditionalCampaignProperties) GetFrontendState() string` + +GetFrontendState returns the FrontendState field if non-nil, zero value otherwise. + +### GetFrontendStateOk + +`func (o *AdditionalCampaignProperties) GetFrontendStateOk() (string, bool)` + +GetFrontendStateOk returns a tuple with the FrontendState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFrontendState + +`func (o *AdditionalCampaignProperties) HasFrontendState() bool` + +HasFrontendState returns a boolean if a field has been set. + +### SetFrontendState + +`func (o *AdditionalCampaignProperties) SetFrontendState(v string)` + +SetFrontendState gets a reference to the given string and assigns it to the FrontendState field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ApplicationAnalyticsDataPoint.md b/docs/ApplicationAnalyticsDataPoint.md new file mode 100644 index 00000000..3d71b6a2 --- /dev/null +++ b/docs/ApplicationAnalyticsDataPoint.md @@ -0,0 +1,221 @@ +# ApplicationAnalyticsDataPoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The start of the aggregation time frame in UTC. | [optional] +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the aggregation time frame in UTC. | [optional] +**TotalRevenue** | Pointer to [**ApplicationAnalyticsDataPointTotalRevenue**](ApplicationAnalyticsDataPoint_totalRevenue.md) | | [optional] +**SessionsCount** | Pointer to [**ApplicationAnalyticsDataPointSessionsCount**](ApplicationAnalyticsDataPoint_sessionsCount.md) | | [optional] +**AvgItemsPerSession** | Pointer to [**ApplicationAnalyticsDataPointAvgItemsPerSession**](ApplicationAnalyticsDataPoint_avgItemsPerSession.md) | | [optional] +**AvgSessionValue** | Pointer to [**ApplicationAnalyticsDataPointAvgSessionValue**](ApplicationAnalyticsDataPoint_avgSessionValue.md) | | [optional] +**TotalDiscounts** | Pointer to **float32** | The total value of discounts given for cart items in influenced sessions. | [optional] +**CouponsCount** | Pointer to **float32** | The number of times a coupon was successfully redeemed in influenced sessions. | [optional] + +## Methods + +### GetStartTime + +`func (o *ApplicationAnalyticsDataPoint) GetStartTime() time.Time` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *ApplicationAnalyticsDataPoint) GetStartTimeOk() (time.Time, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStartTime + +`func (o *ApplicationAnalyticsDataPoint) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### SetStartTime + +`func (o *ApplicationAnalyticsDataPoint) SetStartTime(v time.Time)` + +SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field. + +### GetEndTime + +`func (o *ApplicationAnalyticsDataPoint) GetEndTime() time.Time` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *ApplicationAnalyticsDataPoint) GetEndTimeOk() (time.Time, bool)` + +GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEndTime + +`func (o *ApplicationAnalyticsDataPoint) HasEndTime() bool` + +HasEndTime returns a boolean if a field has been set. + +### SetEndTime + +`func (o *ApplicationAnalyticsDataPoint) SetEndTime(v time.Time)` + +SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field. + +### GetTotalRevenue + +`func (o *ApplicationAnalyticsDataPoint) GetTotalRevenue() ApplicationAnalyticsDataPointTotalRevenue` + +GetTotalRevenue returns the TotalRevenue field if non-nil, zero value otherwise. + +### GetTotalRevenueOk + +`func (o *ApplicationAnalyticsDataPoint) GetTotalRevenueOk() (ApplicationAnalyticsDataPointTotalRevenue, bool)` + +GetTotalRevenueOk returns a tuple with the TotalRevenue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalRevenue + +`func (o *ApplicationAnalyticsDataPoint) HasTotalRevenue() bool` + +HasTotalRevenue returns a boolean if a field has been set. + +### SetTotalRevenue + +`func (o *ApplicationAnalyticsDataPoint) SetTotalRevenue(v ApplicationAnalyticsDataPointTotalRevenue)` + +SetTotalRevenue gets a reference to the given ApplicationAnalyticsDataPointTotalRevenue and assigns it to the TotalRevenue field. + +### GetSessionsCount + +`func (o *ApplicationAnalyticsDataPoint) GetSessionsCount() ApplicationAnalyticsDataPointSessionsCount` + +GetSessionsCount returns the SessionsCount field if non-nil, zero value otherwise. + +### GetSessionsCountOk + +`func (o *ApplicationAnalyticsDataPoint) GetSessionsCountOk() (ApplicationAnalyticsDataPointSessionsCount, bool)` + +GetSessionsCountOk returns a tuple with the SessionsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSessionsCount + +`func (o *ApplicationAnalyticsDataPoint) HasSessionsCount() bool` + +HasSessionsCount returns a boolean if a field has been set. + +### SetSessionsCount + +`func (o *ApplicationAnalyticsDataPoint) SetSessionsCount(v ApplicationAnalyticsDataPointSessionsCount)` + +SetSessionsCount gets a reference to the given ApplicationAnalyticsDataPointSessionsCount and assigns it to the SessionsCount field. + +### GetAvgItemsPerSession + +`func (o *ApplicationAnalyticsDataPoint) GetAvgItemsPerSession() ApplicationAnalyticsDataPointAvgItemsPerSession` + +GetAvgItemsPerSession returns the AvgItemsPerSession field if non-nil, zero value otherwise. + +### GetAvgItemsPerSessionOk + +`func (o *ApplicationAnalyticsDataPoint) GetAvgItemsPerSessionOk() (ApplicationAnalyticsDataPointAvgItemsPerSession, bool)` + +GetAvgItemsPerSessionOk returns a tuple with the AvgItemsPerSession field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAvgItemsPerSession + +`func (o *ApplicationAnalyticsDataPoint) HasAvgItemsPerSession() bool` + +HasAvgItemsPerSession returns a boolean if a field has been set. + +### SetAvgItemsPerSession + +`func (o *ApplicationAnalyticsDataPoint) SetAvgItemsPerSession(v ApplicationAnalyticsDataPointAvgItemsPerSession)` + +SetAvgItemsPerSession gets a reference to the given ApplicationAnalyticsDataPointAvgItemsPerSession and assigns it to the AvgItemsPerSession field. + +### GetAvgSessionValue + +`func (o *ApplicationAnalyticsDataPoint) GetAvgSessionValue() ApplicationAnalyticsDataPointAvgSessionValue` + +GetAvgSessionValue returns the AvgSessionValue field if non-nil, zero value otherwise. + +### GetAvgSessionValueOk + +`func (o *ApplicationAnalyticsDataPoint) GetAvgSessionValueOk() (ApplicationAnalyticsDataPointAvgSessionValue, bool)` + +GetAvgSessionValueOk returns a tuple with the AvgSessionValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAvgSessionValue + +`func (o *ApplicationAnalyticsDataPoint) HasAvgSessionValue() bool` + +HasAvgSessionValue returns a boolean if a field has been set. + +### SetAvgSessionValue + +`func (o *ApplicationAnalyticsDataPoint) SetAvgSessionValue(v ApplicationAnalyticsDataPointAvgSessionValue)` + +SetAvgSessionValue gets a reference to the given ApplicationAnalyticsDataPointAvgSessionValue and assigns it to the AvgSessionValue field. + +### GetTotalDiscounts + +`func (o *ApplicationAnalyticsDataPoint) GetTotalDiscounts() float32` + +GetTotalDiscounts returns the TotalDiscounts field if non-nil, zero value otherwise. + +### GetTotalDiscountsOk + +`func (o *ApplicationAnalyticsDataPoint) GetTotalDiscountsOk() (float32, bool)` + +GetTotalDiscountsOk returns a tuple with the TotalDiscounts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalDiscounts + +`func (o *ApplicationAnalyticsDataPoint) HasTotalDiscounts() bool` + +HasTotalDiscounts returns a boolean if a field has been set. + +### SetTotalDiscounts + +`func (o *ApplicationAnalyticsDataPoint) SetTotalDiscounts(v float32)` + +SetTotalDiscounts gets a reference to the given float32 and assigns it to the TotalDiscounts field. + +### GetCouponsCount + +`func (o *ApplicationAnalyticsDataPoint) GetCouponsCount() float32` + +GetCouponsCount returns the CouponsCount field if non-nil, zero value otherwise. + +### GetCouponsCountOk + +`func (o *ApplicationAnalyticsDataPoint) GetCouponsCountOk() (float32, bool)` + +GetCouponsCountOk returns a tuple with the CouponsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCouponsCount + +`func (o *ApplicationAnalyticsDataPoint) HasCouponsCount() bool` + +HasCouponsCount returns a boolean if a field has been set. + +### SetCouponsCount + +`func (o *ApplicationAnalyticsDataPoint) SetCouponsCount(v float32)` + +SetCouponsCount gets a reference to the given float32 and assigns it to the CouponsCount field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationAnalyticsDataPointAvgItemsPerSession.md b/docs/ApplicationAnalyticsDataPointAvgItemsPerSession.md new file mode 100644 index 00000000..aea8150b --- /dev/null +++ b/docs/ApplicationAnalyticsDataPointAvgItemsPerSession.md @@ -0,0 +1,65 @@ +# ApplicationAnalyticsDataPointAvgItemsPerSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **float32** | | [optional] +**Influenced** | Pointer to **float32** | | [optional] + +## Methods + +### GetTotal + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetTotal() float32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetTotalOk() (float32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotal + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### SetTotal + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) SetTotal(v float32)` + +SetTotal gets a reference to the given float32 and assigns it to the Total field. + +### GetInfluenced + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetInfluenced() float32` + +GetInfluenced returns the Influenced field if non-nil, zero value otherwise. + +### GetInfluencedOk + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetInfluencedOk() (float32, bool)` + +GetInfluencedOk returns a tuple with the Influenced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInfluenced + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) HasInfluenced() bool` + +HasInfluenced returns a boolean if a field has been set. + +### SetInfluenced + +`func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) SetInfluenced(v float32)` + +SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationAnalyticsDataPointAvgSessionValue.md b/docs/ApplicationAnalyticsDataPointAvgSessionValue.md new file mode 100644 index 00000000..99cfb48c --- /dev/null +++ b/docs/ApplicationAnalyticsDataPointAvgSessionValue.md @@ -0,0 +1,65 @@ +# ApplicationAnalyticsDataPointAvgSessionValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **float32** | | [optional] +**Influenced** | Pointer to **float32** | | [optional] + +## Methods + +### GetTotal + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetTotal() float32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetTotalOk() (float32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotal + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### SetTotal + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) SetTotal(v float32)` + +SetTotal gets a reference to the given float32 and assigns it to the Total field. + +### GetInfluenced + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetInfluenced() float32` + +GetInfluenced returns the Influenced field if non-nil, zero value otherwise. + +### GetInfluencedOk + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetInfluencedOk() (float32, bool)` + +GetInfluencedOk returns a tuple with the Influenced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInfluenced + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) HasInfluenced() bool` + +HasInfluenced returns a boolean if a field has been set. + +### SetInfluenced + +`func (o *ApplicationAnalyticsDataPointAvgSessionValue) SetInfluenced(v float32)` + +SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationAnalyticsDataPointSessionsCount.md b/docs/ApplicationAnalyticsDataPointSessionsCount.md new file mode 100644 index 00000000..040492df --- /dev/null +++ b/docs/ApplicationAnalyticsDataPointSessionsCount.md @@ -0,0 +1,65 @@ +# ApplicationAnalyticsDataPointSessionsCount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **float32** | | [optional] +**Influenced** | Pointer to **float32** | | [optional] + +## Methods + +### GetTotal + +`func (o *ApplicationAnalyticsDataPointSessionsCount) GetTotal() float32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ApplicationAnalyticsDataPointSessionsCount) GetTotalOk() (float32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotal + +`func (o *ApplicationAnalyticsDataPointSessionsCount) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### SetTotal + +`func (o *ApplicationAnalyticsDataPointSessionsCount) SetTotal(v float32)` + +SetTotal gets a reference to the given float32 and assigns it to the Total field. + +### GetInfluenced + +`func (o *ApplicationAnalyticsDataPointSessionsCount) GetInfluenced() float32` + +GetInfluenced returns the Influenced field if non-nil, zero value otherwise. + +### GetInfluencedOk + +`func (o *ApplicationAnalyticsDataPointSessionsCount) GetInfluencedOk() (float32, bool)` + +GetInfluencedOk returns a tuple with the Influenced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInfluenced + +`func (o *ApplicationAnalyticsDataPointSessionsCount) HasInfluenced() bool` + +HasInfluenced returns a boolean if a field has been set. + +### SetInfluenced + +`func (o *ApplicationAnalyticsDataPointSessionsCount) SetInfluenced(v float32)` + +SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationAnalyticsDataPointTotalRevenue.md b/docs/ApplicationAnalyticsDataPointTotalRevenue.md new file mode 100644 index 00000000..eb1fcc88 --- /dev/null +++ b/docs/ApplicationAnalyticsDataPointTotalRevenue.md @@ -0,0 +1,65 @@ +# ApplicationAnalyticsDataPointTotalRevenue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | Pointer to **float32** | | [optional] +**Influenced** | Pointer to **float32** | | [optional] + +## Methods + +### GetTotal + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) GetTotal() float32` + +GetTotal returns the Total field if non-nil, zero value otherwise. + +### GetTotalOk + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) GetTotalOk() (float32, bool)` + +GetTotalOk returns a tuple with the Total field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotal + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) HasTotal() bool` + +HasTotal returns a boolean if a field has been set. + +### SetTotal + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) SetTotal(v float32)` + +SetTotal gets a reference to the given float32 and assigns it to the Total field. + +### GetInfluenced + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) GetInfluenced() float32` + +GetInfluenced returns the Influenced field if non-nil, zero value otherwise. + +### GetInfluencedOk + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) GetInfluencedOk() (float32, bool)` + +GetInfluencedOk returns a tuple with the Influenced field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInfluenced + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) HasInfluenced() bool` + +HasInfluenced returns a boolean if a field has been set. + +### SetInfluenced + +`func (o *ApplicationAnalyticsDataPointTotalRevenue) SetInfluenced(v float32)` + +SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationApiKey.md b/docs/ApplicationApiKey.md index b5131efa..55e07dac 100644 --- a/docs/ApplicationApiKey.md +++ b/docs/ApplicationApiKey.md @@ -4,9 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | Pointer to **string** | Title for API Key. | -**Expires** | Pointer to [**time.Time**](time.Time.md) | The date the API key expired. | +**Title** | Pointer to **string** | Title of the API key. | +**Expires** | Pointer to [**time.Time**](time.Time.md) | The date the API key expires. | **Platform** | Pointer to **string** | The third-party platform the API key is valid for. Use `none` for a generic API key to be used from your own integration layer. | [optional] +**Type** | Pointer to **string** | The API key type. Can be empty or `staging`. Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. | [optional] +**TimeOffset** | Pointer to **int32** | A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. | [optional] **Id** | Pointer to **int32** | ID of the API Key. | **CreatedBy** | Pointer to **int32** | ID of user who created. | **AccountID** | Pointer to **int32** | ID of account the key is used for. | @@ -90,6 +92,56 @@ HasPlatform returns a boolean if a field has been set. SetPlatform gets a reference to the given string and assigns it to the Platform field. +### GetType + +`func (o *ApplicationApiKey) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ApplicationApiKey) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *ApplicationApiKey) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *ApplicationApiKey) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetTimeOffset + +`func (o *ApplicationApiKey) GetTimeOffset() int32` + +GetTimeOffset returns the TimeOffset field if non-nil, zero value otherwise. + +### GetTimeOffsetOk + +`func (o *ApplicationApiKey) GetTimeOffsetOk() (int32, bool)` + +GetTimeOffsetOk returns a tuple with the TimeOffset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTimeOffset + +`func (o *ApplicationApiKey) HasTimeOffset() bool` + +HasTimeOffset returns a boolean if a field has been set. + +### SetTimeOffset + +`func (o *ApplicationApiKey) SetTimeOffset(v int32)` + +SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. + ### GetId `func (o *ApplicationApiKey) GetId() int32` diff --git a/docs/ApplicationCampaignAnalytics.md b/docs/ApplicationCampaignAnalytics.md new file mode 100644 index 00000000..6a15696a --- /dev/null +++ b/docs/ApplicationCampaignAnalytics.md @@ -0,0 +1,403 @@ +# ApplicationCampaignAnalytics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**StartTime** | Pointer to [**time.Time**](time.Time.md) | The start of the aggregation time frame in UTC. | [optional] +**EndTime** | Pointer to [**time.Time**](time.Time.md) | The end of the aggregation time frame in UTC. | [optional] +**CampaignId** | Pointer to **int32** | The ID of the campaign. | [optional] +**CampaignName** | Pointer to **string** | The name of the campaign. | [optional] +**CampaignTags** | Pointer to **[]string** | A list of tags for the campaign. | [optional] +**CampaignState** | Pointer to **string** | The state of the campaign. **Note:** A disabled or archived campaign is not evaluated for rules or coupons. | [optional] [default to CAMPAIGN_STATE_ENABLED] +**CampaignActiveRulesetId** | Pointer to **int32** | The [ID of the ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. | [optional] +**CampaignStartTime** | Pointer to [**time.Time**](time.Time.md) | Date and time when the campaign becomes active. | [optional] +**CampaignEndTime** | Pointer to [**time.Time**](time.Time.md) | Date and time when the campaign becomes inactive. | [optional] +**TotalRevenue** | Pointer to [**ApplicationCampaignAnalyticsTotalRevenue**](ApplicationCampaignAnalytics_totalRevenue.md) | | [optional] +**SessionsCount** | Pointer to [**ApplicationCampaignAnalyticsSessionsCount**](ApplicationCampaignAnalytics_sessionsCount.md) | | [optional] +**AvgItemsPerSession** | Pointer to [**ApplicationCampaignAnalyticsAvgItemsPerSession**](ApplicationCampaignAnalytics_avgItemsPerSession.md) | | [optional] +**AvgSessionValue** | Pointer to [**ApplicationCampaignAnalyticsAvgSessionValue**](ApplicationCampaignAnalytics_avgSessionValue.md) | | [optional] +**TotalDiscounts** | Pointer to [**ApplicationCampaignAnalyticsTotalDiscounts**](ApplicationCampaignAnalytics_totalDiscounts.md) | | [optional] +**CouponsCount** | Pointer to [**ApplicationCampaignAnalyticsCouponsCount**](ApplicationCampaignAnalytics_couponsCount.md) | | [optional] + +## Methods + +### GetStartTime + +`func (o *ApplicationCampaignAnalytics) GetStartTime() time.Time` + +GetStartTime returns the StartTime field if non-nil, zero value otherwise. + +### GetStartTimeOk + +`func (o *ApplicationCampaignAnalytics) GetStartTimeOk() (time.Time, bool)` + +GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStartTime + +`func (o *ApplicationCampaignAnalytics) HasStartTime() bool` + +HasStartTime returns a boolean if a field has been set. + +### SetStartTime + +`func (o *ApplicationCampaignAnalytics) SetStartTime(v time.Time)` + +SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field. + +### GetEndTime + +`func (o *ApplicationCampaignAnalytics) GetEndTime() time.Time` + +GetEndTime returns the EndTime field if non-nil, zero value otherwise. + +### GetEndTimeOk + +`func (o *ApplicationCampaignAnalytics) GetEndTimeOk() (time.Time, bool)` + +GetEndTimeOk returns a tuple with the EndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEndTime + +`func (o *ApplicationCampaignAnalytics) HasEndTime() bool` + +HasEndTime returns a boolean if a field has been set. + +### SetEndTime + +`func (o *ApplicationCampaignAnalytics) SetEndTime(v time.Time)` + +SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field. + +### GetCampaignId + +`func (o *ApplicationCampaignAnalytics) GetCampaignId() int32` + +GetCampaignId returns the CampaignId field if non-nil, zero value otherwise. + +### GetCampaignIdOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignIdOk() (int32, bool)` + +GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignId + +`func (o *ApplicationCampaignAnalytics) HasCampaignId() bool` + +HasCampaignId returns a boolean if a field has been set. + +### SetCampaignId + +`func (o *ApplicationCampaignAnalytics) SetCampaignId(v int32)` + +SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. + +### GetCampaignName + +`func (o *ApplicationCampaignAnalytics) GetCampaignName() string` + +GetCampaignName returns the CampaignName field if non-nil, zero value otherwise. + +### GetCampaignNameOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignNameOk() (string, bool)` + +GetCampaignNameOk returns a tuple with the CampaignName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignName + +`func (o *ApplicationCampaignAnalytics) HasCampaignName() bool` + +HasCampaignName returns a boolean if a field has been set. + +### SetCampaignName + +`func (o *ApplicationCampaignAnalytics) SetCampaignName(v string)` + +SetCampaignName gets a reference to the given string and assigns it to the CampaignName field. + +### GetCampaignTags + +`func (o *ApplicationCampaignAnalytics) GetCampaignTags() []string` + +GetCampaignTags returns the CampaignTags field if non-nil, zero value otherwise. + +### GetCampaignTagsOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignTagsOk() ([]string, bool)` + +GetCampaignTagsOk returns a tuple with the CampaignTags field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignTags + +`func (o *ApplicationCampaignAnalytics) HasCampaignTags() bool` + +HasCampaignTags returns a boolean if a field has been set. + +### SetCampaignTags + +`func (o *ApplicationCampaignAnalytics) SetCampaignTags(v []string)` + +SetCampaignTags gets a reference to the given []string and assigns it to the CampaignTags field. + +### GetCampaignState + +`func (o *ApplicationCampaignAnalytics) GetCampaignState() string` + +GetCampaignState returns the CampaignState field if non-nil, zero value otherwise. + +### GetCampaignStateOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignStateOk() (string, bool)` + +GetCampaignStateOk returns a tuple with the CampaignState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignState + +`func (o *ApplicationCampaignAnalytics) HasCampaignState() bool` + +HasCampaignState returns a boolean if a field has been set. + +### SetCampaignState + +`func (o *ApplicationCampaignAnalytics) SetCampaignState(v string)` + +SetCampaignState gets a reference to the given string and assigns it to the CampaignState field. + +### GetCampaignActiveRulesetId + +`func (o *ApplicationCampaignAnalytics) GetCampaignActiveRulesetId() int32` + +GetCampaignActiveRulesetId returns the CampaignActiveRulesetId field if non-nil, zero value otherwise. + +### GetCampaignActiveRulesetIdOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignActiveRulesetIdOk() (int32, bool)` + +GetCampaignActiveRulesetIdOk returns a tuple with the CampaignActiveRulesetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignActiveRulesetId + +`func (o *ApplicationCampaignAnalytics) HasCampaignActiveRulesetId() bool` + +HasCampaignActiveRulesetId returns a boolean if a field has been set. + +### SetCampaignActiveRulesetId + +`func (o *ApplicationCampaignAnalytics) SetCampaignActiveRulesetId(v int32)` + +SetCampaignActiveRulesetId gets a reference to the given int32 and assigns it to the CampaignActiveRulesetId field. + +### GetCampaignStartTime + +`func (o *ApplicationCampaignAnalytics) GetCampaignStartTime() time.Time` + +GetCampaignStartTime returns the CampaignStartTime field if non-nil, zero value otherwise. + +### GetCampaignStartTimeOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignStartTimeOk() (time.Time, bool)` + +GetCampaignStartTimeOk returns a tuple with the CampaignStartTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignStartTime + +`func (o *ApplicationCampaignAnalytics) HasCampaignStartTime() bool` + +HasCampaignStartTime returns a boolean if a field has been set. + +### SetCampaignStartTime + +`func (o *ApplicationCampaignAnalytics) SetCampaignStartTime(v time.Time)` + +SetCampaignStartTime gets a reference to the given time.Time and assigns it to the CampaignStartTime field. + +### GetCampaignEndTime + +`func (o *ApplicationCampaignAnalytics) GetCampaignEndTime() time.Time` + +GetCampaignEndTime returns the CampaignEndTime field if non-nil, zero value otherwise. + +### GetCampaignEndTimeOk + +`func (o *ApplicationCampaignAnalytics) GetCampaignEndTimeOk() (time.Time, bool)` + +GetCampaignEndTimeOk returns a tuple with the CampaignEndTime field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignEndTime + +`func (o *ApplicationCampaignAnalytics) HasCampaignEndTime() bool` + +HasCampaignEndTime returns a boolean if a field has been set. + +### SetCampaignEndTime + +`func (o *ApplicationCampaignAnalytics) SetCampaignEndTime(v time.Time)` + +SetCampaignEndTime gets a reference to the given time.Time and assigns it to the CampaignEndTime field. + +### GetTotalRevenue + +`func (o *ApplicationCampaignAnalytics) GetTotalRevenue() ApplicationCampaignAnalyticsTotalRevenue` + +GetTotalRevenue returns the TotalRevenue field if non-nil, zero value otherwise. + +### GetTotalRevenueOk + +`func (o *ApplicationCampaignAnalytics) GetTotalRevenueOk() (ApplicationCampaignAnalyticsTotalRevenue, bool)` + +GetTotalRevenueOk returns a tuple with the TotalRevenue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalRevenue + +`func (o *ApplicationCampaignAnalytics) HasTotalRevenue() bool` + +HasTotalRevenue returns a boolean if a field has been set. + +### SetTotalRevenue + +`func (o *ApplicationCampaignAnalytics) SetTotalRevenue(v ApplicationCampaignAnalyticsTotalRevenue)` + +SetTotalRevenue gets a reference to the given ApplicationCampaignAnalyticsTotalRevenue and assigns it to the TotalRevenue field. + +### GetSessionsCount + +`func (o *ApplicationCampaignAnalytics) GetSessionsCount() ApplicationCampaignAnalyticsSessionsCount` + +GetSessionsCount returns the SessionsCount field if non-nil, zero value otherwise. + +### GetSessionsCountOk + +`func (o *ApplicationCampaignAnalytics) GetSessionsCountOk() (ApplicationCampaignAnalyticsSessionsCount, bool)` + +GetSessionsCountOk returns a tuple with the SessionsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSessionsCount + +`func (o *ApplicationCampaignAnalytics) HasSessionsCount() bool` + +HasSessionsCount returns a boolean if a field has been set. + +### SetSessionsCount + +`func (o *ApplicationCampaignAnalytics) SetSessionsCount(v ApplicationCampaignAnalyticsSessionsCount)` + +SetSessionsCount gets a reference to the given ApplicationCampaignAnalyticsSessionsCount and assigns it to the SessionsCount field. + +### GetAvgItemsPerSession + +`func (o *ApplicationCampaignAnalytics) GetAvgItemsPerSession() ApplicationCampaignAnalyticsAvgItemsPerSession` + +GetAvgItemsPerSession returns the AvgItemsPerSession field if non-nil, zero value otherwise. + +### GetAvgItemsPerSessionOk + +`func (o *ApplicationCampaignAnalytics) GetAvgItemsPerSessionOk() (ApplicationCampaignAnalyticsAvgItemsPerSession, bool)` + +GetAvgItemsPerSessionOk returns a tuple with the AvgItemsPerSession field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAvgItemsPerSession + +`func (o *ApplicationCampaignAnalytics) HasAvgItemsPerSession() bool` + +HasAvgItemsPerSession returns a boolean if a field has been set. + +### SetAvgItemsPerSession + +`func (o *ApplicationCampaignAnalytics) SetAvgItemsPerSession(v ApplicationCampaignAnalyticsAvgItemsPerSession)` + +SetAvgItemsPerSession gets a reference to the given ApplicationCampaignAnalyticsAvgItemsPerSession and assigns it to the AvgItemsPerSession field. + +### GetAvgSessionValue + +`func (o *ApplicationCampaignAnalytics) GetAvgSessionValue() ApplicationCampaignAnalyticsAvgSessionValue` + +GetAvgSessionValue returns the AvgSessionValue field if non-nil, zero value otherwise. + +### GetAvgSessionValueOk + +`func (o *ApplicationCampaignAnalytics) GetAvgSessionValueOk() (ApplicationCampaignAnalyticsAvgSessionValue, bool)` + +GetAvgSessionValueOk returns a tuple with the AvgSessionValue field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAvgSessionValue + +`func (o *ApplicationCampaignAnalytics) HasAvgSessionValue() bool` + +HasAvgSessionValue returns a boolean if a field has been set. + +### SetAvgSessionValue + +`func (o *ApplicationCampaignAnalytics) SetAvgSessionValue(v ApplicationCampaignAnalyticsAvgSessionValue)` + +SetAvgSessionValue gets a reference to the given ApplicationCampaignAnalyticsAvgSessionValue and assigns it to the AvgSessionValue field. + +### GetTotalDiscounts + +`func (o *ApplicationCampaignAnalytics) GetTotalDiscounts() ApplicationCampaignAnalyticsTotalDiscounts` + +GetTotalDiscounts returns the TotalDiscounts field if non-nil, zero value otherwise. + +### GetTotalDiscountsOk + +`func (o *ApplicationCampaignAnalytics) GetTotalDiscountsOk() (ApplicationCampaignAnalyticsTotalDiscounts, bool)` + +GetTotalDiscountsOk returns a tuple with the TotalDiscounts field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalDiscounts + +`func (o *ApplicationCampaignAnalytics) HasTotalDiscounts() bool` + +HasTotalDiscounts returns a boolean if a field has been set. + +### SetTotalDiscounts + +`func (o *ApplicationCampaignAnalytics) SetTotalDiscounts(v ApplicationCampaignAnalyticsTotalDiscounts)` + +SetTotalDiscounts gets a reference to the given ApplicationCampaignAnalyticsTotalDiscounts and assigns it to the TotalDiscounts field. + +### GetCouponsCount + +`func (o *ApplicationCampaignAnalytics) GetCouponsCount() ApplicationCampaignAnalyticsCouponsCount` + +GetCouponsCount returns the CouponsCount field if non-nil, zero value otherwise. + +### GetCouponsCountOk + +`func (o *ApplicationCampaignAnalytics) GetCouponsCountOk() (ApplicationCampaignAnalyticsCouponsCount, bool)` + +GetCouponsCountOk returns a tuple with the CouponsCount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCouponsCount + +`func (o *ApplicationCampaignAnalytics) HasCouponsCount() bool` + +HasCouponsCount returns a boolean if a field has been set. + +### SetCouponsCount + +`func (o *ApplicationCampaignAnalytics) SetCouponsCount(v ApplicationCampaignAnalyticsCouponsCount)` + +SetCouponsCount gets a reference to the given ApplicationCampaignAnalyticsCouponsCount and assigns it to the CouponsCount field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCampaignAnalyticsAvgItemsPerSession.md b/docs/ApplicationCampaignAnalyticsAvgItemsPerSession.md new file mode 100644 index 00000000..132f430a --- /dev/null +++ b/docs/ApplicationCampaignAnalyticsAvgItemsPerSession.md @@ -0,0 +1,91 @@ +# ApplicationCampaignAnalyticsAvgItemsPerSession + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **float32** | | [optional] +**Uplift** | Pointer to **float32** | | [optional] +**Trend** | Pointer to **float32** | | [optional] + +## Methods + +### GetValue + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetUplift + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetUplift() float32` + +GetUplift returns the Uplift field if non-nil, zero value otherwise. + +### GetUpliftOk + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetUpliftOk() (float32, bool)` + +GetUpliftOk returns a tuple with the Uplift field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUplift + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) HasUplift() bool` + +HasUplift returns a boolean if a field has been set. + +### SetUplift + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) SetUplift(v float32)` + +SetUplift gets a reference to the given float32 and assigns it to the Uplift field. + +### GetTrend + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetTrend() float32` + +GetTrend returns the Trend field if non-nil, zero value otherwise. + +### GetTrendOk + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetTrendOk() (float32, bool)` + +GetTrendOk returns a tuple with the Trend field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTrend + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) HasTrend() bool` + +HasTrend returns a boolean if a field has been set. + +### SetTrend + +`func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) SetTrend(v float32)` + +SetTrend gets a reference to the given float32 and assigns it to the Trend field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCampaignAnalyticsAvgSessionValue.md b/docs/ApplicationCampaignAnalyticsAvgSessionValue.md new file mode 100644 index 00000000..ae60ad25 --- /dev/null +++ b/docs/ApplicationCampaignAnalyticsAvgSessionValue.md @@ -0,0 +1,91 @@ +# ApplicationCampaignAnalyticsAvgSessionValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **float32** | | [optional] +**Uplift** | Pointer to **float32** | | [optional] +**Trend** | Pointer to **float32** | | [optional] + +## Methods + +### GetValue + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetUplift + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetUplift() float32` + +GetUplift returns the Uplift field if non-nil, zero value otherwise. + +### GetUpliftOk + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetUpliftOk() (float32, bool)` + +GetUpliftOk returns a tuple with the Uplift field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUplift + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) HasUplift() bool` + +HasUplift returns a boolean if a field has been set. + +### SetUplift + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) SetUplift(v float32)` + +SetUplift gets a reference to the given float32 and assigns it to the Uplift field. + +### GetTrend + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetTrend() float32` + +GetTrend returns the Trend field if non-nil, zero value otherwise. + +### GetTrendOk + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetTrendOk() (float32, bool)` + +GetTrendOk returns a tuple with the Trend field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTrend + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) HasTrend() bool` + +HasTrend returns a boolean if a field has been set. + +### SetTrend + +`func (o *ApplicationCampaignAnalyticsAvgSessionValue) SetTrend(v float32)` + +SetTrend gets a reference to the given float32 and assigns it to the Trend field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCampaignAnalyticsCouponsCount.md b/docs/ApplicationCampaignAnalyticsCouponsCount.md new file mode 100644 index 00000000..1aca37ee --- /dev/null +++ b/docs/ApplicationCampaignAnalyticsCouponsCount.md @@ -0,0 +1,65 @@ +# ApplicationCampaignAnalyticsCouponsCount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **float32** | | [optional] +**Trend** | Pointer to **float32** | | [optional] + +## Methods + +### GetValue + +`func (o *ApplicationCampaignAnalyticsCouponsCount) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ApplicationCampaignAnalyticsCouponsCount) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *ApplicationCampaignAnalyticsCouponsCount) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *ApplicationCampaignAnalyticsCouponsCount) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetTrend + +`func (o *ApplicationCampaignAnalyticsCouponsCount) GetTrend() float32` + +GetTrend returns the Trend field if non-nil, zero value otherwise. + +### GetTrendOk + +`func (o *ApplicationCampaignAnalyticsCouponsCount) GetTrendOk() (float32, bool)` + +GetTrendOk returns a tuple with the Trend field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTrend + +`func (o *ApplicationCampaignAnalyticsCouponsCount) HasTrend() bool` + +HasTrend returns a boolean if a field has been set. + +### SetTrend + +`func (o *ApplicationCampaignAnalyticsCouponsCount) SetTrend(v float32)` + +SetTrend gets a reference to the given float32 and assigns it to the Trend field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCampaignAnalyticsSessionsCount.md b/docs/ApplicationCampaignAnalyticsSessionsCount.md new file mode 100644 index 00000000..3ef7ee47 --- /dev/null +++ b/docs/ApplicationCampaignAnalyticsSessionsCount.md @@ -0,0 +1,91 @@ +# ApplicationCampaignAnalyticsSessionsCount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **float32** | | [optional] +**InfluenceRate** | Pointer to **float32** | | [optional] +**Trend** | Pointer to **float32** | | [optional] + +## Methods + +### GetValue + +`func (o *ApplicationCampaignAnalyticsSessionsCount) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ApplicationCampaignAnalyticsSessionsCount) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *ApplicationCampaignAnalyticsSessionsCount) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *ApplicationCampaignAnalyticsSessionsCount) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetInfluenceRate + +`func (o *ApplicationCampaignAnalyticsSessionsCount) GetInfluenceRate() float32` + +GetInfluenceRate returns the InfluenceRate field if non-nil, zero value otherwise. + +### GetInfluenceRateOk + +`func (o *ApplicationCampaignAnalyticsSessionsCount) GetInfluenceRateOk() (float32, bool)` + +GetInfluenceRateOk returns a tuple with the InfluenceRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInfluenceRate + +`func (o *ApplicationCampaignAnalyticsSessionsCount) HasInfluenceRate() bool` + +HasInfluenceRate returns a boolean if a field has been set. + +### SetInfluenceRate + +`func (o *ApplicationCampaignAnalyticsSessionsCount) SetInfluenceRate(v float32)` + +SetInfluenceRate gets a reference to the given float32 and assigns it to the InfluenceRate field. + +### GetTrend + +`func (o *ApplicationCampaignAnalyticsSessionsCount) GetTrend() float32` + +GetTrend returns the Trend field if non-nil, zero value otherwise. + +### GetTrendOk + +`func (o *ApplicationCampaignAnalyticsSessionsCount) GetTrendOk() (float32, bool)` + +GetTrendOk returns a tuple with the Trend field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTrend + +`func (o *ApplicationCampaignAnalyticsSessionsCount) HasTrend() bool` + +HasTrend returns a boolean if a field has been set. + +### SetTrend + +`func (o *ApplicationCampaignAnalyticsSessionsCount) SetTrend(v float32)` + +SetTrend gets a reference to the given float32 and assigns it to the Trend field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCampaignAnalyticsTotalDiscounts.md b/docs/ApplicationCampaignAnalyticsTotalDiscounts.md new file mode 100644 index 00000000..6c2ade82 --- /dev/null +++ b/docs/ApplicationCampaignAnalyticsTotalDiscounts.md @@ -0,0 +1,65 @@ +# ApplicationCampaignAnalyticsTotalDiscounts + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **float32** | | [optional] +**Trend** | Pointer to **float32** | | [optional] + +## Methods + +### GetValue + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetTrend + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetTrend() float32` + +GetTrend returns the Trend field if non-nil, zero value otherwise. + +### GetTrendOk + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetTrendOk() (float32, bool)` + +GetTrendOk returns a tuple with the Trend field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTrend + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) HasTrend() bool` + +HasTrend returns a boolean if a field has been set. + +### SetTrend + +`func (o *ApplicationCampaignAnalyticsTotalDiscounts) SetTrend(v float32)` + +SetTrend gets a reference to the given float32 and assigns it to the Trend field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCampaignAnalyticsTotalRevenue.md b/docs/ApplicationCampaignAnalyticsTotalRevenue.md new file mode 100644 index 00000000..d239cb7b --- /dev/null +++ b/docs/ApplicationCampaignAnalyticsTotalRevenue.md @@ -0,0 +1,91 @@ +# ApplicationCampaignAnalyticsTotalRevenue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Value** | Pointer to **float32** | | [optional] +**InfluenceRate** | Pointer to **float32** | | [optional] +**Trend** | Pointer to **float32** | | [optional] + +## Methods + +### GetValue + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetInfluenceRate + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) GetInfluenceRate() float32` + +GetInfluenceRate returns the InfluenceRate field if non-nil, zero value otherwise. + +### GetInfluenceRateOk + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) GetInfluenceRateOk() (float32, bool)` + +GetInfluenceRateOk returns a tuple with the InfluenceRate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasInfluenceRate + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) HasInfluenceRate() bool` + +HasInfluenceRate returns a boolean if a field has been set. + +### SetInfluenceRate + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) SetInfluenceRate(v float32)` + +SetInfluenceRate gets a reference to the given float32 and assigns it to the InfluenceRate field. + +### GetTrend + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) GetTrend() float32` + +GetTrend returns the Trend field if non-nil, zero value otherwise. + +### GetTrendOk + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) GetTrendOk() (float32, bool)` + +GetTrendOk returns a tuple with the Trend field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTrend + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) HasTrend() bool` + +HasTrend returns a boolean if a field has been set. + +### SetTrend + +`func (o *ApplicationCampaignAnalyticsTotalRevenue) SetTrend(v float32)` + +SetTrend gets a reference to the given float32 and assigns it to the Trend field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ApplicationCustomer.md b/docs/ApplicationCustomer.md index d9564753..f62e4019 100644 --- a/docs/ApplicationCustomer.md +++ b/docs/ApplicationCustomer.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **LoyaltyMemberships** | Pointer to [**[]LoyaltyMembership**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] **AudienceMemberships** | Pointer to [**[]AudienceMembership**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] **LastActivity** | Pointer to [**time.Time**](time.Time.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** | Pointer to **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] +**Sandbox** | Pointer to **bool** | An indicator of 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** | Pointer to **string** | The Integration ID of the Customer Profile that referred this Customer in the Application. | [optional] ## Methods diff --git a/docs/AudienceAnalytics.md b/docs/AudienceAnalytics.md index a0e7914d..fa811691 100644 --- a/docs/AudienceAnalytics.md +++ b/docs/AudienceAnalytics.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **AudienceId** | Pointer to **int32** | The ID of the audience. | [optional] -**MembersCount** | Pointer to **int32** | The count of members under a single audience. | [optional] +**MembersCount** | Pointer to **int32** | The member count of the audience. | [optional] ## Methods diff --git a/docs/AudienceCustomer.md b/docs/AudienceCustomer.md index 9f21f6c0..74d49986 100644 --- a/docs/AudienceCustomer.md +++ b/docs/AudienceCustomer.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **LoyaltyMemberships** | Pointer to [**[]LoyaltyMembership**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] **AudienceMemberships** | Pointer to [**[]AudienceMembership**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] **LastActivity** | Pointer to [**time.Time**](time.Time.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** | Pointer to **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] +**Sandbox** | Pointer to **bool** | An indicator of 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** | Pointer to **[]int32** | A list of the IDs of the Applications that are connected to this customer profile. | [optional] **ConnectedAudiences** | Pointer to **[]int32** | A list of the IDs of the audiences that are connected to this customer profile. | [optional] diff --git a/docs/BaseCampaign.md b/docs/BaseCampaign.md index 2724358d..8a07ee53 100644 --- a/docs/BaseCampaign.md +++ b/docs/BaseCampaign.md @@ -17,7 +17,6 @@ Name | Type | Description | Notes **ReferralSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **Limits** | Pointer to [**[]LimitConfig**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | **CampaignGroups** | Pointer to **[]int32** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] -**EvaluationGroupId** | Pointer to **int32** | The ID of the campaign evaluation group the campaign belongs to. | [optional] **Type** | Pointer to **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to TYPE_ADVANCED] **LinkedStoreIds** | Pointer to **[]int32** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] @@ -348,31 +347,6 @@ HasCampaignGroups returns a boolean if a field has been set. SetCampaignGroups gets a reference to the given []int32 and assigns it to the CampaignGroups field. -### GetEvaluationGroupId - -`func (o *BaseCampaign) GetEvaluationGroupId() int32` - -GetEvaluationGroupId returns the EvaluationGroupId field if non-nil, zero value otherwise. - -### GetEvaluationGroupIdOk - -`func (o *BaseCampaign) GetEvaluationGroupIdOk() (int32, bool)` - -GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasEvaluationGroupId - -`func (o *BaseCampaign) HasEvaluationGroupId() bool` - -HasEvaluationGroupId returns a boolean if a field has been set. - -### SetEvaluationGroupId - -`func (o *BaseCampaign) SetEvaluationGroupId(v int32)` - -SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. - ### GetType `func (o *BaseCampaign) GetType() string` diff --git a/docs/BaseLoyaltyProgram.md b/docs/BaseLoyaltyProgram.md index ad2a5c18..c7ed4450 100644 --- a/docs/BaseLoyaltyProgram.md +++ b/docs/BaseLoyaltyProgram.md @@ -12,8 +12,10 @@ Name | Type | Description | Notes **AllowSubledger** | Pointer to **bool** | Indicates if this program supports subledgers inside the program. | [optional] **UsersPerCardLimit** | Pointer to **int32** | 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** | Pointer to **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] -**TiersExpireIn** | Pointer to **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**TiersExpirationPolicy** | Pointer to **string** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] +**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] **TiersDowngradePolicy** | Pointer to **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] +**ProgramJoinPolicy** | Pointer to **string** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] ## Methods @@ -217,6 +219,31 @@ HasSandbox returns a boolean if a field has been set. SetSandbox gets a reference to the given bool and assigns it to the Sandbox field. +### GetTiersExpirationPolicy + +`func (o *BaseLoyaltyProgram) GetTiersExpirationPolicy() string` + +GetTiersExpirationPolicy returns the TiersExpirationPolicy field if non-nil, zero value otherwise. + +### GetTiersExpirationPolicyOk + +`func (o *BaseLoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool)` + +GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTiersExpirationPolicy + +`func (o *BaseLoyaltyProgram) HasTiersExpirationPolicy() bool` + +HasTiersExpirationPolicy returns a boolean if a field has been set. + +### SetTiersExpirationPolicy + +`func (o *BaseLoyaltyProgram) SetTiersExpirationPolicy(v string)` + +SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. + ### GetTiersExpireIn `func (o *BaseLoyaltyProgram) GetTiersExpireIn() string` @@ -267,6 +294,31 @@ HasTiersDowngradePolicy returns a boolean if a field has been set. SetTiersDowngradePolicy gets a reference to the given string and assigns it to the TiersDowngradePolicy field. +### GetProgramJoinPolicy + +`func (o *BaseLoyaltyProgram) GetProgramJoinPolicy() string` + +GetProgramJoinPolicy returns the ProgramJoinPolicy field if non-nil, zero value otherwise. + +### GetProgramJoinPolicyOk + +`func (o *BaseLoyaltyProgram) GetProgramJoinPolicyOk() (string, bool)` + +GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgramJoinPolicy + +`func (o *BaseLoyaltyProgram) HasProgramJoinPolicy() bool` + +HasProgramJoinPolicy returns a boolean if a field has been set. + +### SetProgramJoinPolicy + +`func (o *BaseLoyaltyProgram) SetProgramJoinPolicy(v string)` + +SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Campaign.md b/docs/Campaign.md index 9fae3745..d6a8c407 100644 --- a/docs/Campaign.md +++ b/docs/Campaign.md @@ -21,7 +21,6 @@ Name | Type | Description | Notes **ReferralSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **Limits** | Pointer to [**[]LimitConfig**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | **CampaignGroups** | Pointer to **[]int32** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] -**EvaluationGroupId** | Pointer to **int32** | The ID of the campaign evaluation group the campaign belongs to. | [optional] **Type** | Pointer to **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [default to TYPE_ADVANCED] **LinkedStoreIds** | Pointer to **[]int32** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] **Budgets** | Pointer to [**[]CampaignBudget**](CampaignBudget.md) | A list of all the budgets that are defined by this campaign and their usage. **Note:** Budgets that are not defined do not appear in this list and their usage is not counted until they are defined. | @@ -45,6 +44,7 @@ Name | Type | Description | Notes **CreatedBy** | Pointer to **string** | Name of the user who created this campaign if available. | [optional] **UpdatedBy** | Pointer to **string** | Name of the user who last updated this campaign if available. | [optional] **TemplateId** | Pointer to **int32** | The ID of the Campaign Template this Campaign was created from. | [optional] +**FrontendState** | Pointer to **string** | A campaign state described exactly as in the Campaign Manager. | ## Methods @@ -473,31 +473,6 @@ HasCampaignGroups returns a boolean if a field has been set. SetCampaignGroups gets a reference to the given []int32 and assigns it to the CampaignGroups field. -### GetEvaluationGroupId - -`func (o *Campaign) GetEvaluationGroupId() int32` - -GetEvaluationGroupId returns the EvaluationGroupId field if non-nil, zero value otherwise. - -### GetEvaluationGroupIdOk - -`func (o *Campaign) GetEvaluationGroupIdOk() (int32, bool)` - -GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasEvaluationGroupId - -`func (o *Campaign) HasEvaluationGroupId() bool` - -HasEvaluationGroupId returns a boolean if a field has been set. - -### SetEvaluationGroupId - -`func (o *Campaign) SetEvaluationGroupId(v int32)` - -SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. - ### GetType `func (o *Campaign) GetType() string` @@ -1073,6 +1048,31 @@ HasTemplateId returns a boolean if a field has been set. SetTemplateId gets a reference to the given int32 and assigns it to the TemplateId field. +### GetFrontendState + +`func (o *Campaign) GetFrontendState() string` + +GetFrontendState returns the FrontendState field if non-nil, zero value otherwise. + +### GetFrontendStateOk + +`func (o *Campaign) GetFrontendStateOk() (string, bool)` + +GetFrontendStateOk returns a tuple with the FrontendState field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasFrontendState + +`func (o *Campaign) HasFrontendState() bool` + +HasFrontendState returns a boolean if a field has been set. + +### SetFrontendState + +`func (o *Campaign) SetFrontendState(v string)` + +SetFrontendState gets a reference to the given string and assigns it to the FrontendState field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CampaignCreatedNotification.md b/docs/CampaignCreatedNotification.md index 10c37f72..6c22d1f0 100644 --- a/docs/CampaignCreatedNotification.md +++ b/docs/CampaignCreatedNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaign** | Pointer to [**CampaignStateNotification**](CampaignStateNotification.md) | | +**Campaign** | Pointer to [**Campaign**](Campaign.md) | | **Ruleset** | Pointer to [**Ruleset**](Ruleset.md) | | [optional] **EvaluationPosition** | Pointer to [**CampaignEvaluationPosition**](CampaignEvaluationPosition.md) | | @@ -12,13 +12,13 @@ Name | Type | Description | Notes ### GetCampaign -`func (o *CampaignCreatedNotification) GetCampaign() CampaignStateNotification` +`func (o *CampaignCreatedNotification) GetCampaign() Campaign` GetCampaign returns the Campaign field if non-nil, zero value otherwise. ### GetCampaignOk -`func (o *CampaignCreatedNotification) GetCampaignOk() (CampaignStateNotification, bool)` +`func (o *CampaignCreatedNotification) GetCampaignOk() (Campaign, bool)` GetCampaignOk returns a tuple with the Campaign field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -31,9 +31,9 @@ HasCampaign returns a boolean if a field has been set. ### SetCampaign -`func (o *CampaignCreatedNotification) SetCampaign(v CampaignStateNotification)` +`func (o *CampaignCreatedNotification) SetCampaign(v Campaign)` -SetCampaign gets a reference to the given CampaignStateNotification and assigns it to the Campaign field. +SetCampaign gets a reference to the given Campaign and assigns it to the Campaign field. ### GetRuleset diff --git a/docs/CampaignDeletedNotification.md b/docs/CampaignDeletedNotification.md index e0e66154..d9201e0c 100644 --- a/docs/CampaignDeletedNotification.md +++ b/docs/CampaignDeletedNotification.md @@ -4,20 +4,20 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaign** | Pointer to [**CampaignStateNotification**](CampaignStateNotification.md) | | +**Campaign** | Pointer to [**Campaign**](Campaign.md) | | **DeletedAt** | Pointer to [**time.Time**](time.Time.md) | Time when the campaign was deleted. | ## Methods ### GetCampaign -`func (o *CampaignDeletedNotification) GetCampaign() CampaignStateNotification` +`func (o *CampaignDeletedNotification) GetCampaign() Campaign` GetCampaign returns the Campaign field if non-nil, zero value otherwise. ### GetCampaignOk -`func (o *CampaignDeletedNotification) GetCampaignOk() (CampaignStateNotification, bool)` +`func (o *CampaignDeletedNotification) GetCampaignOk() (Campaign, bool)` GetCampaignOk returns a tuple with the Campaign field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -30,9 +30,9 @@ HasCampaign returns a boolean if a field has been set. ### SetCampaign -`func (o *CampaignDeletedNotification) SetCampaign(v CampaignStateNotification)` +`func (o *CampaignDeletedNotification) SetCampaign(v Campaign)` -SetCampaign gets a reference to the given CampaignStateNotification and assigns it to the Campaign field. +SetCampaign gets a reference to the given Campaign and assigns it to the Campaign field. ### GetDeletedAt diff --git a/docs/CampaignEditedNotification.md b/docs/CampaignEditedNotification.md index e57e8d01..3966c3e4 100644 --- a/docs/CampaignEditedNotification.md +++ b/docs/CampaignEditedNotification.md @@ -4,21 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaign** | Pointer to [**CampaignStateNotification**](CampaignStateNotification.md) | | -**OldCampaign** | Pointer to [**CampaignStateNotification**](CampaignStateNotification.md) | | +**Campaign** | Pointer to [**Campaign**](Campaign.md) | | +**OldCampaign** | Pointer to [**Campaign**](Campaign.md) | | **Ruleset** | Pointer to [**Ruleset**](Ruleset.md) | | [optional] ## Methods ### GetCampaign -`func (o *CampaignEditedNotification) GetCampaign() CampaignStateNotification` +`func (o *CampaignEditedNotification) GetCampaign() Campaign` GetCampaign returns the Campaign field if non-nil, zero value otherwise. ### GetCampaignOk -`func (o *CampaignEditedNotification) GetCampaignOk() (CampaignStateNotification, bool)` +`func (o *CampaignEditedNotification) GetCampaignOk() (Campaign, bool)` GetCampaignOk returns a tuple with the Campaign field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -31,19 +31,19 @@ HasCampaign returns a boolean if a field has been set. ### SetCampaign -`func (o *CampaignEditedNotification) SetCampaign(v CampaignStateNotification)` +`func (o *CampaignEditedNotification) SetCampaign(v Campaign)` -SetCampaign gets a reference to the given CampaignStateNotification and assigns it to the Campaign field. +SetCampaign gets a reference to the given Campaign and assigns it to the Campaign field. ### GetOldCampaign -`func (o *CampaignEditedNotification) GetOldCampaign() CampaignStateNotification` +`func (o *CampaignEditedNotification) GetOldCampaign() Campaign` GetOldCampaign returns the OldCampaign field if non-nil, zero value otherwise. ### GetOldCampaignOk -`func (o *CampaignEditedNotification) GetOldCampaignOk() (CampaignStateNotification, bool)` +`func (o *CampaignEditedNotification) GetOldCampaignOk() (Campaign, bool)` GetOldCampaignOk returns a tuple with the OldCampaign field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -56,9 +56,9 @@ HasOldCampaign returns a boolean if a field has been set. ### SetOldCampaign -`func (o *CampaignEditedNotification) SetOldCampaign(v CampaignStateNotification)` +`func (o *CampaignEditedNotification) SetOldCampaign(v Campaign)` -SetOldCampaign gets a reference to the given CampaignStateNotification and assigns it to the OldCampaign field. +SetOldCampaign gets a reference to the given Campaign and assigns it to the OldCampaign field. ### GetRuleset diff --git a/docs/CampaignGroup.md b/docs/CampaignGroup.md index 898c1a15..e1765381 100644 --- a/docs/CampaignGroup.md +++ b/docs/CampaignGroup.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. | **Modified** | Pointer to [**time.Time**](time.Time.md) | The time this entity was last modified. | **AccountId** | Pointer to **int32** | The ID of the account that owns this entity. | -**Name** | Pointer to **string** | The name of this campaign access group. | +**Name** | Pointer to **string** | The name of the campaign access group. | **Description** | Pointer to **string** | A longer description of the campaign access group. | [optional] **SubscribedApplicationsIds** | Pointer to **[]int32** | A list of IDs of the Applications that this campaign access group is enabled for. | [optional] **CampaignIds** | Pointer to **[]int32** | A list of IDs of the campaigns that are part of the campaign access group. | [optional] diff --git a/docs/CampaignRulesetChangedNotification.md b/docs/CampaignRulesetChangedNotification.md index 1a2e3344..9b3732e9 100644 --- a/docs/CampaignRulesetChangedNotification.md +++ b/docs/CampaignRulesetChangedNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaign** | Pointer to [**CampaignStateNotification**](CampaignStateNotification.md) | | +**Campaign** | Pointer to [**Campaign**](Campaign.md) | | **OldRuleset** | Pointer to [**Ruleset**](Ruleset.md) | | [optional] **Ruleset** | Pointer to [**Ruleset**](Ruleset.md) | | [optional] @@ -12,13 +12,13 @@ Name | Type | Description | Notes ### GetCampaign -`func (o *CampaignRulesetChangedNotification) GetCampaign() CampaignStateNotification` +`func (o *CampaignRulesetChangedNotification) GetCampaign() Campaign` GetCampaign returns the Campaign field if non-nil, zero value otherwise. ### GetCampaignOk -`func (o *CampaignRulesetChangedNotification) GetCampaignOk() (CampaignStateNotification, bool)` +`func (o *CampaignRulesetChangedNotification) GetCampaignOk() (Campaign, bool)` GetCampaignOk returns a tuple with the Campaign field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -31,9 +31,9 @@ HasCampaign returns a boolean if a field has been set. ### SetCampaign -`func (o *CampaignRulesetChangedNotification) SetCampaign(v CampaignStateNotification)` +`func (o *CampaignRulesetChangedNotification) SetCampaign(v Campaign)` -SetCampaign gets a reference to the given CampaignStateNotification and assigns it to the Campaign field. +SetCampaign gets a reference to the given Campaign and assigns it to the Campaign field. ### GetOldRuleset diff --git a/docs/CampaignStateChangedNotification.md b/docs/CampaignStateChangedNotification.md index b9e34ff5..269419a7 100644 --- a/docs/CampaignStateChangedNotification.md +++ b/docs/CampaignStateChangedNotification.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Campaign** | Pointer to [**CampaignForNotification**](CampaignForNotification.md) | | +**Campaign** | Pointer to [**Campaign**](Campaign.md) | | **OldState** | Pointer to **string** | The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | **NewState** | Pointer to **string** | The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] | **Ruleset** | Pointer to [**Ruleset**](Ruleset.md) | | [optional] @@ -13,13 +13,13 @@ Name | Type | Description | Notes ### GetCampaign -`func (o *CampaignStateChangedNotification) GetCampaign() CampaignForNotification` +`func (o *CampaignStateChangedNotification) GetCampaign() Campaign` GetCampaign returns the Campaign field if non-nil, zero value otherwise. ### GetCampaignOk -`func (o *CampaignStateChangedNotification) GetCampaignOk() (CampaignForNotification, bool)` +`func (o *CampaignStateChangedNotification) GetCampaignOk() (Campaign, bool)` GetCampaignOk returns a tuple with the Campaign field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -32,9 +32,9 @@ HasCampaign returns a boolean if a field has been set. ### SetCampaign -`func (o *CampaignStateChangedNotification) SetCampaign(v CampaignForNotification)` +`func (o *CampaignStateChangedNotification) SetCampaign(v Campaign)` -SetCampaign gets a reference to the given CampaignForNotification and assigns it to the Campaign field. +SetCampaign gets a reference to the given Campaign and assigns it to the Campaign field. ### GetOldState diff --git a/docs/CardExpiringPointsNotificationPolicy.md b/docs/CardExpiringPointsNotificationPolicy.md new file mode 100644 index 00000000..f38f5f0b --- /dev/null +++ b/docs/CardExpiringPointsNotificationPolicy.md @@ -0,0 +1,91 @@ +# CardExpiringPointsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Notification name. | +**Triggers** | Pointer to [**[]CardExpiringPointsNotificationTrigger**](CardExpiringPointsNotificationTrigger.md) | | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] + +## Methods + +### GetName + +`func (o *CardExpiringPointsNotificationPolicy) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CardExpiringPointsNotificationPolicy) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *CardExpiringPointsNotificationPolicy) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *CardExpiringPointsNotificationPolicy) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetTriggers + +`func (o *CardExpiringPointsNotificationPolicy) GetTriggers() []CardExpiringPointsNotificationTrigger` + +GetTriggers returns the Triggers field if non-nil, zero value otherwise. + +### GetTriggersOk + +`func (o *CardExpiringPointsNotificationPolicy) GetTriggersOk() ([]CardExpiringPointsNotificationTrigger, bool)` + +GetTriggersOk returns a tuple with the Triggers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTriggers + +`func (o *CardExpiringPointsNotificationPolicy) HasTriggers() bool` + +HasTriggers returns a boolean if a field has been set. + +### SetTriggers + +`func (o *CardExpiringPointsNotificationPolicy) SetTriggers(v []CardExpiringPointsNotificationTrigger)` + +SetTriggers gets a reference to the given []CardExpiringPointsNotificationTrigger and assigns it to the Triggers field. + +### GetBatchingEnabled + +`func (o *CardExpiringPointsNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *CardExpiringPointsNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *CardExpiringPointsNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *CardExpiringPointsNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CardExpiringPointsNotificationTrigger.md b/docs/CardExpiringPointsNotificationTrigger.md new file mode 100644 index 00000000..f10a2463 --- /dev/null +++ b/docs/CardExpiringPointsNotificationTrigger.md @@ -0,0 +1,65 @@ +# CardExpiringPointsNotificationTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | Pointer to **int32** | The amount of period. | +**Period** | Pointer to **string** | Notification period indicated by a letter; \"w\" means week, \"d\" means day. | + +## Methods + +### GetAmount + +`func (o *CardExpiringPointsNotificationTrigger) GetAmount() int32` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *CardExpiringPointsNotificationTrigger) GetAmountOk() (int32, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAmount + +`func (o *CardExpiringPointsNotificationTrigger) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### SetAmount + +`func (o *CardExpiringPointsNotificationTrigger) SetAmount(v int32)` + +SetAmount gets a reference to the given int32 and assigns it to the Amount field. + +### GetPeriod + +`func (o *CardExpiringPointsNotificationTrigger) GetPeriod() string` + +GetPeriod returns the Period field if non-nil, zero value otherwise. + +### GetPeriodOk + +`func (o *CardExpiringPointsNotificationTrigger) GetPeriodOk() (string, bool)` + +GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriod + +`func (o *CardExpiringPointsNotificationTrigger) HasPeriod() bool` + +HasPeriod returns a boolean if a field has been set. + +### SetPeriod + +`func (o *CardExpiringPointsNotificationTrigger) SetPeriod(v string)` + +SetPeriod gets a reference to the given string and assigns it to the Period field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CartItem.md b/docs/CartItem.md index 989ac516..e10c3647 100644 --- a/docs/CartItem.md +++ b/docs/CartItem.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **RemainingQuantity** | Pointer to **int32** | Remaining quantity of the item, calculated internally based on returns of this item. | [optional] **Price** | Pointer to **float32** | 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** | Pointer to **string** | Type, group or model of the item. | [optional] +**Product** | Pointer to [**Product**](Product.md) | | [optional] **Weight** | Pointer to **float32** | Weight of item in grams. | [optional] **Height** | Pointer to **float32** | Height of item in mm. | [optional] **Width** | Pointer to **float32** | Width of item in mm. | [optional] @@ -197,6 +198,31 @@ HasCategory returns a boolean if a field has been set. SetCategory gets a reference to the given string and assigns it to the Category field. +### GetProduct + +`func (o *CartItem) GetProduct() Product` + +GetProduct returns the Product field if non-nil, zero value otherwise. + +### GetProductOk + +`func (o *CartItem) GetProductOk() (Product, bool)` + +GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProduct + +`func (o *CartItem) HasProduct() bool` + +HasProduct returns a boolean if a field has been set. + +### SetProduct + +`func (o *CartItem) SetProduct(v Product)` + +SetProduct gets a reference to the given Product and assigns it to the Product field. + ### GetWeight `func (o *CartItem) GetWeight() float32` diff --git a/docs/CatalogItem.md b/docs/CatalogItem.md index a2e1c683..1828050b 100644 --- a/docs/CatalogItem.md +++ b/docs/CatalogItem.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **Catalogid** | Pointer to **int32** | The ID of the catalog the item belongs to. | **Version** | Pointer to **int32** | The version of the catalog item. | **Attributes** | Pointer to [**[]ItemAttribute**](ItemAttribute.md) | | [optional] +**Product** | Pointer to [**Product**](Product.md) | | [optional] ## Methods @@ -189,6 +190,31 @@ HasAttributes returns a boolean if a field has been set. SetAttributes gets a reference to the given []ItemAttribute and assigns it to the Attributes field. +### GetProduct + +`func (o *CatalogItem) GetProduct() Product` + +GetProduct returns the Product field if non-nil, zero value otherwise. + +### GetProductOk + +`func (o *CatalogItem) GetProductOk() (Product, bool)` + +GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProduct + +`func (o *CatalogItem) HasProduct() bool` + +HasProduct returns a boolean if a field has been set. + +### SetProduct + +`func (o *CatalogItem) SetProduct(v Product)` + +SetProduct gets a reference to the given Product and assigns it to the Product field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ChangeLoyaltyTierLevelEffectProps.md b/docs/ChangeLoyaltyTierLevelEffectProps.md new file mode 100644 index 00000000..53531d32 --- /dev/null +++ b/docs/ChangeLoyaltyTierLevelEffectProps.md @@ -0,0 +1,169 @@ +# ChangeLoyaltyTierLevelEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RuleTitle** | Pointer to **string** | The title of the rule that triggered the tier upgrade. | +**ProgramId** | Pointer to **int32** | The ID of the loyalty program where these points were added. | +**SubLedgerId** | Pointer to **string** | The ID of the subledger within the loyalty program where these points were added. | +**PreviousTierName** | Pointer to **string** | The name of the tier from which the user was upgraded. | [optional] +**NewTierName** | Pointer to **string** | The name of the tier to which the user has been upgraded. | +**ExpiryDate** | Pointer to [**time.Time**](time.Time.md) | The expiration date of the new tier. | [optional] + +## Methods + +### GetRuleTitle + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetRuleTitle() string` + +GetRuleTitle returns the RuleTitle field if non-nil, zero value otherwise. + +### GetRuleTitleOk + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetRuleTitleOk() (string, bool)` + +GetRuleTitleOk returns a tuple with the RuleTitle field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasRuleTitle + +`func (o *ChangeLoyaltyTierLevelEffectProps) HasRuleTitle() bool` + +HasRuleTitle returns a boolean if a field has been set. + +### SetRuleTitle + +`func (o *ChangeLoyaltyTierLevelEffectProps) SetRuleTitle(v string)` + +SetRuleTitle gets a reference to the given string and assigns it to the RuleTitle field. + +### GetProgramId + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetProgramId() int32` + +GetProgramId returns the ProgramId field if non-nil, zero value otherwise. + +### GetProgramIdOk + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetProgramIdOk() (int32, bool)` + +GetProgramIdOk returns a tuple with the ProgramId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgramId + +`func (o *ChangeLoyaltyTierLevelEffectProps) HasProgramId() bool` + +HasProgramId returns a boolean if a field has been set. + +### SetProgramId + +`func (o *ChangeLoyaltyTierLevelEffectProps) SetProgramId(v int32)` + +SetProgramId gets a reference to the given int32 and assigns it to the ProgramId field. + +### GetSubLedgerId + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetSubLedgerId() string` + +GetSubLedgerId returns the SubLedgerId field if non-nil, zero value otherwise. + +### GetSubLedgerIdOk + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetSubLedgerIdOk() (string, bool)` + +GetSubLedgerIdOk returns a tuple with the SubLedgerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSubLedgerId + +`func (o *ChangeLoyaltyTierLevelEffectProps) HasSubLedgerId() bool` + +HasSubLedgerId returns a boolean if a field has been set. + +### SetSubLedgerId + +`func (o *ChangeLoyaltyTierLevelEffectProps) SetSubLedgerId(v string)` + +SetSubLedgerId gets a reference to the given string and assigns it to the SubLedgerId field. + +### GetPreviousTierName + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetPreviousTierName() string` + +GetPreviousTierName returns the PreviousTierName field if non-nil, zero value otherwise. + +### GetPreviousTierNameOk + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetPreviousTierNameOk() (string, bool)` + +GetPreviousTierNameOk returns a tuple with the PreviousTierName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPreviousTierName + +`func (o *ChangeLoyaltyTierLevelEffectProps) HasPreviousTierName() bool` + +HasPreviousTierName returns a boolean if a field has been set. + +### SetPreviousTierName + +`func (o *ChangeLoyaltyTierLevelEffectProps) SetPreviousTierName(v string)` + +SetPreviousTierName gets a reference to the given string and assigns it to the PreviousTierName field. + +### GetNewTierName + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetNewTierName() string` + +GetNewTierName returns the NewTierName field if non-nil, zero value otherwise. + +### GetNewTierNameOk + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetNewTierNameOk() (string, bool)` + +GetNewTierNameOk returns a tuple with the NewTierName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNewTierName + +`func (o *ChangeLoyaltyTierLevelEffectProps) HasNewTierName() bool` + +HasNewTierName returns a boolean if a field has been set. + +### SetNewTierName + +`func (o *ChangeLoyaltyTierLevelEffectProps) SetNewTierName(v string)` + +SetNewTierName gets a reference to the given string and assigns it to the NewTierName field. + +### GetExpiryDate + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetExpiryDate() time.Time` + +GetExpiryDate returns the ExpiryDate field if non-nil, zero value otherwise. + +### GetExpiryDateOk + +`func (o *ChangeLoyaltyTierLevelEffectProps) GetExpiryDateOk() (time.Time, bool)` + +GetExpiryDateOk returns a tuple with the ExpiryDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasExpiryDate + +`func (o *ChangeLoyaltyTierLevelEffectProps) HasExpiryDate() bool` + +HasExpiryDate returns a boolean if a field has been set. + +### SetExpiryDate + +`func (o *ChangeLoyaltyTierLevelEffectProps) SetExpiryDate(v time.Time)` + +SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Coupon.md b/docs/Coupon.md index df79418e..6d692be6 100644 --- a/docs/Coupon.md +++ b/docs/Coupon.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **ImportId** | Pointer to **int32** | The ID of the Import which created this coupon. | [optional] **Reservation** | Pointer to **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** | Pointer to **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] ## Methods diff --git a/docs/CouponCreationJob.md b/docs/CouponCreationJob.md index 6ca9055a..6a5e8dae 100644 --- a/docs/CouponCreationJob.md +++ b/docs/CouponCreationJob.md @@ -18,7 +18,7 @@ Name | Type | Description | Notes **CouponSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary properties associated with coupons. | **BatchId** | Pointer to **string** | The batch ID coupons created by this job will bear. | -**Status** | Pointer to **string** | The current status of this request. Possible values: - `pending` - `completed` - `failed` - `coupon pattern full` | +**Status** | Pointer to **string** | The current status of this request. Possible values: - `pending verification` - `pending` - `completed` - `failed` - `coupon pattern full` | **CreatedAmount** | Pointer to **int32** | The number of coupon codes that were already created for this request. | **FailCount** | Pointer to **int32** | The number of times this job failed. | **Errors** | Pointer to **[]string** | An array of individual problems encountered during the request. | diff --git a/docs/CouponsNotificationPolicy.md b/docs/CouponsNotificationPolicy.md index 1c311828..30355ef3 100644 --- a/docs/CouponsNotificationPolicy.md +++ b/docs/CouponsNotificationPolicy.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | Notification name. | **Scopes** | Pointer to **[]string** | | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] ## Methods @@ -59,6 +60,31 @@ HasScopes returns a boolean if a field has been set. SetScopes gets a reference to the given []string and assigns it to the Scopes field. +### GetBatchingEnabled + +`func (o *CouponsNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *CouponsNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *CouponsNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *CouponsNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CreateAchievement.md b/docs/CreateAchievement.md new file mode 100644 index 00000000..629059df --- /dev/null +++ b/docs/CreateAchievement.md @@ -0,0 +1,169 @@ +# CreateAchievement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. | +**Title** | Pointer to **string** | The display name for the achievement in the Campaign Manager. | +**Description** | Pointer to **string** | A description of the achievement. | +**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. | +**Period** | Pointer to **string** | The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. | +**PeriodEndOverride** | Pointer to [**TimePoint**](TimePoint.md) | | [optional] + +## Methods + +### GetName + +`func (o *CreateAchievement) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *CreateAchievement) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *CreateAchievement) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *CreateAchievement) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetTitle + +`func (o *CreateAchievement) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *CreateAchievement) GetTitleOk() (string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTitle + +`func (o *CreateAchievement) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### SetTitle + +`func (o *CreateAchievement) SetTitle(v string)` + +SetTitle gets a reference to the given string and assigns it to the Title field. + +### GetDescription + +`func (o *CreateAchievement) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *CreateAchievement) GetDescriptionOk() (string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDescription + +`func (o *CreateAchievement) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescription + +`func (o *CreateAchievement) SetDescription(v string)` + +SetDescription gets a reference to the given string and assigns it to the Description field. + +### GetTarget + +`func (o *CreateAchievement) GetTarget() float32` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *CreateAchievement) GetTargetOk() (float32, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTarget + +`func (o *CreateAchievement) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### SetTarget + +`func (o *CreateAchievement) SetTarget(v float32)` + +SetTarget gets a reference to the given float32 and assigns it to the Target field. + +### GetPeriod + +`func (o *CreateAchievement) GetPeriod() string` + +GetPeriod returns the Period field if non-nil, zero value otherwise. + +### GetPeriodOk + +`func (o *CreateAchievement) GetPeriodOk() (string, bool)` + +GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriod + +`func (o *CreateAchievement) HasPeriod() bool` + +HasPeriod returns a boolean if a field has been set. + +### SetPeriod + +`func (o *CreateAchievement) SetPeriod(v string)` + +SetPeriod gets a reference to the given string and assigns it to the Period field. + +### GetPeriodEndOverride + +`func (o *CreateAchievement) GetPeriodEndOverride() TimePoint` + +GetPeriodEndOverride returns the PeriodEndOverride field if non-nil, zero value otherwise. + +### GetPeriodEndOverrideOk + +`func (o *CreateAchievement) GetPeriodEndOverrideOk() (TimePoint, bool)` + +GetPeriodEndOverrideOk returns a tuple with the PeriodEndOverride field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriodEndOverride + +`func (o *CreateAchievement) HasPeriodEndOverride() bool` + +HasPeriodEndOverride returns a boolean if a field has been set. + +### SetPeriodEndOverride + +`func (o *CreateAchievement) SetPeriodEndOverride(v TimePoint)` + +SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateApplicationApiKey.md b/docs/CreateApplicationApiKey.md index e1cdc0cd..9825b50c 100644 --- a/docs/CreateApplicationApiKey.md +++ b/docs/CreateApplicationApiKey.md @@ -4,9 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | Pointer to **string** | Title for API Key. | -**Expires** | Pointer to [**time.Time**](time.Time.md) | The date the API key expired. | +**Title** | Pointer to **string** | Title of the API key. | +**Expires** | Pointer to [**time.Time**](time.Time.md) | The date the API key expires. | **Platform** | Pointer to **string** | The third-party platform the API key is valid for. Use `none` for a generic API key to be used from your own integration layer. | [optional] +**Type** | Pointer to **string** | The API key type. Can be empty or `staging`. Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. | [optional] +**TimeOffset** | Pointer to **int32** | A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. | [optional] ## Methods @@ -85,6 +87,56 @@ HasPlatform returns a boolean if a field has been set. SetPlatform gets a reference to the given string and assigns it to the Platform field. +### GetType + +`func (o *CreateApplicationApiKey) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *CreateApplicationApiKey) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *CreateApplicationApiKey) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *CreateApplicationApiKey) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetTimeOffset + +`func (o *CreateApplicationApiKey) GetTimeOffset() int32` + +GetTimeOffset returns the TimeOffset field if non-nil, zero value otherwise. + +### GetTimeOffsetOk + +`func (o *CreateApplicationApiKey) GetTimeOffsetOk() (int32, bool)` + +GetTimeOffsetOk returns a tuple with the TimeOffset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTimeOffset + +`func (o *CreateApplicationApiKey) HasTimeOffset() bool` + +HasTimeOffset returns a boolean if a field has been set. + +### SetTimeOffset + +`func (o *CreateApplicationApiKey) SetTimeOffset(v int32)` + +SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerInventory.md b/docs/CustomerInventory.md index 32b77b61..bbf073cc 100644 --- a/docs/CustomerInventory.md +++ b/docs/CustomerInventory.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **Referrals** | Pointer to [**[]InventoryReferral**](InventoryReferral.md) | | [optional] **Coupons** | Pointer to [**[]InventoryCoupon**](InventoryCoupon.md) | The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. | [optional] **Giveaways** | Pointer to [**[]Giveaway**](Giveaway.md) | | [optional] +**Achievements** | Pointer to [**[]AchievementProgress**](AchievementProgress.md) | | [optional] ## Methods @@ -137,6 +138,31 @@ HasGiveaways returns a boolean if a field has been set. SetGiveaways gets a reference to the given []Giveaway and assigns it to the Giveaways field. +### GetAchievements + +`func (o *CustomerInventory) GetAchievements() []AchievementProgress` + +GetAchievements returns the Achievements field if non-nil, zero value otherwise. + +### GetAchievementsOk + +`func (o *CustomerInventory) GetAchievementsOk() ([]AchievementProgress, bool)` + +GetAchievementsOk returns a tuple with the Achievements field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAchievements + +`func (o *CustomerInventory) HasAchievements() bool` + +HasAchievements returns a boolean if a field has been set. + +### SetAchievements + +`func (o *CustomerInventory) SetAchievements(v []AchievementProgress)` + +SetAchievements gets a reference to the given []AchievementProgress and assigns it to the Achievements field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerProfile.md b/docs/CustomerProfile.md index 9114c7a3..3959fbc1 100644 --- a/docs/CustomerProfile.md +++ b/docs/CustomerProfile.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **LoyaltyMemberships** | Pointer to [**[]LoyaltyMembership**](LoyaltyMembership.md) | **DEPRECATED** A list of loyalty programs joined by the customer. | [optional] **AudienceMemberships** | Pointer to [**[]AudienceMembership**](AudienceMembership.md) | The audiences the customer belongs to. | [optional] **LastActivity** | Pointer to [**time.Time**](time.Time.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** | Pointer to **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] +**Sandbox** | Pointer to **bool** | An indicator of 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] ## Methods diff --git a/docs/CustomerProfileAudienceRequestItem.md b/docs/CustomerProfileAudienceRequestItem.md index 70bfdcf8..32b0b3bb 100644 --- a/docs/CustomerProfileAudienceRequestItem.md +++ b/docs/CustomerProfileAudienceRequestItem.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Action** | Pointer to **string** | Defines the action to perform: - `add`: Adds the customer profile to the audience. - `delete`: Removes the customer profile from the audience. | +**Action** | Pointer to **string** | Defines the action to perform: - `add`: Adds the customer profile to the audience. If the customer profile does not exist, it will be created. - `delete`: Removes the customer profile from the audience. | **ProfileIntegrationId** | Pointer to **string** | The ID of this customer profile in the third-party integration. | **AudienceId** | Pointer to **int32** | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | diff --git a/docs/CustomerSessionV2.md b/docs/CustomerSessionV2.md index 76bcccec..0fc81292 100644 --- a/docs/CustomerSessionV2.md +++ b/docs/CustomerSessionV2.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **EvaluableCampaignIds** | Pointer to **[]int32** | 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** | Pointer to **[]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** | Pointer to **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** | Pointer to **[]string** | Any loyalty cards used. | [optional] +**LoyaltyCards** | Pointer to **[]string** | Identifier of a loyalty card. | [optional] **State** | Pointer to **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [default to STATE_OPEN] **CartItems** | Pointer to [**[]CartItem**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | **AdditionalCosts** | Pointer to [**map[string]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] diff --git a/docs/DeactivateUserRequest.md b/docs/DeactivateUserRequest.md new file mode 100644 index 00000000..24143cb6 --- /dev/null +++ b/docs/DeactivateUserRequest.md @@ -0,0 +1,39 @@ +# DeactivateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | Pointer to **string** | The email address associated with the user profile. | + +## Methods + +### GetEmail + +`func (o *DeactivateUserRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *DeactivateUserRequest) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *DeactivateUserRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *DeactivateUserRequest) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteUserRequest.md b/docs/DeleteUserRequest.md new file mode 100644 index 00000000..06ae0cca --- /dev/null +++ b/docs/DeleteUserRequest.md @@ -0,0 +1,39 @@ +# DeleteUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | Pointer to **string** | The email address associated with the user profile. | + +## Methods + +### GetEmail + +`func (o *DeleteUserRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *DeleteUserRequest) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *DeleteUserRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *DeleteUserRequest) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmailEntity.md b/docs/EmailEntity.md index bc8ab8d6..6d545463 100644 --- a/docs/EmailEntity.md +++ b/docs/EmailEntity.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | The email address associated with your account. | +**Email** | Pointer to **string** | The email address associated with the user profile. | ## Methods diff --git a/docs/Environment.md b/docs/Environment.md index ba48ebb4..bb6a5f40 100644 --- a/docs/Environment.md +++ b/docs/Environment.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **Variables** | Pointer to **string** | A stringified version of the environment's Talang variables scope. | **GiveawaysPools** | Pointer to [**[]GiveawaysPool**](GiveawaysPool.md) | The giveaways pools that the application is subscribed to. | [optional] **LoyaltyPrograms** | Pointer to [**[]LoyaltyProgram**](LoyaltyProgram.md) | The loyalty programs that the application is subscribed to. | [optional] +**Achievements** | Pointer to [**[]Achievement**](Achievement.md) | The achievements, linked to the campaigns, belonging to the application. | [optional] **Attributes** | Pointer to [**[]Attribute**](Attribute.md) | The attributes that the application is subscribed to. | [optional] **AdditionalCosts** | Pointer to [**[]AccountAdditionalCost**](AccountAdditionalCost.md) | The additional costs that the application is subscribed to. | [optional] **Audiences** | Pointer to [**[]Audience**](Audience.md) | The audiences contained in the account which the application belongs to. | [optional] @@ -245,6 +246,31 @@ HasLoyaltyPrograms returns a boolean if a field has been set. SetLoyaltyPrograms gets a reference to the given []LoyaltyProgram and assigns it to the LoyaltyPrograms field. +### GetAchievements + +`func (o *Environment) GetAchievements() []Achievement` + +GetAchievements returns the Achievements field if non-nil, zero value otherwise. + +### GetAchievementsOk + +`func (o *Environment) GetAchievementsOk() ([]Achievement, bool)` + +GetAchievementsOk returns a tuple with the Achievements field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAchievements + +`func (o *Environment) HasAchievements() bool` + +HasAchievements returns a boolean if a field has been set. + +### SetAchievements + +`func (o *Environment) SetAchievements(v []Achievement)` + +SetAchievements gets a reference to the given []Achievement and assigns it to the Achievements field. + ### GetAttributes `func (o *Environment) GetAttributes() []Attribute` diff --git a/docs/ExpiringCouponsNotificationPolicy.md b/docs/ExpiringCouponsNotificationPolicy.md new file mode 100644 index 00000000..17d970f8 --- /dev/null +++ b/docs/ExpiringCouponsNotificationPolicy.md @@ -0,0 +1,91 @@ +# ExpiringCouponsNotificationPolicy + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Notification name. | +**Triggers** | Pointer to [**[]ExpiringCouponsNotificationTrigger**](ExpiringCouponsNotificationTrigger.md) | | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] + +## Methods + +### GetName + +`func (o *ExpiringCouponsNotificationPolicy) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ExpiringCouponsNotificationPolicy) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *ExpiringCouponsNotificationPolicy) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *ExpiringCouponsNotificationPolicy) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetTriggers + +`func (o *ExpiringCouponsNotificationPolicy) GetTriggers() []ExpiringCouponsNotificationTrigger` + +GetTriggers returns the Triggers field if non-nil, zero value otherwise. + +### GetTriggersOk + +`func (o *ExpiringCouponsNotificationPolicy) GetTriggersOk() ([]ExpiringCouponsNotificationTrigger, bool)` + +GetTriggersOk returns a tuple with the Triggers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTriggers + +`func (o *ExpiringCouponsNotificationPolicy) HasTriggers() bool` + +HasTriggers returns a boolean if a field has been set. + +### SetTriggers + +`func (o *ExpiringCouponsNotificationPolicy) SetTriggers(v []ExpiringCouponsNotificationTrigger)` + +SetTriggers gets a reference to the given []ExpiringCouponsNotificationTrigger and assigns it to the Triggers field. + +### GetBatchingEnabled + +`func (o *ExpiringCouponsNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *ExpiringCouponsNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *ExpiringCouponsNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *ExpiringCouponsNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExpiringCouponsNotificationTrigger.md b/docs/ExpiringCouponsNotificationTrigger.md new file mode 100644 index 00000000..9c2b597c --- /dev/null +++ b/docs/ExpiringCouponsNotificationTrigger.md @@ -0,0 +1,65 @@ +# ExpiringCouponsNotificationTrigger + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Amount** | Pointer to **int32** | The amount of period. | +**Period** | Pointer to **string** | Notification period indicated by a letter; \"w\" means week, \"d\" means day. | + +## Methods + +### GetAmount + +`func (o *ExpiringCouponsNotificationTrigger) GetAmount() int32` + +GetAmount returns the Amount field if non-nil, zero value otherwise. + +### GetAmountOk + +`func (o *ExpiringCouponsNotificationTrigger) GetAmountOk() (int32, bool)` + +GetAmountOk returns a tuple with the Amount field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAmount + +`func (o *ExpiringCouponsNotificationTrigger) HasAmount() bool` + +HasAmount returns a boolean if a field has been set. + +### SetAmount + +`func (o *ExpiringCouponsNotificationTrigger) SetAmount(v int32)` + +SetAmount gets a reference to the given int32 and assigns it to the Amount field. + +### GetPeriod + +`func (o *ExpiringCouponsNotificationTrigger) GetPeriod() string` + +GetPeriod returns the Period field if non-nil, zero value otherwise. + +### GetPeriodOk + +`func (o *ExpiringCouponsNotificationTrigger) GetPeriodOk() (string, bool)` + +GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriod + +`func (o *ExpiringCouponsNotificationTrigger) HasPeriod() bool` + +HasPeriod returns a boolean if a field has been set. + +### SetPeriod + +`func (o *ExpiringCouponsNotificationTrigger) SetPeriod(v string)` + +SetPeriod gets a reference to the given string and assigns it to the Period field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ExpiringPointsNotificationPolicy.md b/docs/ExpiringPointsNotificationPolicy.md index cb1440df..90bf9e7a 100644 --- a/docs/ExpiringPointsNotificationPolicy.md +++ b/docs/ExpiringPointsNotificationPolicy.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | Notification name. | **Triggers** | Pointer to [**[]ExpiringPointsNotificationTrigger**](ExpiringPointsNotificationTrigger.md) | | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] ## Methods @@ -59,6 +60,31 @@ HasTriggers returns a boolean if a field has been set. SetTriggers gets a reference to the given []ExpiringPointsNotificationTrigger and assigns it to the Triggers field. +### GetBatchingEnabled + +`func (o *ExpiringPointsNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *ExpiringPointsNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *ExpiringPointsNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *ExpiringPointsNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/FuncArgDef.md b/docs/FuncArgDef.md index 2bb99f52..d47b46c8 100644 --- a/docs/FuncArgDef.md +++ b/docs/FuncArgDef.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | Pointer to **string** | The type of value this argument expects. | -**Description** | Pointer to **string** | A campaigner-friendly description of the argument, this will also be shown in the rule editor. | +**Description** | Pointer to **string** | A campaigner-friendly description of the argument, this will also be shown in the rule editor. | [optional] ## Methods diff --git a/docs/GetIntegrationCouponRequest.md b/docs/GetIntegrationCouponRequest.md new file mode 100644 index 00000000..a9c87867 --- /dev/null +++ b/docs/GetIntegrationCouponRequest.md @@ -0,0 +1,65 @@ +# GetIntegrationCouponRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CampaignIds** | Pointer to **[]int32** | A list of IDs of the campaigns to get coupons from. | +**Limit** | Pointer to **int32** | The maximum number of coupons included in the response. | + +## Methods + +### GetCampaignIds + +`func (o *GetIntegrationCouponRequest) GetCampaignIds() []int32` + +GetCampaignIds returns the CampaignIds field if non-nil, zero value otherwise. + +### GetCampaignIdsOk + +`func (o *GetIntegrationCouponRequest) GetCampaignIdsOk() ([]int32, bool)` + +GetCampaignIdsOk returns a tuple with the CampaignIds field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignIds + +`func (o *GetIntegrationCouponRequest) HasCampaignIds() bool` + +HasCampaignIds returns a boolean if a field has been set. + +### SetCampaignIds + +`func (o *GetIntegrationCouponRequest) SetCampaignIds(v []int32)` + +SetCampaignIds gets a reference to the given []int32 and assigns it to the CampaignIds field. + +### GetLimit + +`func (o *GetIntegrationCouponRequest) GetLimit() int32` + +GetLimit returns the Limit field if non-nil, zero value otherwise. + +### GetLimitOk + +`func (o *GetIntegrationCouponRequest) GetLimitOk() (int32, bool)` + +GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasLimit + +`func (o *GetIntegrationCouponRequest) HasLimit() bool` + +HasLimit returns a boolean if a field has been set. + +### SetLimit + +`func (o *GetIntegrationCouponRequest) SetLimit(v int32)` + +SetLimit gets a reference to the given int32 and assigns it to the Limit field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IncreaseAchievementProgressEffectProps.md b/docs/IncreaseAchievementProgressEffectProps.md new file mode 100644 index 00000000..953287e9 --- /dev/null +++ b/docs/IncreaseAchievementProgressEffectProps.md @@ -0,0 +1,195 @@ +# IncreaseAchievementProgressEffectProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AchievementId** | Pointer to **int32** | The internal ID of the achievement. | +**AchievementName** | Pointer to **string** | The name of the achievement. | +**ProgressTrackerId** | Pointer to **int32** | The internal ID of the achievement progress tracker. | [optional] +**Delta** | Pointer to **float32** | The value by which the customer's current progress in the achievement is increased. | +**Value** | Pointer to **float32** | The current progress of the customer in the achievement. | +**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. | +**IsJustCompleted** | Pointer to **bool** | Indicates if the customer has completed the achievement in the current session. | + +## Methods + +### GetAchievementId + +`func (o *IncreaseAchievementProgressEffectProps) GetAchievementId() int32` + +GetAchievementId returns the AchievementId field if non-nil, zero value otherwise. + +### GetAchievementIdOk + +`func (o *IncreaseAchievementProgressEffectProps) GetAchievementIdOk() (int32, bool)` + +GetAchievementIdOk returns a tuple with the AchievementId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAchievementId + +`func (o *IncreaseAchievementProgressEffectProps) HasAchievementId() bool` + +HasAchievementId returns a boolean if a field has been set. + +### SetAchievementId + +`func (o *IncreaseAchievementProgressEffectProps) SetAchievementId(v int32)` + +SetAchievementId gets a reference to the given int32 and assigns it to the AchievementId field. + +### GetAchievementName + +`func (o *IncreaseAchievementProgressEffectProps) GetAchievementName() string` + +GetAchievementName returns the AchievementName field if non-nil, zero value otherwise. + +### GetAchievementNameOk + +`func (o *IncreaseAchievementProgressEffectProps) GetAchievementNameOk() (string, bool)` + +GetAchievementNameOk returns a tuple with the AchievementName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAchievementName + +`func (o *IncreaseAchievementProgressEffectProps) HasAchievementName() bool` + +HasAchievementName returns a boolean if a field has been set. + +### SetAchievementName + +`func (o *IncreaseAchievementProgressEffectProps) SetAchievementName(v string)` + +SetAchievementName gets a reference to the given string and assigns it to the AchievementName field. + +### GetProgressTrackerId + +`func (o *IncreaseAchievementProgressEffectProps) GetProgressTrackerId() int32` + +GetProgressTrackerId returns the ProgressTrackerId field if non-nil, zero value otherwise. + +### GetProgressTrackerIdOk + +`func (o *IncreaseAchievementProgressEffectProps) GetProgressTrackerIdOk() (int32, bool)` + +GetProgressTrackerIdOk returns a tuple with the ProgressTrackerId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgressTrackerId + +`func (o *IncreaseAchievementProgressEffectProps) HasProgressTrackerId() bool` + +HasProgressTrackerId returns a boolean if a field has been set. + +### SetProgressTrackerId + +`func (o *IncreaseAchievementProgressEffectProps) SetProgressTrackerId(v int32)` + +SetProgressTrackerId gets a reference to the given int32 and assigns it to the ProgressTrackerId field. + +### GetDelta + +`func (o *IncreaseAchievementProgressEffectProps) GetDelta() float32` + +GetDelta returns the Delta field if non-nil, zero value otherwise. + +### GetDeltaOk + +`func (o *IncreaseAchievementProgressEffectProps) GetDeltaOk() (float32, bool)` + +GetDeltaOk returns a tuple with the Delta field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDelta + +`func (o *IncreaseAchievementProgressEffectProps) HasDelta() bool` + +HasDelta returns a boolean if a field has been set. + +### SetDelta + +`func (o *IncreaseAchievementProgressEffectProps) SetDelta(v float32)` + +SetDelta gets a reference to the given float32 and assigns it to the Delta field. + +### GetValue + +`func (o *IncreaseAchievementProgressEffectProps) GetValue() float32` + +GetValue returns the Value field if non-nil, zero value otherwise. + +### GetValueOk + +`func (o *IncreaseAchievementProgressEffectProps) GetValueOk() (float32, bool)` + +GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasValue + +`func (o *IncreaseAchievementProgressEffectProps) HasValue() bool` + +HasValue returns a boolean if a field has been set. + +### SetValue + +`func (o *IncreaseAchievementProgressEffectProps) SetValue(v float32)` + +SetValue gets a reference to the given float32 and assigns it to the Value field. + +### GetTarget + +`func (o *IncreaseAchievementProgressEffectProps) GetTarget() float32` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *IncreaseAchievementProgressEffectProps) GetTargetOk() (float32, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTarget + +`func (o *IncreaseAchievementProgressEffectProps) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### SetTarget + +`func (o *IncreaseAchievementProgressEffectProps) SetTarget(v float32)` + +SetTarget gets a reference to the given float32 and assigns it to the Target field. + +### GetIsJustCompleted + +`func (o *IncreaseAchievementProgressEffectProps) GetIsJustCompleted() bool` + +GetIsJustCompleted returns the IsJustCompleted field if non-nil, zero value otherwise. + +### GetIsJustCompletedOk + +`func (o *IncreaseAchievementProgressEffectProps) GetIsJustCompletedOk() (bool, bool)` + +GetIsJustCompletedOk returns a tuple with the IsJustCompleted field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasIsJustCompleted + +`func (o *IncreaseAchievementProgressEffectProps) HasIsJustCompleted() bool` + +HasIsJustCompleted returns a boolean if a field has been set. + +### SetIsJustCompleted + +`func (o *IncreaseAchievementProgressEffectProps) SetIsJustCompleted(v bool)` + +SetIsJustCompleted gets a reference to the given bool and assigns it to the IsJustCompleted field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse20011.md b/docs/InlineResponse20011.md index e7ce2dd6..13487de6 100644 --- a/docs/InlineResponse20011.md +++ b/docs/InlineResponse20011.md @@ -4,45 +4,45 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | | -**Data** | Pointer to [**[]CampaignTemplate**](CampaignTemplate.md) | | +**TotalResultSize** | Pointer to **int32** | | +**Data** | Pointer to [**[]CampaignGroup**](CampaignGroup.md) | | ## Methods -### GetHasMore +### GetTotalResultSize -`func (o *InlineResponse20011) GetHasMore() bool` +`func (o *InlineResponse20011) GetTotalResultSize() int32` -GetHasMore returns the HasMore field if non-nil, zero value otherwise. +GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. -### GetHasMoreOk +### GetTotalResultSizeOk -`func (o *InlineResponse20011) GetHasMoreOk() (bool, bool)` +`func (o *InlineResponse20011) GetTotalResultSizeOk() (int32, bool)` -GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasHasMore +### HasTotalResultSize -`func (o *InlineResponse20011) HasHasMore() bool` +`func (o *InlineResponse20011) HasTotalResultSize() bool` -HasHasMore returns a boolean if a field has been set. +HasTotalResultSize returns a boolean if a field has been set. -### SetHasMore +### SetTotalResultSize -`func (o *InlineResponse20011) SetHasMore(v bool)` +`func (o *InlineResponse20011) SetTotalResultSize(v int32)` -SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. ### GetData -`func (o *InlineResponse20011) GetData() []CampaignTemplate` +`func (o *InlineResponse20011) GetData() []CampaignGroup` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20011) GetDataOk() ([]CampaignTemplate, bool)` +`func (o *InlineResponse20011) GetDataOk() ([]CampaignGroup, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20011) SetData(v []CampaignTemplate)` +`func (o *InlineResponse20011) SetData(v []CampaignGroup)` -SetData gets a reference to the given []CampaignTemplate and assigns it to the Data field. +SetData gets a reference to the given []CampaignGroup and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20012.md b/docs/InlineResponse20012.md index 3adc81fa..a53ae864 100644 --- a/docs/InlineResponse20012.md +++ b/docs/InlineResponse20012.md @@ -4,45 +4,45 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]LoyaltyProgram**](LoyaltyProgram.md) | | +**HasMore** | Pointer to **bool** | | +**Data** | Pointer to [**[]CampaignTemplate**](CampaignTemplate.md) | | ## Methods -### GetTotalResultSize +### GetHasMore -`func (o *InlineResponse20012) GetTotalResultSize() int32` +`func (o *InlineResponse20012) GetHasMore() bool` -GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. +GetHasMore returns the HasMore field if non-nil, zero value otherwise. -### GetTotalResultSizeOk +### GetHasMoreOk -`func (o *InlineResponse20012) GetTotalResultSizeOk() (int32, bool)` +`func (o *InlineResponse20012) GetHasMoreOk() (bool, bool)` -GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasTotalResultSize +### HasHasMore -`func (o *InlineResponse20012) HasTotalResultSize() bool` +`func (o *InlineResponse20012) HasHasMore() bool` -HasTotalResultSize returns a boolean if a field has been set. +HasHasMore returns a boolean if a field has been set. -### SetTotalResultSize +### SetHasMore -`func (o *InlineResponse20012) SetTotalResultSize(v int32)` +`func (o *InlineResponse20012) SetHasMore(v bool)` -SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. ### GetData -`func (o *InlineResponse20012) GetData() []LoyaltyProgram` +`func (o *InlineResponse20012) GetData() []CampaignTemplate` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20012) GetDataOk() ([]LoyaltyProgram, bool)` +`func (o *InlineResponse20012) GetDataOk() ([]CampaignTemplate, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20012) SetData(v []LoyaltyProgram)` +`func (o *InlineResponse20012) SetData(v []CampaignTemplate)` -SetData gets a reference to the given []LoyaltyProgram and assigns it to the Data field. +SetData gets a reference to the given []CampaignTemplate and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20013.md b/docs/InlineResponse20013.md index 76763975..f2ba3cdf 100644 --- a/docs/InlineResponse20013.md +++ b/docs/InlineResponse20013.md @@ -4,45 +4,45 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | | -**Data** | Pointer to [**[]LoyaltyProgramTransaction**](LoyaltyProgramTransaction.md) | | +**TotalResultSize** | Pointer to **int32** | | +**Data** | Pointer to [**[]LoyaltyProgram**](LoyaltyProgram.md) | | ## Methods -### GetHasMore +### GetTotalResultSize -`func (o *InlineResponse20013) GetHasMore() bool` +`func (o *InlineResponse20013) GetTotalResultSize() int32` -GetHasMore returns the HasMore field if non-nil, zero value otherwise. +GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. -### GetHasMoreOk +### GetTotalResultSizeOk -`func (o *InlineResponse20013) GetHasMoreOk() (bool, bool)` +`func (o *InlineResponse20013) GetTotalResultSizeOk() (int32, bool)` -GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasHasMore +### HasTotalResultSize -`func (o *InlineResponse20013) HasHasMore() bool` +`func (o *InlineResponse20013) HasTotalResultSize() bool` -HasHasMore returns a boolean if a field has been set. +HasTotalResultSize returns a boolean if a field has been set. -### SetHasMore +### SetTotalResultSize -`func (o *InlineResponse20013) SetHasMore(v bool)` +`func (o *InlineResponse20013) SetTotalResultSize(v int32)` -SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. ### GetData -`func (o *InlineResponse20013) GetData() []LoyaltyProgramTransaction` +`func (o *InlineResponse20013) GetData() []LoyaltyProgram` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20013) GetDataOk() ([]LoyaltyProgramTransaction, bool)` +`func (o *InlineResponse20013) GetDataOk() ([]LoyaltyProgram, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20013) SetData(v []LoyaltyProgramTransaction)` +`func (o *InlineResponse20013) SetData(v []LoyaltyProgram)` -SetData gets a reference to the given []LoyaltyProgramTransaction and assigns it to the Data field. +SetData gets a reference to the given []LoyaltyProgram and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20014.md b/docs/InlineResponse20014.md index 7e4de241..59f228d1 100644 --- a/docs/InlineResponse20014.md +++ b/docs/InlineResponse20014.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **HasMore** | Pointer to **bool** | | -**Data** | Pointer to [**[]LoyaltyCard**](LoyaltyCard.md) | | +**Data** | Pointer to [**[]LoyaltyProgramTransaction**](LoyaltyProgramTransaction.md) | | ## Methods @@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel ### GetData -`func (o *InlineResponse20014) GetData() []LoyaltyCard` +`func (o *InlineResponse20014) GetData() []LoyaltyProgramTransaction` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20014) GetDataOk() ([]LoyaltyCard, bool)` +`func (o *InlineResponse20014) GetDataOk() ([]LoyaltyProgramTransaction, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20014) SetData(v []LoyaltyCard)` +`func (o *InlineResponse20014) SetData(v []LoyaltyProgramTransaction)` -SetData gets a reference to the given []LoyaltyCard and assigns it to the Data field. +SetData gets a reference to the given []LoyaltyProgramTransaction and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20015.md b/docs/InlineResponse20015.md index 4641f49f..746a06e1 100644 --- a/docs/InlineResponse20015.md +++ b/docs/InlineResponse20015.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | true means there is more data in the source collection to request.. | -**Data** | Pointer to [**[]CardLedgerTransactionLogEntry**](CardLedgerTransactionLogEntry.md) | List of loyalty card transaction logs. | +**HasMore** | Pointer to **bool** | | +**Data** | Pointer to [**[]LoyaltyCard**](LoyaltyCard.md) | | ## Methods @@ -36,13 +36,13 @@ SetHasMore gets a reference to the given bool and assigns it to the HasMore fiel ### GetData -`func (o *InlineResponse20015) GetData() []CardLedgerTransactionLogEntry` +`func (o *InlineResponse20015) GetData() []LoyaltyCard` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20015) GetDataOk() ([]CardLedgerTransactionLogEntry, bool)` +`func (o *InlineResponse20015) GetDataOk() ([]LoyaltyCard, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20015) SetData(v []CardLedgerTransactionLogEntry)` +`func (o *InlineResponse20015) SetData(v []LoyaltyCard)` -SetData gets a reference to the given []CardLedgerTransactionLogEntry and assigns it to the Data field. +SetData gets a reference to the given []LoyaltyCard and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20016.md b/docs/InlineResponse20016.md index 60669caa..c5fb144d 100644 --- a/docs/InlineResponse20016.md +++ b/docs/InlineResponse20016.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | | [optional] -**TotalResultSize** | Pointer to **int32** | | [optional] -**Data** | Pointer to [**[]CollectionWithoutPayload**](CollectionWithoutPayload.md) | | +**HasMore** | Pointer to **bool** | true means there is more data in the source collection to request.. | +**Data** | Pointer to [**[]CardLedgerTransactionLogEntry**](CardLedgerTransactionLogEntry.md) | List of loyalty card transaction logs. | ## Methods @@ -35,40 +34,15 @@ HasHasMore returns a boolean if a field has been set. SetHasMore gets a reference to the given bool and assigns it to the HasMore field. -### GetTotalResultSize - -`func (o *InlineResponse20016) GetTotalResultSize() int32` - -GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. - -### GetTotalResultSizeOk - -`func (o *InlineResponse20016) GetTotalResultSizeOk() (int32, bool)` - -GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasTotalResultSize - -`func (o *InlineResponse20016) HasTotalResultSize() bool` - -HasTotalResultSize returns a boolean if a field has been set. - -### SetTotalResultSize - -`func (o *InlineResponse20016) SetTotalResultSize(v int32)` - -SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. - ### GetData -`func (o *InlineResponse20016) GetData() []CollectionWithoutPayload` +`func (o *InlineResponse20016) GetData() []CardLedgerTransactionLogEntry` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20016) GetDataOk() ([]CollectionWithoutPayload, bool)` +`func (o *InlineResponse20016) GetDataOk() ([]CardLedgerTransactionLogEntry, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20016) SetData(v []CollectionWithoutPayload)` +`func (o *InlineResponse20016) SetData(v []CardLedgerTransactionLogEntry)` -SetData gets a reference to the given []CollectionWithoutPayload and assigns it to the Data field. +SetData gets a reference to the given []CardLedgerTransactionLogEntry and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20017.md b/docs/InlineResponse20017.md index 54370e2e..b2c7aafc 100644 --- a/docs/InlineResponse20017.md +++ b/docs/InlineResponse20017.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | | -**Data** | Pointer to [**[]CollectionItem**](CollectionItem.md) | | +**HasMore** | Pointer to **bool** | | [optional] +**TotalResultSize** | Pointer to **int32** | | [optional] +**Data** | Pointer to [**[]CollectionWithoutPayload**](CollectionWithoutPayload.md) | | ## Methods @@ -34,15 +35,40 @@ HasHasMore returns a boolean if a field has been set. SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +### GetTotalResultSize + +`func (o *InlineResponse20017) GetTotalResultSize() int32` + +GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. + +### GetTotalResultSizeOk + +`func (o *InlineResponse20017) GetTotalResultSizeOk() (int32, bool)` + +GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalResultSize + +`func (o *InlineResponse20017) HasTotalResultSize() bool` + +HasTotalResultSize returns a boolean if a field has been set. + +### SetTotalResultSize + +`func (o *InlineResponse20017) SetTotalResultSize(v int32)` + +SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. + ### GetData -`func (o *InlineResponse20017) GetData() []CollectionItem` +`func (o *InlineResponse20017) GetData() []CollectionWithoutPayload` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20017) GetDataOk() ([]CollectionItem, bool)` +`func (o *InlineResponse20017) GetDataOk() ([]CollectionWithoutPayload, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20017) SetData(v []CollectionItem)` +`func (o *InlineResponse20017) SetData(v []CollectionWithoutPayload)` -SetData gets a reference to the given []CollectionItem and assigns it to the Data field. +SetData gets a reference to the given []CollectionWithoutPayload and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20018.md b/docs/InlineResponse20018.md index 76fb1203..33f08ca5 100644 --- a/docs/InlineResponse20018.md +++ b/docs/InlineResponse20018.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | | [optional] -**TotalResultSize** | Pointer to **int32** | | [optional] -**Data** | Pointer to [**[]Collection**](Collection.md) | | +**HasMore** | Pointer to **bool** | | +**Data** | Pointer to [**[]CollectionItem**](CollectionItem.md) | | ## Methods @@ -35,40 +34,15 @@ HasHasMore returns a boolean if a field has been set. SetHasMore gets a reference to the given bool and assigns it to the HasMore field. -### GetTotalResultSize - -`func (o *InlineResponse20018) GetTotalResultSize() int32` - -GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. - -### GetTotalResultSizeOk - -`func (o *InlineResponse20018) GetTotalResultSizeOk() (int32, bool)` - -GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasTotalResultSize - -`func (o *InlineResponse20018) HasTotalResultSize() bool` - -HasTotalResultSize returns a boolean if a field has been set. - -### SetTotalResultSize - -`func (o *InlineResponse20018) SetTotalResultSize(v int32)` - -SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. - ### GetData -`func (o *InlineResponse20018) GetData() []Collection` +`func (o *InlineResponse20018) GetData() []CollectionItem` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20018) GetDataOk() ([]Collection, bool)` +`func (o *InlineResponse20018) GetDataOk() ([]CollectionItem, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20018) SetData(v []Collection)` +`func (o *InlineResponse20018) SetData(v []CollectionItem)` -SetData gets a reference to the given []Collection and assigns it to the Data field. +SetData gets a reference to the given []CollectionItem and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20031.md b/docs/InlineResponse20031.md index 32edf616..f9cb029a 100644 --- a/docs/InlineResponse20031.md +++ b/docs/InlineResponse20031.md @@ -5,8 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **HasMore** | Pointer to **bool** | | [optional] -**TotalResultSize** | Pointer to **int32** | | [optional] -**Data** | Pointer to [**[]ApplicationReferee**](ApplicationReferee.md) | | +**Data** | Pointer to [**[]AudienceAnalytics**](AudienceAnalytics.md) | | ## Methods @@ -35,40 +34,15 @@ HasHasMore returns a boolean if a field has been set. SetHasMore gets a reference to the given bool and assigns it to the HasMore field. -### GetTotalResultSize - -`func (o *InlineResponse20031) GetTotalResultSize() int32` - -GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. - -### GetTotalResultSizeOk - -`func (o *InlineResponse20031) GetTotalResultSizeOk() (int32, bool)` - -GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasTotalResultSize - -`func (o *InlineResponse20031) HasTotalResultSize() bool` - -HasTotalResultSize returns a boolean if a field has been set. - -### SetTotalResultSize - -`func (o *InlineResponse20031) SetTotalResultSize(v int32)` - -SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. - ### GetData -`func (o *InlineResponse20031) GetData() []ApplicationReferee` +`func (o *InlineResponse20031) GetData() []AudienceAnalytics` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20031) GetDataOk() ([]ApplicationReferee, bool)` +`func (o *InlineResponse20031) GetDataOk() ([]AudienceAnalytics, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20031) SetData(v []ApplicationReferee)` +`func (o *InlineResponse20031) SetData(v []AudienceAnalytics)` -SetData gets a reference to the given []ApplicationReferee and assigns it to the Data field. +SetData gets a reference to the given []AudienceAnalytics and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20032.md b/docs/InlineResponse20032.md index 2fcb8596..c015a2ee 100644 --- a/docs/InlineResponse20032.md +++ b/docs/InlineResponse20032.md @@ -4,45 +4,45 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]Attribute**](Attribute.md) | | +**HasMore** | Pointer to **bool** | | [optional] +**Data** | Pointer to [**[]CustomerProfile**](CustomerProfile.md) | | ## Methods -### GetTotalResultSize +### GetHasMore -`func (o *InlineResponse20032) GetTotalResultSize() int32` +`func (o *InlineResponse20032) GetHasMore() bool` -GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. +GetHasMore returns the HasMore field if non-nil, zero value otherwise. -### GetTotalResultSizeOk +### GetHasMoreOk -`func (o *InlineResponse20032) GetTotalResultSizeOk() (int32, bool)` +`func (o *InlineResponse20032) GetHasMoreOk() (bool, bool)` -GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasTotalResultSize +### HasHasMore -`func (o *InlineResponse20032) HasTotalResultSize() bool` +`func (o *InlineResponse20032) HasHasMore() bool` -HasTotalResultSize returns a boolean if a field has been set. +HasHasMore returns a boolean if a field has been set. -### SetTotalResultSize +### SetHasMore -`func (o *InlineResponse20032) SetTotalResultSize(v int32)` +`func (o *InlineResponse20032) SetHasMore(v bool)` -SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. ### GetData -`func (o *InlineResponse20032) GetData() []Attribute` +`func (o *InlineResponse20032) GetData() []CustomerProfile` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20032) GetDataOk() ([]Attribute, bool)` +`func (o *InlineResponse20032) GetDataOk() ([]CustomerProfile, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20032) SetData(v []Attribute)` +`func (o *InlineResponse20032) SetData(v []CustomerProfile)` -SetData gets a reference to the given []Attribute and assigns it to the Data field. +SetData gets a reference to the given []CustomerProfile and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20033.md b/docs/InlineResponse20033.md index ea2c3961..139adab6 100644 --- a/docs/InlineResponse20033.md +++ b/docs/InlineResponse20033.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **HasMore** | Pointer to **bool** | | [optional] **TotalResultSize** | Pointer to **int32** | | [optional] -**Data** | Pointer to [**[]CatalogItem**](CatalogItem.md) | | +**Data** | Pointer to [**[]ApplicationReferee**](ApplicationReferee.md) | | ## Methods @@ -62,13 +62,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20033) GetData() []CatalogItem` +`func (o *InlineResponse20033) GetData() []ApplicationReferee` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20033) GetDataOk() ([]CatalogItem, bool)` +`func (o *InlineResponse20033) GetDataOk() ([]ApplicationReferee, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -81,9 +81,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20033) SetData(v []CatalogItem)` +`func (o *InlineResponse20033) SetData(v []ApplicationReferee)` -SetData gets a reference to the given []CatalogItem and assigns it to the Data field. +SetData gets a reference to the given []ApplicationReferee and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20034.md b/docs/InlineResponse20034.md index 9593133d..827aba87 100644 --- a/docs/InlineResponse20034.md +++ b/docs/InlineResponse20034.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]AccountAdditionalCost**](AccountAdditionalCost.md) | | +**Data** | Pointer to [**[]Attribute**](Attribute.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20034) GetData() []AccountAdditionalCost` +`func (o *InlineResponse20034) GetData() []Attribute` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20034) GetDataOk() ([]AccountAdditionalCost, bool)` +`func (o *InlineResponse20034) GetDataOk() ([]Attribute, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20034) SetData(v []AccountAdditionalCost)` +`func (o *InlineResponse20034) SetData(v []Attribute)` -SetData gets a reference to the given []AccountAdditionalCost and assigns it to the Data field. +SetData gets a reference to the given []Attribute and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20035.md b/docs/InlineResponse20035.md index 2831a08a..8db61bdc 100644 --- a/docs/InlineResponse20035.md +++ b/docs/InlineResponse20035.md @@ -4,11 +4,37 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]WebhookWithOutgoingIntegrationDetails**](WebhookWithOutgoingIntegrationDetails.md) | | +**HasMore** | Pointer to **bool** | | [optional] +**TotalResultSize** | Pointer to **int32** | | [optional] +**Data** | Pointer to [**[]CatalogItem**](CatalogItem.md) | | ## Methods +### GetHasMore + +`func (o *InlineResponse20035) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *InlineResponse20035) GetHasMoreOk() (bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasMore + +`func (o *InlineResponse20035) HasHasMore() bool` + +HasHasMore returns a boolean if a field has been set. + +### SetHasMore + +`func (o *InlineResponse20035) SetHasMore(v bool)` + +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. + ### GetTotalResultSize `func (o *InlineResponse20035) GetTotalResultSize() int32` @@ -36,13 +62,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20035) GetData() []WebhookWithOutgoingIntegrationDetails` +`func (o *InlineResponse20035) GetData() []CatalogItem` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20035) GetDataOk() ([]WebhookWithOutgoingIntegrationDetails, bool)` +`func (o *InlineResponse20035) GetDataOk() ([]CatalogItem, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20035) SetData(v []WebhookWithOutgoingIntegrationDetails)` +`func (o *InlineResponse20035) SetData(v []CatalogItem)` -SetData gets a reference to the given []WebhookWithOutgoingIntegrationDetails and assigns it to the Data field. +SetData gets a reference to the given []CatalogItem and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20036.md b/docs/InlineResponse20036.md index 7625b9c8..bf396ec4 100644 --- a/docs/InlineResponse20036.md +++ b/docs/InlineResponse20036.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]WebhookActivationLogEntry**](WebhookActivationLogEntry.md) | | +**Data** | Pointer to [**[]AccountAdditionalCost**](AccountAdditionalCost.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20036) GetData() []WebhookActivationLogEntry` +`func (o *InlineResponse20036) GetData() []AccountAdditionalCost` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20036) GetDataOk() ([]WebhookActivationLogEntry, bool)` +`func (o *InlineResponse20036) GetDataOk() ([]AccountAdditionalCost, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20036) SetData(v []WebhookActivationLogEntry)` +`func (o *InlineResponse20036) SetData(v []AccountAdditionalCost)` -SetData gets a reference to the given []WebhookActivationLogEntry and assigns it to the Data field. +SetData gets a reference to the given []AccountAdditionalCost and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20037.md b/docs/InlineResponse20037.md index 204f469d..4d9a766c 100644 --- a/docs/InlineResponse20037.md +++ b/docs/InlineResponse20037.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]WebhookLogEntry**](WebhookLogEntry.md) | | +**Data** | Pointer to [**[]WebhookWithOutgoingIntegrationDetails**](WebhookWithOutgoingIntegrationDetails.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20037) GetData() []WebhookLogEntry` +`func (o *InlineResponse20037) GetData() []WebhookWithOutgoingIntegrationDetails` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20037) GetDataOk() ([]WebhookLogEntry, bool)` +`func (o *InlineResponse20037) GetDataOk() ([]WebhookWithOutgoingIntegrationDetails, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20037) SetData(v []WebhookLogEntry)` +`func (o *InlineResponse20037) SetData(v []WebhookWithOutgoingIntegrationDetails)` -SetData gets a reference to the given []WebhookLogEntry and assigns it to the Data field. +SetData gets a reference to the given []WebhookWithOutgoingIntegrationDetails and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20038.md b/docs/InlineResponse20038.md index ad0f687d..f216e668 100644 --- a/docs/InlineResponse20038.md +++ b/docs/InlineResponse20038.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]EventType**](EventType.md) | | +**Data** | Pointer to [**[]WebhookActivationLogEntry**](WebhookActivationLogEntry.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20038) GetData() []EventType` +`func (o *InlineResponse20038) GetData() []WebhookActivationLogEntry` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20038) GetDataOk() ([]EventType, bool)` +`func (o *InlineResponse20038) GetDataOk() ([]WebhookActivationLogEntry, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20038) SetData(v []EventType)` +`func (o *InlineResponse20038) SetData(v []WebhookActivationLogEntry)` -SetData gets a reference to the given []EventType and assigns it to the Data field. +SetData gets a reference to the given []WebhookActivationLogEntry and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20039.md b/docs/InlineResponse20039.md index 6c73e35c..1b964285 100644 --- a/docs/InlineResponse20039.md +++ b/docs/InlineResponse20039.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]User**](User.md) | | +**Data** | Pointer to [**[]WebhookLogEntry**](WebhookLogEntry.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20039) GetData() []User` +`func (o *InlineResponse20039) GetData() []WebhookLogEntry` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20039) GetDataOk() ([]User, bool)` +`func (o *InlineResponse20039) GetDataOk() ([]WebhookLogEntry, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20039) SetData(v []User)` +`func (o *InlineResponse20039) SetData(v []WebhookLogEntry)` -SetData gets a reference to the given []User and assigns it to the Data field. +SetData gets a reference to the given []WebhookLogEntry and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20040.md b/docs/InlineResponse20040.md index 759c3599..40b856ec 100644 --- a/docs/InlineResponse20040.md +++ b/docs/InlineResponse20040.md @@ -4,9 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalResultSize** | Pointer to **int32** | | [optional] -**HasMore** | Pointer to **bool** | | [optional] -**Data** | Pointer to [**[]Change**](Change.md) | | +**TotalResultSize** | Pointer to **int32** | | +**Data** | Pointer to [**[]EventType**](EventType.md) | | ## Methods @@ -35,40 +34,15 @@ HasTotalResultSize returns a boolean if a field has been set. SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. -### GetHasMore - -`func (o *InlineResponse20040) GetHasMore() bool` - -GetHasMore returns the HasMore field if non-nil, zero value otherwise. - -### GetHasMoreOk - -`func (o *InlineResponse20040) GetHasMoreOk() (bool, bool)` - -GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasHasMore - -`func (o *InlineResponse20040) HasHasMore() bool` - -HasHasMore returns a boolean if a field has been set. - -### SetHasMore - -`func (o *InlineResponse20040) SetHasMore(v bool)` - -SetHasMore gets a reference to the given bool and assigns it to the HasMore field. - ### GetData -`func (o *InlineResponse20040) GetData() []Change` +`func (o *InlineResponse20040) GetData() []EventType` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20040) GetDataOk() ([]Change, bool)` +`func (o *InlineResponse20040) GetDataOk() ([]EventType, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20040) SetData(v []Change)` +`func (o *InlineResponse20040) SetData(v []EventType)` -SetData gets a reference to the given []Change and assigns it to the Data field. +SetData gets a reference to the given []EventType and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20041.md b/docs/InlineResponse20041.md index 0303e621..3aa765b7 100644 --- a/docs/InlineResponse20041.md +++ b/docs/InlineResponse20041.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]Export**](Export.md) | | +**Data** | Pointer to [**[]User**](User.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20041) GetData() []Export` +`func (o *InlineResponse20041) GetData() []User` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20041) GetDataOk() ([]Export, bool)` +`func (o *InlineResponse20041) GetDataOk() ([]User, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20041) SetData(v []Export)` +`func (o *InlineResponse20041) SetData(v []User)` -SetData gets a reference to the given []Export and assigns it to the Data field. +SetData gets a reference to the given []User and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20042.md b/docs/InlineResponse20042.md index 8f0ee1c7..f72a00a4 100644 --- a/docs/InlineResponse20042.md +++ b/docs/InlineResponse20042.md @@ -4,8 +4,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]Role**](Role.md) | | +**TotalResultSize** | Pointer to **int32** | | [optional] +**HasMore** | Pointer to **bool** | | [optional] +**Data** | Pointer to [**[]Change**](Change.md) | | ## Methods @@ -34,15 +35,40 @@ HasTotalResultSize returns a boolean if a field has been set. SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +### GetHasMore + +`func (o *InlineResponse20042) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *InlineResponse20042) GetHasMoreOk() (bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasMore + +`func (o *InlineResponse20042) HasHasMore() bool` + +HasHasMore returns a boolean if a field has been set. + +### SetHasMore + +`func (o *InlineResponse20042) SetHasMore(v bool)` + +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. + ### GetData -`func (o *InlineResponse20042) GetData() []Role` +`func (o *InlineResponse20042) GetData() []Change` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20042) GetDataOk() ([]Role, bool)` +`func (o *InlineResponse20042) GetDataOk() ([]Change, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +81,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20042) SetData(v []Role)` +`func (o *InlineResponse20042) SetData(v []Change)` -SetData gets a reference to the given []Role and assigns it to the Data field. +SetData gets a reference to the given []Change and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20043.md b/docs/InlineResponse20043.md index 2299b5fa..8f34e9f3 100644 --- a/docs/InlineResponse20043.md +++ b/docs/InlineResponse20043.md @@ -4,37 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | | [optional] -**TotalResultSize** | Pointer to **int32** | | [optional] -**Data** | Pointer to [**[]Store**](Store.md) | | +**TotalResultSize** | Pointer to **int32** | | +**Data** | Pointer to [**[]Export**](Export.md) | | ## Methods -### GetHasMore - -`func (o *InlineResponse20043) GetHasMore() bool` - -GetHasMore returns the HasMore field if non-nil, zero value otherwise. - -### GetHasMoreOk - -`func (o *InlineResponse20043) GetHasMoreOk() (bool, bool)` - -GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasHasMore - -`func (o *InlineResponse20043) HasHasMore() bool` - -HasHasMore returns a boolean if a field has been set. - -### SetHasMore - -`func (o *InlineResponse20043) SetHasMore(v bool)` - -SetHasMore gets a reference to the given bool and assigns it to the HasMore field. - ### GetTotalResultSize `func (o *InlineResponse20043) GetTotalResultSize() int32` @@ -62,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20043) GetData() []Store` +`func (o *InlineResponse20043) GetData() []Export` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20043) GetDataOk() ([]Store, bool)` +`func (o *InlineResponse20043) GetDataOk() ([]Export, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -81,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20043) SetData(v []Store)` +`func (o *InlineResponse20043) SetData(v []Export)` -SetData gets a reference to the given []Store and assigns it to the Data field. +SetData gets a reference to the given []Export and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/InlineResponse20044.md b/docs/InlineResponse20044.md new file mode 100644 index 00000000..bc015a1a --- /dev/null +++ b/docs/InlineResponse20044.md @@ -0,0 +1,65 @@ +# InlineResponse20044 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TotalResultSize** | Pointer to **int32** | | +**Data** | Pointer to [**[]Role**](Role.md) | | + +## Methods + +### GetTotalResultSize + +`func (o *InlineResponse20044) GetTotalResultSize() int32` + +GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. + +### GetTotalResultSizeOk + +`func (o *InlineResponse20044) GetTotalResultSizeOk() (int32, bool)` + +GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalResultSize + +`func (o *InlineResponse20044) HasTotalResultSize() bool` + +HasTotalResultSize returns a boolean if a field has been set. + +### SetTotalResultSize + +`func (o *InlineResponse20044) SetTotalResultSize(v int32)` + +SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. + +### GetData + +`func (o *InlineResponse20044) GetData() []Role` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *InlineResponse20044) GetDataOk() ([]Role, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasData + +`func (o *InlineResponse20044) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetData + +`func (o *InlineResponse20044) SetData(v []Role)` + +SetData gets a reference to the given []Role and assigns it to the Data field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse20045.md b/docs/InlineResponse20045.md new file mode 100644 index 00000000..f63eaa86 --- /dev/null +++ b/docs/InlineResponse20045.md @@ -0,0 +1,91 @@ +# InlineResponse20045 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | Pointer to **bool** | | [optional] +**TotalResultSize** | Pointer to **int32** | | [optional] +**Data** | Pointer to [**[]Store**](Store.md) | | + +## Methods + +### GetHasMore + +`func (o *InlineResponse20045) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *InlineResponse20045) GetHasMoreOk() (bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasMore + +`func (o *InlineResponse20045) HasHasMore() bool` + +HasHasMore returns a boolean if a field has been set. + +### SetHasMore + +`func (o *InlineResponse20045) SetHasMore(v bool)` + +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. + +### GetTotalResultSize + +`func (o *InlineResponse20045) GetTotalResultSize() int32` + +GetTotalResultSize returns the TotalResultSize field if non-nil, zero value otherwise. + +### GetTotalResultSizeOk + +`func (o *InlineResponse20045) GetTotalResultSizeOk() (int32, bool)` + +GetTotalResultSizeOk returns a tuple with the TotalResultSize field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTotalResultSize + +`func (o *InlineResponse20045) HasTotalResultSize() bool` + +HasTotalResultSize returns a boolean if a field has been set. + +### SetTotalResultSize + +`func (o *InlineResponse20045) SetTotalResultSize(v int32)` + +SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. + +### GetData + +`func (o *InlineResponse20045) GetData() []Store` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *InlineResponse20045) GetDataOk() ([]Store, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasData + +`func (o *InlineResponse20045) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetData + +`func (o *InlineResponse20045) SetData(v []Store)` + +SetData gets a reference to the given []Store and assigns it to the Data field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse20046.md b/docs/InlineResponse20046.md new file mode 100644 index 00000000..a6b1681d --- /dev/null +++ b/docs/InlineResponse20046.md @@ -0,0 +1,65 @@ +# InlineResponse20046 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | Pointer to **bool** | | [optional] +**Data** | Pointer to [**[]Achievement**](Achievement.md) | | + +## Methods + +### GetHasMore + +`func (o *InlineResponse20046) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *InlineResponse20046) GetHasMoreOk() (bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasMore + +`func (o *InlineResponse20046) HasHasMore() bool` + +HasHasMore returns a boolean if a field has been set. + +### SetHasMore + +`func (o *InlineResponse20046) SetHasMore(v bool)` + +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. + +### GetData + +`func (o *InlineResponse20046) GetData() []Achievement` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *InlineResponse20046) GetDataOk() ([]Achievement, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasData + +`func (o *InlineResponse20046) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetData + +`func (o *InlineResponse20046) SetData(v []Achievement)` + +SetData gets a reference to the given []Achievement and assigns it to the Data field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/InlineResponse20047.md b/docs/InlineResponse20047.md new file mode 100644 index 00000000..5f61d3c5 --- /dev/null +++ b/docs/InlineResponse20047.md @@ -0,0 +1,65 @@ +# InlineResponse20047 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | Pointer to **bool** | | +**Data** | Pointer to [**[]AchievementProgress**](AchievementProgress.md) | | + +## Methods + +### GetHasMore + +`func (o *InlineResponse20047) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *InlineResponse20047) GetHasMoreOk() (bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHasMore + +`func (o *InlineResponse20047) HasHasMore() bool` + +HasHasMore returns a boolean if a field has been set. + +### SetHasMore + +`func (o *InlineResponse20047) SetHasMore(v bool)` + +SetHasMore gets a reference to the given bool and assigns it to the HasMore field. + +### GetData + +`func (o *InlineResponse20047) GetData() []AchievementProgress` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *InlineResponse20047) GetDataOk() ([]AchievementProgress, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasData + +`func (o *InlineResponse20047) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetData + +`func (o *InlineResponse20047) SetData(v []AchievementProgress)` + +SetData gets a reference to the given []AchievementProgress and assigns it to the Data field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md index faca7481..5894779f 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -211,7 +211,7 @@ Delete audience memberships Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**audienceId** | **int32** | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | +**audienceId** | **int32** | The ID of the audience. | ### Other Parameters @@ -254,7 +254,7 @@ Delete audience Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**audienceId** | **int32** | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | +**audienceId** | **int32** | The ID of the audience. | ### Other Parameters @@ -372,7 +372,7 @@ Name | Type | Description | Notes ## GetCustomerInventory -> CustomerInventory GetCustomerInventory(ctx, integrationId).Profile(profile).Referrals(referrals).Coupons(coupons).Loyalty(loyalty).Giveaways(giveaways).Execute() +> CustomerInventory GetCustomerInventory(ctx, integrationId).Profile(profile).Referrals(referrals).Coupons(coupons).Loyalty(loyalty).Giveaways(giveaways).Achievements(achievements).Execute() List customer data @@ -399,6 +399,7 @@ Name | Type | Description | Notes **coupons** | **bool** | Set to `true` to include coupon information in the response. | **loyalty** | **bool** | Set to `true` to include loyalty information in the response. | **giveaways** | **bool** | Set to `true` to include giveaways information in the response. | + **achievements** | **bool** | Set to `true` to include achievement information in the response. | ### Return type @@ -487,7 +488,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | + **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | ### Return type @@ -533,7 +534,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | + **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | ### Return type @@ -581,7 +582,7 @@ Name | Type | Description | Notes **status** | **string** | Filter points based on their status. | [default to active] **subledgerId** | **string** | The ID of the subledger by which we filter the data. | - **pageSize** | **int32** | The number of items in this response. | [default to 50] + **pageSize** | **int32** | The number of items in the response. | [default to 50] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type @@ -630,9 +631,9 @@ Name | Type | Description | Notes **subledgerId** | **string** | The ID of the subledger by which we filter the data. | **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. | - **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type @@ -681,7 +682,7 @@ Name | Type | Description | Notes **status** | **string** | Filter points based on their status. | [default to active] **subledgerId** | **string** | The ID of the subledger by which we filter the data. | - **pageSize** | **int32** | The number of items in this response. | [default to 50] + **pageSize** | **int32** | The number of items in the response. | [default to 50] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type @@ -730,9 +731,9 @@ Name | Type | Description | Notes **subledgerId** | **string** | The ID of the subledger by which we filter the data. | **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. | - **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **pageSize** | **int32** | The number of items in this response. | [default to 50] + **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **pageSize** | **int32** | The number of items in the response. | [default to 50] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type @@ -1029,7 +1030,7 @@ Update profile attributes for all customers in audience Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**audienceId** | **int32** | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | +**audienceId** | **int32** | The ID of the audience. | ### Other Parameters @@ -1073,7 +1074,7 @@ Update audience name Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**audienceId** | **int32** | The ID of the audience. You get it via the `id` property when [creating an audience](#operation/createAudienceV2). | +**audienceId** | **int32** | The ID of the audience. | ### Other Parameters @@ -1230,7 +1231,7 @@ Name | Type | Description | Notes ## UpdateCustomerSessionV2 -> IntegrationStateV2 UpdateCustomerSessionV2(ctx, customerSessionId).Body(body).Dry(dry).Execute() +> IntegrationStateV2 UpdateCustomerSessionV2(ctx, customerSessionId).Body(body).Dry(dry).Now(now).Execute() Update customer session @@ -1254,6 +1255,7 @@ Name | Type | Description | Notes **body** | [**IntegrationRequest**](IntegrationRequest.md) | body | **dry** | **bool** | Indicates whether to persist the changes. Changes are ignored when `dry=true`. When set to `true`: - The endpoint will **only** consider the payload that you pass when **closing** the session. When you do not use the `dry` parameter, the endpoint behaves as a typical PUT endpoint. Each update builds upon the previous ones. - You can use the `evaluableCampaignIds` body property to select specific campaigns to run. [See the docs](https://docs.talon.one/docs/dev/integration-api/dry-requests). | + **now** | **time.Time** | A timestamp value of a future date that acts as a current date when included in the query. Use this parameter, for example, to test campaigns that would be evaluated for this customer session in the future (say, [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule)). **Note:** - It must be an RFC3339 timestamp string. - It can **only** be a date in the future. - It can **only** be used if the `dry` parameter in the query is set to `true`. | ### Return type diff --git a/docs/IntegrationCoupon.md b/docs/IntegrationCoupon.md index 57022dfb..d9efbe4b 100644 --- a/docs/IntegrationCoupon.md +++ b/docs/IntegrationCoupon.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **ImportId** | Pointer to **int32** | The ID of the Import which created this coupon. | [optional] **Reservation** | Pointer to **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** | Pointer to **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **ProfileRedemptionCount** | Pointer to **int32** | The number of times the coupon was redeemed by the profile. | diff --git a/docs/InventoryCoupon.md b/docs/InventoryCoupon.md index 3241f70e..971466e0 100644 --- a/docs/InventoryCoupon.md +++ b/docs/InventoryCoupon.md @@ -24,10 +24,10 @@ Name | Type | Description | Notes **ImportId** | Pointer to **int32** | The ID of the Import which created this coupon. | [optional] **Reservation** | Pointer to **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** | Pointer to **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **ProfileRedemptionCount** | Pointer to **int32** | The number of times the coupon was redeemed by the profile. | -**State** | Pointer to **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. | +**State** | Pointer to **string** | Can be: - `active`: The coupon can be used. It is a reserved coupon that is not pending, used, or expired, and it has a non-exhausted limit counter. **Note:** This coupon state is returned for [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule), but the coupon cannot be used until the campaign is **running**. - `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. | ## Methods diff --git a/docs/LoginParams.md b/docs/LoginParams.md index b6724232..80aa9dc3 100644 --- a/docs/LoginParams.md +++ b/docs/LoginParams.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | The email address associated with your account. | +**Email** | Pointer to **string** | The email address associated with the user profile. | **Password** | Pointer to **string** | The password for your account. | ## Methods diff --git a/docs/LoyaltyLedgerTransactions.md b/docs/LoyaltyLedgerTransactions.md index a370aa95..0fdb3367 100644 --- a/docs/LoyaltyLedgerTransactions.md +++ b/docs/LoyaltyLedgerTransactions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**HasMore** | Pointer to **bool** | true means there is more data in the source collection to request. | [optional] +**HasMore** | Pointer to **bool** | If `true`, it means that there is more data to request in the source collection. | [optional] **Data** | Pointer to [**[]LoyaltyLedgerEntry**](LoyaltyLedgerEntry.md) | List of transaction entries from a loyalty ledger. | [optional] ## Methods diff --git a/docs/LoyaltyProgram.md b/docs/LoyaltyProgram.md index c205d73d..e2f1a85a 100644 --- a/docs/LoyaltyProgram.md +++ b/docs/LoyaltyProgram.md @@ -14,14 +14,17 @@ Name | Type | Description | Notes **AllowSubledger** | Pointer to **bool** | Indicates if this program supports subledgers inside the program. | **UsersPerCardLimit** | Pointer to **int32** | 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** | Pointer to **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | -**TiersExpireIn** | Pointer to **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**TiersExpirationPolicy** | Pointer to **string** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] +**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] **TiersDowngradePolicy** | Pointer to **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] +**ProgramJoinPolicy** | Pointer to **string** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] **AccountID** | Pointer to **int32** | The ID of the Talon.One account that owns this program. | **Name** | Pointer to **string** | The internal name for the Loyalty Program. This is an immutable value. | **Tiers** | Pointer to [**[]LoyaltyTier**](LoyaltyTier.md) | The tiers in this loyalty program. | [optional] **Timezone** | Pointer to **string** | A string containing an IANA timezone descriptor. | **CardBased** | Pointer to **bool** | Defines the type of loyalty program: - `true`: the program is a card-based. - `false`: the program is profile-based. | [default to false] **CanUpdateTiers** | Pointer to **bool** | `True` if the tier definitions can be updated. | [optional] [default to false] +**CanUpdateJoinPolicy** | Pointer to **bool** | Indicates whether the program join policy can be updated. The join policy can be updated when this value is set to `true`. | [optional] **CanUpgradeToAdvancedTiers** | Pointer to **bool** | `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. | [optional] [default to false] ## Methods @@ -276,6 +279,31 @@ HasSandbox returns a boolean if a field has been set. SetSandbox gets a reference to the given bool and assigns it to the Sandbox field. +### GetTiersExpirationPolicy + +`func (o *LoyaltyProgram) GetTiersExpirationPolicy() string` + +GetTiersExpirationPolicy returns the TiersExpirationPolicy field if non-nil, zero value otherwise. + +### GetTiersExpirationPolicyOk + +`func (o *LoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool)` + +GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTiersExpirationPolicy + +`func (o *LoyaltyProgram) HasTiersExpirationPolicy() bool` + +HasTiersExpirationPolicy returns a boolean if a field has been set. + +### SetTiersExpirationPolicy + +`func (o *LoyaltyProgram) SetTiersExpirationPolicy(v string)` + +SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. + ### GetTiersExpireIn `func (o *LoyaltyProgram) GetTiersExpireIn() string` @@ -326,6 +354,31 @@ HasTiersDowngradePolicy returns a boolean if a field has been set. SetTiersDowngradePolicy gets a reference to the given string and assigns it to the TiersDowngradePolicy field. +### GetProgramJoinPolicy + +`func (o *LoyaltyProgram) GetProgramJoinPolicy() string` + +GetProgramJoinPolicy returns the ProgramJoinPolicy field if non-nil, zero value otherwise. + +### GetProgramJoinPolicyOk + +`func (o *LoyaltyProgram) GetProgramJoinPolicyOk() (string, bool)` + +GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgramJoinPolicy + +`func (o *LoyaltyProgram) HasProgramJoinPolicy() bool` + +HasProgramJoinPolicy returns a boolean if a field has been set. + +### SetProgramJoinPolicy + +`func (o *LoyaltyProgram) SetProgramJoinPolicy(v string)` + +SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. + ### GetAccountID `func (o *LoyaltyProgram) GetAccountID() int32` @@ -476,6 +529,31 @@ HasCanUpdateTiers returns a boolean if a field has been set. SetCanUpdateTiers gets a reference to the given bool and assigns it to the CanUpdateTiers field. +### GetCanUpdateJoinPolicy + +`func (o *LoyaltyProgram) GetCanUpdateJoinPolicy() bool` + +GetCanUpdateJoinPolicy returns the CanUpdateJoinPolicy field if non-nil, zero value otherwise. + +### GetCanUpdateJoinPolicyOk + +`func (o *LoyaltyProgram) GetCanUpdateJoinPolicyOk() (bool, bool)` + +GetCanUpdateJoinPolicyOk returns a tuple with the CanUpdateJoinPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCanUpdateJoinPolicy + +`func (o *LoyaltyProgram) HasCanUpdateJoinPolicy() bool` + +HasCanUpdateJoinPolicy returns a boolean if a field has been set. + +### SetCanUpdateJoinPolicy + +`func (o *LoyaltyProgram) SetCanUpdateJoinPolicy(v bool)` + +SetCanUpdateJoinPolicy gets a reference to the given bool and assigns it to the CanUpdateJoinPolicy field. + ### GetCanUpgradeToAdvancedTiers `func (o *LoyaltyProgram) GetCanUpgradeToAdvancedTiers() bool` diff --git a/docs/LoyaltyProgramLedgers.md b/docs/LoyaltyProgramLedgers.md index cf9f8da9..c528f7b8 100644 --- a/docs/LoyaltyProgramLedgers.md +++ b/docs/LoyaltyProgramLedgers.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Id** | Pointer to **int32** | The internal ID of loyalty program. | **Title** | Pointer to **string** | Visible name of loyalty program. | **Name** | Pointer to **string** | Internal name of loyalty program. | +**JoinDate** | Pointer to [**time.Time**](time.Time.md) | The date on which the customer joined the loyalty program in RFC3339. **Note**: This is in the loyalty program's time zone. | [optional] **Ledger** | Pointer to [**LedgerInfo**](LedgerInfo.md) | | **SubLedgers** | Pointer to [**map[string]LedgerInfo**](LedgerInfo.md) | A map containing information about each loyalty subledger. | [optional] @@ -87,6 +88,31 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. +### GetJoinDate + +`func (o *LoyaltyProgramLedgers) GetJoinDate() time.Time` + +GetJoinDate returns the JoinDate field if non-nil, zero value otherwise. + +### GetJoinDateOk + +`func (o *LoyaltyProgramLedgers) GetJoinDateOk() (time.Time, bool)` + +GetJoinDateOk returns a tuple with the JoinDate field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasJoinDate + +`func (o *LoyaltyProgramLedgers) HasJoinDate() bool` + +HasJoinDate returns a boolean if a field has been set. + +### SetJoinDate + +`func (o *LoyaltyProgramLedgers) SetJoinDate(v time.Time)` + +SetJoinDate gets a reference to the given time.Time and assigns it to the JoinDate field. + ### GetLedger `func (o *LoyaltyProgramLedgers) GetLedger() LedgerInfo` diff --git a/docs/LoyaltyProgramTransaction.md b/docs/LoyaltyProgramTransaction.md index 411ed1db..939f749c 100644 --- a/docs/LoyaltyProgramTransaction.md +++ b/docs/LoyaltyProgramTransaction.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | Pointer to **int32** | ID of the loyalty ledger transaction. | **ProgramId** | Pointer to **int32** | ID of the loyalty program. | +**CampaignId** | Pointer to **int32** | ID of the campaign. | [optional] **Created** | Pointer to [**time.Time**](time.Time.md) | Date and time the loyalty transaction occurred. | **Type** | Pointer to **string** | Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. | **Amount** | Pointer to **float32** | Amount of loyalty points added or deducted in the transaction. | @@ -74,6 +75,31 @@ HasProgramId returns a boolean if a field has been set. SetProgramId gets a reference to the given int32 and assigns it to the ProgramId field. +### GetCampaignId + +`func (o *LoyaltyProgramTransaction) GetCampaignId() int32` + +GetCampaignId returns the CampaignId field if non-nil, zero value otherwise. + +### GetCampaignIdOk + +`func (o *LoyaltyProgramTransaction) GetCampaignIdOk() (int32, bool)` + +GetCampaignIdOk returns a tuple with the CampaignId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCampaignId + +`func (o *LoyaltyProgramTransaction) HasCampaignId() bool` + +HasCampaignId returns a boolean if a field has been set. + +### SetCampaignId + +`func (o *LoyaltyProgramTransaction) SetCampaignId(v int32)` + +SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. + ### GetCreated `func (o *LoyaltyProgramTransaction) GetCreated() time.Time` diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index dcc9e45c..35749e24 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -8,6 +8,7 @@ Method | HTTP request | Description [**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 +[**CreateAchievement**](ManagementApi.md#CreateAchievement) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | Create achievement [**CreateAdditionalCost**](ManagementApi.md#CreateAdditionalCost) | **Post** /v1/additional_costs | Create additional cost [**CreateAttribute**](ManagementApi.md#CreateAttribute) | **Post** /v1/attributes | Create custom attribute [**CreateCampaignFromTemplate**](ManagementApi.md#CreateCampaignFromTemplate) | **Post** /v1/applications/{applicationId}/create_campaign_from_template | Create campaign from campaign template @@ -15,11 +16,15 @@ 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 +[**CreateInviteEmail**](ManagementApi.md#CreateInviteEmail) | **Post** /v1/invite_emails | Resend invitation email +[**CreateInviteV2**](ManagementApi.md#CreateInviteV2) | **Post** /v2/invites | Invite user [**CreatePasswordRecoveryEmail**](ManagementApi.md#CreatePasswordRecoveryEmail) | **Post** /v1/password_recovery_emails | Request a password reset [**CreateSession**](ManagementApi.md#CreateSession) | **Post** /v1/sessions | Create session [**CreateStore**](ManagementApi.md#CreateStore) | **Post** /v1/applications/{applicationId}/stores | Create store +[**DeactivateUserByEmail**](ManagementApi.md#DeactivateUserByEmail) | **Post** /v1/users/deactivate | Deactivate user by email address [**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 +[**DeleteAchievement**](ManagementApi.md#DeleteAchievement) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Delete achievement [**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 campaign-level collection [**DeleteCoupon**](ManagementApi.md#DeleteCoupon) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons/{couponId} | Delete coupon @@ -27,8 +32,12 @@ Method | HTTP request | Description [**DeleteLoyaltyCard**](ManagementApi.md#DeleteLoyaltyCard) | **Delete** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Delete loyalty card [**DeleteReferral**](ManagementApi.md#DeleteReferral) | **Delete** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Delete referral [**DeleteStore**](ManagementApi.md#DeleteStore) | **Delete** /v1/applications/{applicationId}/stores/{storeId} | Delete store +[**DeleteUser**](ManagementApi.md#DeleteUser) | **Delete** /v1/users/{userId} | Delete user +[**DeleteUserByEmail**](ManagementApi.md#DeleteUserByEmail) | **Post** /v1/users/delete | Delete user by email address [**DestroySession**](ManagementApi.md#DestroySession) | **Delete** /v1/sessions | Destroy session [**ExportAccountCollectionItems**](ManagementApi.md#ExportAccountCollectionItems) | **Get** /v1/collections/{collectionId}/export | Export account-level collection's items +[**ExportAchievements**](ManagementApi.md#ExportAchievements) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId}/export | Export achievement customer data +[**ExportAudiencesMemberships**](ManagementApi.md#ExportAudiencesMemberships) | **Get** /v1/audiences/{audienceId}/memberships/export | Export audience members [**ExportCollectionItems**](ManagementApi.md#ExportCollectionItems) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/export | Export campaign-level collection's items [**ExportCoupons**](ManagementApi.md#ExportCoupons) | **Get** /v1/applications/{applicationId}/export_coupons | Export coupons [**ExportCustomerSessions**](ManagementApi.md#ExportCustomerSessions) | **Get** /v1/applications/{applicationId}/export_customer_sessions | Export customer sessions @@ -45,6 +54,7 @@ Method | HTTP request | Description [**GetAccount**](ManagementApi.md#GetAccount) | **Get** /v1/accounts/{accountId} | Get account details [**GetAccountAnalytics**](ManagementApi.md#GetAccountAnalytics) | **Get** /v1/accounts/{accountId}/analytics | Get account analytics [**GetAccountCollection**](ManagementApi.md#GetAccountCollection) | **Get** /v1/collections/{collectionId} | Get account-level collection +[**GetAchievement**](ManagementApi.md#GetAchievement) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Get achievement [**GetAdditionalCost**](ManagementApi.md#GetAdditionalCost) | **Get** /v1/additional_costs/{additionalCostId} | Get additional cost [**GetAdditionalCosts**](ManagementApi.md#GetAdditionalCosts) | **Get** /v1/additional_costs | List additional costs [**GetAllAccessLogs**](ManagementApi.md#GetAllAccessLogs) | **Get** /v1/access_logs | List access logs @@ -62,10 +72,14 @@ Method | HTTP request | Description [**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 +[**GetAudienceMemberships**](ManagementApi.md#GetAudienceMemberships) | **Get** /v1/audiences/{audienceId}/memberships | List audience members [**GetAudiences**](ManagementApi.md#GetAudiences) | **Get** /v1/audiences | List audiences +[**GetAudiencesAnalytics**](ManagementApi.md#GetAudiencesAnalytics) | **Get** /v1/audiences/analytics | List audience analytics [**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 +[**GetCampaignGroup**](ManagementApi.md#GetCampaignGroup) | **Get** /v1/campaign_groups/{campaignGroupId} | Get campaign access group +[**GetCampaignGroups**](ManagementApi.md#GetCampaignGroups) | **Get** /v1/campaign_groups | List campaign access groups [**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 @@ -76,6 +90,7 @@ Method | HTTP request | Description [**GetCustomerActivityReportsWithoutTotalCount**](ManagementApi.md#GetCustomerActivityReportsWithoutTotalCount) | **Get** /v1/applications/{applicationId}/customer_activity_reports/no_total | Get Activity Reports for Application Customers [**GetCustomerAnalytics**](ManagementApi.md#GetCustomerAnalytics) | **Get** /v1/applications/{applicationId}/customers/{customerId}/analytics | Get customer's analytics report [**GetCustomerProfile**](ManagementApi.md#GetCustomerProfile) | **Get** /v1/customers/{customerId} | Get customer profile +[**GetCustomerProfileAchievementProgress**](ManagementApi.md#GetCustomerProfileAchievementProgress) | **Get** /v1/applications/{applicationId}/achievement_progress/{integrationId} | List customer achievements [**GetCustomerProfiles**](ManagementApi.md#GetCustomerProfiles) | **Get** /v1/customers/no_total | List customer profiles [**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 @@ -101,6 +116,7 @@ Method | HTTP request | Description [**GetWebhooks**](ManagementApi.md#GetWebhooks) | **Get** /v1/webhooks | List webhooks [**ImportAccountCollection**](ManagementApi.md#ImportAccountCollection) | **Post** /v1/collections/{collectionId}/import | Import data into existing account-level collection [**ImportAllowedList**](ManagementApi.md#ImportAllowedList) | **Post** /v1/attributes/{attributeId}/allowed_list/import | Import allowed values for attribute +[**ImportAudiencesMemberships**](ManagementApi.md#ImportAudiencesMemberships) | **Post** /v1/audiences/{audienceId}/memberships/import | Import audience members [**ImportCollection**](ManagementApi.md#ImportCollection) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/collections/{collectionId}/import | Import data into existing campaign-level collection [**ImportCoupons**](ManagementApi.md#ImportCoupons) | **Post** /v1/applications/{applicationId}/campaigns/{campaignId}/import_coupons | Import coupons [**ImportLoyaltyCards**](ManagementApi.md#ImportLoyaltyCards) | **Post** /v1/loyalty_programs/{loyaltyProgramId}/import_cards | Import loyalty cards @@ -109,6 +125,7 @@ Method | HTTP request | Description [**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 +[**ListAchievements**](ManagementApi.md#ListAchievements) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements [**ListCatalogItems**](ManagementApi.md#ListCatalogItems) | **Get** /v1/catalogs/{catalogId}/items | List items in a catalog [**ListCollections**](ManagementApi.md#ListCollections) | **Get** /v1/applications/{applicationId}/campaigns/{campaignId}/collections | List collections in campaign [**ListCollectionsInApplication**](ManagementApi.md#ListCollectionsInApplication) | **Get** /v1/applications/{applicationId}/collections | List collections in Application @@ -123,6 +140,7 @@ Method | HTTP request | Description [**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 +[**UpdateAchievement**](ManagementApi.md#UpdateAchievement) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements/{achievementId} | Update achievement [**UpdateAdditionalCost**](ManagementApi.md#UpdateAdditionalCost) | **Put** /v1/additional_costs/{additionalCostId} | Update additional cost [**UpdateAttribute**](ManagementApi.md#UpdateAttribute) | **Put** /v1/attributes/{attributeId} | Update custom attribute [**UpdateCampaign**](ManagementApi.md#UpdateCampaign) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId} | Update campaign @@ -131,7 +149,9 @@ Method | HTTP request | Description [**UpdateCouponBatch**](ManagementApi.md#UpdateCouponBatch) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/coupons | Update coupons [**UpdateLoyaltyCard**](ManagementApi.md#UpdateLoyaltyCard) | **Put** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId} | Update loyalty card status [**UpdateReferral**](ManagementApi.md#UpdateReferral) | **Put** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/{referralId} | Update referral +[**UpdateRoleV2**](ManagementApi.md#UpdateRoleV2) | **Put** /v2/roles/{roleId} | Update role [**UpdateStore**](ManagementApi.md#UpdateStore) | **Put** /v1/applications/{applicationId}/stores/{storeId} | Update store +[**UpdateUser**](ManagementApi.md#UpdateUser) | **Put** /v1/users/{userId} | Update user @@ -312,6 +332,52 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## CreateAchievement + +> Achievement CreateAchievement(ctx, applicationId, campaignId).Body(body).Execute() + +Create achievement + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateAchievementRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **body** | [**CreateAchievement**](CreateAchievement.md) | body | + +### Return type + +[**Achievement**](Achievement.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) + + ## CreateAdditionalCost > AccountAdditionalCost CreateAdditionalCost(ctx).Body(body).Execute() @@ -620,6 +686,84 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## CreateInviteEmail + +> NewInviteEmail CreateInviteEmail(ctx).Body(body).Execute() + +Resend invitation email + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateInviteEmailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewInviteEmail**](NewInviteEmail.md) | body | + +### Return type + +[**NewInviteEmail**](NewInviteEmail.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) + + +## CreateInviteV2 + +> User CreateInviteV2(ctx).Body(body).Execute() + +Invite user + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiCreateInviteV2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewInvitation**](NewInvitation.md) | body | + +### Return type + +[**User**](User.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) + + ## CreatePasswordRecoveryEmail > NewPasswordEmail CreatePasswordRecoveryEmail(ctx).Body(body).Execute() @@ -742,6 +886,45 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## DeactivateUserByEmail + +> DeactivateUserByEmail(ctx).Body(body).Execute() + +Deactivate user by email address + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeactivateUserByEmailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DeactivateUserRequest**](DeactivateUserRequest.md) | body | + +### Return type + + (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## DeductLoyaltyCardPoints > DeductLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute() @@ -813,6 +996,53 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +### Return type + + (empty response body) + +### 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) + + +## DeleteAchievement + +> DeleteAchievement(ctx, applicationId, campaignId, achievementId).Execute() + +Delete achievement + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. | +**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteAchievementRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + ### Return type (empty response body) @@ -997,12 +1227,12 @@ Name | Type | Description | Notes **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. | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | - **startsAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | - **startsBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **startsAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **startsBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **expiresAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **expiresBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **batchId** | **string** | Filter results by batches of coupons | **usable** | **string** | - `true`: only coupons where `usageCounter < usageLimit` will be returned. - `false`: only coupons where `usageCounter >= usageLimit` will be returned. | @@ -1165,6 +1395,88 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## DeleteUser + +> DeleteUser(ctx, userId).Execute() + +Delete user + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | The ID of the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + + (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) + + +## DeleteUserByEmail + +> DeleteUserByEmail(ctx).Body(body).Execute() + +Delete user by email address + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiDeleteUserByEmailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**DeleteUserRequest**](DeleteUserRequest.md) | body | + +### Return type + + (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## DestroySession > DestroySession(ctx).Execute() @@ -1184,7 +1496,97 @@ Other parameters are passed through a pointer to a apiDestroySessionRequest stru ### Return type - (empty response body) + (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(ctx, collectionId).Execute() + +Export account-level collection's items + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAccountCollectionItemsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**string** + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/csv + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + +## ExportAchievements + +> string ExportAchievements(ctx, applicationId, campaignId, achievementId).Execute() + +Export achievement customer data + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. | +**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiExportAchievementsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +**string** ### Authorization @@ -1193,18 +1595,18 @@ Other parameters are passed through a pointer to a apiDestroySessionRequest stru ### HTTP request headers - **Content-Type**: Not defined -- **Accept**: Not defined +- **Accept**: application/csv [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -## ExportAccountCollectionItems +## ExportAudiencesMemberships -> string ExportAccountCollectionItems(ctx, collectionId).Execute() +> string ExportAudiencesMemberships(ctx, audienceId).Execute() -Export account-level collection's items +Export audience members @@ -1214,11 +1616,11 @@ Export account-level collection's items Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**collectionId** | **int32** | The ID of the collection. You can get it with the [List collections in account](#operation/listAccountCollections) endpoint. | +**audienceId** | **int32** | The ID of the audience. | ### Other Parameters -Other parameters are passed through a pointer to a apiExportAccountCollectionItemsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiExportAudiencesMembershipsRequest struct via the builder pattern Name | Type | Description | Notes @@ -1317,8 +1719,8 @@ Name | Type | Description | Notes **campaignId** | **float32** | Filter results by campaign. | **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. | **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. | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | @@ -1465,8 +1867,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignId** | **float32** | Filter results by campaign. | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **dateFormat** | **string** | Determines the format of dates in the export document. | ### Return type @@ -1511,7 +1913,7 @@ Other parameters are passed through a pointer to a apiExportLoyaltyBalanceReques Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | + **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | ### Return type @@ -1555,7 +1957,7 @@ Other parameters are passed through a pointer to a apiExportLoyaltyBalancesReque Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | + **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | ### Return type @@ -1599,7 +2001,7 @@ Other parameters are passed through a pointer to a apiExportLoyaltyCardBalancesR Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** It must be an RFC3339 timestamp string. | + **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | ### Return type @@ -1645,8 +2047,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | **dateFormat** | **string** | Determines the format of dates in the export document. | ### Return type @@ -1691,8 +2093,8 @@ Other parameters are passed through a pointer to a apiExportLoyaltyLedgerRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | **dateFormat** | **string** | Determines the format of dates in the export document. | @@ -1785,8 +2187,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **campaignId** | **float32** | Filter results by campaign. | - **createdBefore** | **time.Time** | 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** | **time.Time** | 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. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **usable** | **string** | - `true`, only referrals where `usageCounter < usageLimit` will be returned. - `false`, only referrals where `usageCounter >= usageLimit` will be returned. | **batchId** | **string** | Filter results by batches of referrals | @@ -1834,12 +2236,12 @@ Other parameters are passed through a pointer to a apiGetAccessLogsWithoutTotalC Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | **path** | **string** | Only return results where the request path matches the given regular expression. | **method** | **string** | Only return results where the request method matches the given regular expression. | **status** | **string** | Filter results by HTTP status codes. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -1990,6 +2392,53 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetAchievement + +> Achievement GetAchievement(ctx, applicationId, campaignId, achievementId).Execute() + +Get achievement + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. | +**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAchievementRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + +### Return type + +[**Achievement**](Achievement.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 > AccountAdditionalCost GetAdditionalCost(ctx, additionalCostId).Execute() @@ -2035,7 +2484,7 @@ Name | Type | Description | Notes ## GetAdditionalCosts -> InlineResponse20034 GetAdditionalCosts(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute() +> InlineResponse20036 GetAdditionalCosts(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute() List additional costs @@ -2052,13 +2501,13 @@ Other parameters are passed through a pointer to a apiGetAdditionalCostsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | ### Return type -[**InlineResponse20034**](inline_response_200_34.md) +[**InlineResponse20036**](inline_response_200_36.md) ### Authorization @@ -2093,12 +2542,12 @@ Other parameters are passed through a pointer to a apiGetAllAccessLogsRequest st Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | **path** | **string** | Only return results where the request path matches the given regular expression. | **method** | **string** | Only return results where the request method matches the given regular expression. | **status** | **string** | Filter results by HTTP status codes. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -2122,7 +2571,7 @@ Name | Type | Description | Notes ## GetAllRoles -> InlineResponse20042 GetAllRoles(ctx).Execute() +> InlineResponse20044 GetAllRoles(ctx).Execute() List roles @@ -2139,7 +2588,7 @@ Other parameters are passed through a pointer to a apiGetAllRolesRequest struct ### Return type -[**InlineResponse20042**](inline_response_200_42.md) +[**InlineResponse20044**](inline_response_200_44.md) ### Authorization @@ -2288,7 +2737,7 @@ Name | Type | Description | Notes ## GetApplicationCustomerFriends -> InlineResponse20031 GetApplicationCustomerFriends(ctx, applicationId, integrationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Execute() +> InlineResponse20033 GetApplicationCustomerFriends(ctx, applicationId, integrationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Execute() List friends referred by customer profile @@ -2312,14 +2761,14 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | ### Return type -[**InlineResponse20031**](inline_response_200_31.md) +[**InlineResponse20033**](inline_response_200_33.md) ### Authorization @@ -2360,7 +2809,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **integrationId** | **string** | Filter results performing an exact matching against the profile integration identifier. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -2407,7 +2856,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md) | body | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -2453,7 +2902,7 @@ Other parameters are passed through a pointer to a apiGetApplicationEventTypesRe Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -2499,12 +2948,12 @@ Other parameters are passed through a pointer to a apiGetApplicationEventsWithou Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **type_** | **string** | Comma-separated list of types by which to filter events. Must be exact match(es). | - **createdBefore** | **time.Time** | Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | - **createdAfter** | **time.Time** | Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. | **session** | **string** | Session integration ID filter for events. Must be exact match. | **profile** | **string** | Profile integration ID filter for events. Must be exact match. | **customerName** | **string** | Customer name filter for events. Will match substrings case-insensitively. | @@ -2579,7 +3028,7 @@ Name | Type | Description | Notes ## GetApplicationSessions -> InlineResponse20027 GetApplicationSessions(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).Profile(profile).State(state).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Coupon(coupon).Referral(referral).IntegrationId(integrationId).Execute() +> InlineResponse20027 GetApplicationSessions(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).Profile(profile).State(state).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Coupon(coupon).Referral(referral).IntegrationId(integrationId).StoreIntegrationId(storeIntegrationId).Execute() List Application sessions @@ -2601,16 +3050,17 @@ Other parameters are passed through a pointer to a apiGetApplicationSessionsRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **profile** | **string** | Profile integration ID filter for sessions. Must be exact match. | **state** | **string** | Filter by sessions with this state. Must be exact match. | - **createdBefore** | **time.Time** | Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | - **createdAfter** | **time.Time** | Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. | **coupon** | **string** | Filter by sessions with this coupon. Must be exact match. | **referral** | **string** | Filter by sessions with this referral. Must be exact match. | **integrationId** | **string** | Filter by sessions with this integrationId. Must be exact match. | + **storeIntegrationId** | **string** | The integration ID of the store. You choose this ID when you create a store. | ### Return type @@ -2649,7 +3099,7 @@ Other parameters are passed through a pointer to a apiGetApplicationsRequest str Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -2716,7 +3166,7 @@ Name | Type | Description | Notes ## GetAttributes -> InlineResponse20032 GetAttributes(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Entity(entity).Execute() +> InlineResponse20034 GetAttributes(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Entity(entity).Execute() List custom attributes @@ -2733,13 +3183,60 @@ Other parameters are passed through a pointer to a apiGetAttributesRequest struc Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **entity** | **string** | Returned attributes will be filtered by supplied entity. | ### Return type +[**InlineResponse20034**](inline_response_200_34.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) + + +## GetAudienceMemberships + +> InlineResponse20032 GetAudienceMemberships(ctx, audienceId).PageSize(pageSize).Skip(skip).Sort(sort).ProfileQuery(profileQuery).Execute() + +List audience members + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**audienceId** | **int32** | The ID of the audience. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAudienceMembershipsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **pageSize** | **int32** | The number of items in the response. | [default to 1000] + **skip** | **int32** | The number of items to skip when paging through large result sets. | + **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. | + **profileQuery** | **string** | The filter to select a profile. | + +### Return type + [**InlineResponse20032**](inline_response_200_32.md) ### Authorization @@ -2775,7 +3272,7 @@ Other parameters are passed through a pointer to a apiGetAudiencesRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | @@ -2798,6 +3295,46 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetAudiencesAnalytics + +> InlineResponse20031 GetAudiencesAnalytics(ctx).AudienceIds(audienceIds).Sort(sort).Execute() + +List audience analytics + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetAudiencesAnalyticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **audienceIds** | **string** | The IDs of one or more audiences, separated by commas, by which to filter results. | + **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. | + +### Return type + +[**InlineResponse20031**](inline_response_200_31.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) + + ## GetCampaign > Campaign GetCampaign(ctx, applicationId, campaignId).Execute() @@ -2869,8 +3406,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | **granularity** | **string** | The time interval between the results in the returned time-series. | ### Return type @@ -2916,7 +3453,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CampaignSearch**](CampaignSearch.md) | body | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | @@ -2939,9 +3476,93 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## GetCampaignGroup + +> CampaignGroup GetCampaignGroup(ctx, campaignGroupId).Execute() + +Get campaign access group + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**campaignGroupId** | **int32** | The ID of the campaign access group. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCampaignGroupRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +[**CampaignGroup**](CampaignGroup.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) + + +## GetCampaignGroups + +> InlineResponse20011 GetCampaignGroups(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute() + +List campaign access groups + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCampaignGroupsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **pageSize** | **int32** | The number of items in the response. | [default to 1000] + **skip** | **int32** | The number of items to skip when paging through large result sets. | + **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. | + +### Return type + +[**InlineResponse20011**](inline_response_200_11.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) + + ## GetCampaignTemplates -> InlineResponse20011 GetCampaignTemplates(ctx).PageSize(pageSize).Skip(skip).Sort(sort).State(state).Name(name).Tags(tags).UserId(userId).Execute() +> InlineResponse20012 GetCampaignTemplates(ctx).PageSize(pageSize).Skip(skip).Sort(sort).State(state).Name(name).Tags(tags).UserId(userId).Execute() List campaign templates @@ -2958,7 +3579,7 @@ Other parameters are passed through a pointer to a apiGetCampaignTemplatesReques Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **state** | **string** | Filter results by the state of the campaign template. | @@ -2968,7 +3589,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20011**](inline_response_200_11.md) +[**InlineResponse20012**](inline_response_200_12.md) ### Authorization @@ -3008,14 +3629,14 @@ Other parameters are passed through a pointer to a apiGetCampaignsRequest struct Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | **name** | **string** | Filter results performing case-insensitive matching against the name of the campaign. | **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 | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | - **createdAfter** | **time.Time** | 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. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the campaign creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **campaignGroupId** | **int32** | Filter results to campaigns owned by the specified campaign access group ID. | **templateId** | **int32** | The ID of the Campaign Template this Campaign was created from. | **storeId** | **int32** | Filter results to campaigns linked to the specified store ID. | @@ -3040,7 +3661,7 @@ Name | Type | Description | Notes ## GetChanges -> InlineResponse20040 GetChanges(ctx).PageSize(pageSize).Skip(skip).Sort(sort).ApplicationId(applicationId).EntityPath(entityPath).UserId(userId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).WithTotalResultSize(withTotalResultSize).ManagementKeyId(managementKeyId).IncludeOld(includeOld).Execute() +> InlineResponse20042 GetChanges(ctx).PageSize(pageSize).Skip(skip).Sort(sort).ApplicationId(applicationId).EntityPath(entityPath).UserId(userId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).WithTotalResultSize(withTotalResultSize).ManagementKeyId(managementKeyId).IncludeOld(includeOld).Execute() Get audit logs for an account @@ -3057,21 +3678,21 @@ Other parameters are passed through a pointer to a apiGetChangesRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **applicationId** | **float32** | Filter results by Application ID. | **entityPath** | **string** | Filter results on a case insensitive matching of the url path of the entity | **userId** | **int32** | Filter results by user ID. | - **createdBefore** | **time.Time** | 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** | **time.Time** | 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. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **managementKeyId** | **int32** | Filter results that match the given management key ID. | **includeOld** | **bool** | When this flag is set to false, the state without the change will not be returned. The default value is true. | ### Return type -[**InlineResponse20040**](inline_response_200_40.md) +[**InlineResponse20042**](inline_response_200_42.md) ### Authorization @@ -3136,7 +3757,7 @@ Name | Type | Description | Notes ## GetCollectionItems -> InlineResponse20017 GetCollectionItems(ctx, collectionId).PageSize(pageSize).Skip(skip).Execute() +> InlineResponse20018 GetCollectionItems(ctx, collectionId).PageSize(pageSize).Skip(skip).Execute() Get collection items @@ -3158,12 +3779,12 @@ Other parameters are passed through a pointer to a apiGetCollectionItemsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type -[**InlineResponse20017**](inline_response_200_17.md) +[**InlineResponse20018**](inline_response_200_18.md) ### Authorization @@ -3205,12 +3826,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | @@ -3260,11 +3881,11 @@ Other parameters are passed through a pointer to a apiGetCustomerActivityReportR Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type @@ -3308,10 +3929,10 @@ Other parameters are passed through a pointer to a apiGetCustomerActivityReports Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **rangeStart** | **time.Time** | Only return results from after this timestamp. This must be an RFC3339 timestamp string. | - **rangeEnd** | **time.Time** | Only return results from before this timestamp. This must be an RFC3339 timestamp string. | + **rangeStart** | **time.Time** | Only return results from after this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **rangeEnd** | **time.Time** | Only return results from before this timestamp. **Note:** - This must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **name** | **string** | Only return reports matching the customer name | @@ -3337,11 +3958,59 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetCustomerAnalytics +## GetCustomerAnalytics + +> CustomerAnalytics GetCustomerAnalytics(ctx, applicationId, customerId).PageSize(pageSize).Skip(skip).Sort(sort).Execute() + +Get customer's analytics report + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**customerId** | **int32** | 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. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGetCustomerAnalyticsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **pageSize** | **int32** | The number of items in the response. | [default to 1000] + **skip** | **int32** | The number of items to skip when paging through large result sets. | + **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. | + +### Return type + +[**CustomerAnalytics**](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 -> CustomerAnalytics GetCustomerAnalytics(ctx, applicationId, customerId).PageSize(pageSize).Skip(skip).Sort(sort).Execute() +> CustomerProfile GetCustomerProfile(ctx, customerId).Execute() -Get customer's analytics report +Get customer profile @@ -3351,25 +4020,20 @@ Get customer's analytics report Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | **customerId** | **int32** | 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. | ### Other Parameters -Other parameters are passed through a pointer to a apiGetCustomerAnalyticsRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetCustomerProfileRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] - **skip** | **int32** | The number of items to skip when paging through large result sets. | - **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. | - ### Return type -[**CustomerAnalytics**](CustomerAnalytics.md) +[**CustomerProfile**](CustomerProfile.md) ### Authorization @@ -3385,11 +4049,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetCustomerProfile +## GetCustomerProfileAchievementProgress -> CustomerProfile GetCustomerProfile(ctx, customerId).Execute() +> InlineResponse20047 GetCustomerProfileAchievementProgress(ctx, applicationId, integrationId).PageSize(pageSize).Skip(skip).AchievementId(achievementId).Title(title).Execute() -Get customer profile +List customer achievements @@ -3399,20 +4063,26 @@ Get customer profile Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**customerId** | **int32** | 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. | +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**integrationId** | **string** | The identifier of the profile. | ### Other Parameters -Other parameters are passed through a pointer to a apiGetCustomerProfileRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetCustomerProfileAchievementProgressRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **pageSize** | **int32** | The number of items in the response. | [default to 50] + **skip** | **int32** | The number of items to skip when paging through large result sets. | + **achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. | + **title** | **string** | Filter results by the `title` of an achievement. | + ### Return type -[**CustomerProfile**](CustomerProfile.md) +[**InlineResponse20047**](inline_response_200_47.md) ### Authorization @@ -3447,7 +4117,7 @@ Other parameters are passed through a pointer to a apiGetCustomerProfilesRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **sandbox** | **bool** | Indicates whether you are pointing to a sandbox or Live customer. | [default to false] @@ -3489,7 +4159,7 @@ Other parameters are passed through a pointer to a apiGetCustomersByAttributesRe Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | [**CustomerProfileSearchQuery**](CustomerProfileSearchQuery.md) | body | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **sandbox** | **bool** | Indicates whether you are pointing to a sandbox or Live customer. | [default to false] @@ -3513,7 +4183,7 @@ Name | Type | Description | Notes ## GetEventTypes -> InlineResponse20038 GetEventTypes(ctx).Name(name).IncludeOldVersions(includeOldVersions).PageSize(pageSize).Skip(skip).Sort(sort).Execute() +> InlineResponse20040 GetEventTypes(ctx).Name(name).IncludeOldVersions(includeOldVersions).PageSize(pageSize).Skip(skip).Sort(sort).Execute() List event types @@ -3532,13 +4202,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **name** | **string** | Filter results to event types with the given name. This parameter implies `includeOldVersions`. | **includeOldVersions** | **bool** | Include all versions of every event type. | [default to false] - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | ### Return type -[**InlineResponse20038**](inline_response_200_38.md) +[**InlineResponse20040**](inline_response_200_40.md) ### Authorization @@ -3556,7 +4226,7 @@ Name | Type | Description | Notes ## GetExports -> InlineResponse20041 GetExports(ctx).PageSize(pageSize).Skip(skip).ApplicationId(applicationId).CampaignId(campaignId).Entity(entity).Execute() +> InlineResponse20043 GetExports(ctx).PageSize(pageSize).Skip(skip).ApplicationId(applicationId).CampaignId(campaignId).Entity(entity).Execute() Get exports @@ -3573,7 +4243,7 @@ Other parameters are passed through a pointer to a apiGetExportsRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **applicationId** | **float32** | Filter results by Application ID. | **campaignId** | **int32** | Filter by the campaign ID on which the limit counters are used. | @@ -3581,7 +4251,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20041**](inline_response_200_41.md) +[**InlineResponse20043**](inline_response_200_43.md) ### Authorization @@ -3644,7 +4314,7 @@ Name | Type | Description | Notes ## GetLoyaltyCardTransactionLogs -> InlineResponse20015 GetLoyaltyCardTransactionLogs(ctx, loyaltyProgramId, loyaltyCardId).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).SubledgerId(subledgerId).Execute() +> InlineResponse20016 GetLoyaltyCardTransactionLogs(ctx, loyaltyProgramId, loyaltyCardId).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).SubledgerId(subledgerId).Execute() List card's transactions @@ -3668,15 +4338,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **subledgerId** | **string** | The ID of the subledger by which we filter the data. | ### Return type -[**InlineResponse20015**](inline_response_200_15.md) +[**InlineResponse20016**](inline_response_200_16.md) ### Authorization @@ -3694,7 +4364,7 @@ Name | Type | Description | Notes ## GetLoyaltyCards -> InlineResponse20014 GetLoyaltyCards(ctx, loyaltyProgramId).PageSize(pageSize).Skip(skip).Sort(sort).Identifier(identifier).ProfileId(profileId).Execute() +> InlineResponse20015 GetLoyaltyCards(ctx, loyaltyProgramId).PageSize(pageSize).Skip(skip).Sort(sort).Identifier(identifier).ProfileId(profileId).Execute() List loyalty cards @@ -3716,7 +4386,7 @@ Other parameters are passed through a pointer to a apiGetLoyaltyCardsRequest str Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **identifier** | **string** | Optional query parameter to search cards by identifier. | @@ -3724,7 +4394,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20014**](inline_response_200_14.md) +[**InlineResponse20015**](inline_response_200_15.md) ### Authorization @@ -3799,7 +4469,7 @@ Get loyalty program Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | +**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Other Parameters @@ -3830,7 +4500,7 @@ Name | Type | Description | Notes ## GetLoyaltyProgramTransactions -> InlineResponse20013 GetLoyaltyProgramTransactions(ctx, loyaltyProgramId).LoyaltyTransactionType(loyaltyTransactionType).SubledgerId(subledgerId).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).Execute() +> InlineResponse20014 GetLoyaltyProgramTransactions(ctx, loyaltyProgramId).LoyaltyTransactionType(loyaltyTransactionType).SubledgerId(subledgerId).StartDate(startDate).EndDate(endDate).PageSize(pageSize).Skip(skip).Execute() List loyalty program transactions @@ -3842,7 +4512,7 @@ List loyalty program transactions Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | +**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Other Parameters @@ -3854,14 +4524,14 @@ Name | Type | Description | Notes **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. | **subledgerId** | **string** | The ID of the subledger by which we filter the data. | - **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** It must be an RFC3339 timestamp string. | - **pageSize** | **int32** | The number of items in this response. | [default to 50] + **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | + **pageSize** | **int32** | The number of items in the response. | [default to 50] **skip** | **int32** | The number of items to skip when paging through large result sets. | ### Return type -[**InlineResponse20013**](inline_response_200_13.md) +[**InlineResponse20014**](inline_response_200_14.md) ### Authorization @@ -3879,7 +4549,7 @@ Name | Type | Description | Notes ## GetLoyaltyPrograms -> InlineResponse20012 GetLoyaltyPrograms(ctx).Execute() +> InlineResponse20013 GetLoyaltyPrograms(ctx).Execute() List loyalty programs @@ -3896,7 +4566,7 @@ Other parameters are passed through a pointer to a apiGetLoyaltyProgramsRequest ### Return type -[**InlineResponse20012**](inline_response_200_12.md) +[**InlineResponse20013**](inline_response_200_13.md) ### Authorization @@ -3926,7 +4596,7 @@ Get loyalty program statistics Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | +**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Other Parameters @@ -3981,12 +4651,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | - **createdBefore** | **time.Time** | 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** | **time.Time** | 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. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the referral creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **usable** | **string** | Either \"true\" or \"false\". If \"true\", only referrals where `usageCounter < usageLimit` will be returned, \"false\" will return only referrals where `usageCounter >= usageLimit`. | **advocate** | **string** | Filter results by match with a profile id specified in the referral's AdvocateProfileIntegrationId field | @@ -4023,7 +4693,7 @@ Get role Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | The ID of role. | +**roleId** | **int32** | ID of role. **Note**: To find the ID of a role, use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint. | ### Other Parameters @@ -4125,7 +4795,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | @@ -4237,7 +4907,7 @@ Name | Type | Description | Notes ## GetUsers -> InlineResponse20039 GetUsers(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute() +> InlineResponse20041 GetUsers(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Execute() List users in account @@ -4254,13 +4924,13 @@ Other parameters are passed through a pointer to a apiGetUsersRequest struct via Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | ### Return type -[**InlineResponse20039**](inline_response_200_39.md) +[**InlineResponse20041**](inline_response_200_41.md) ### Authorization @@ -4321,7 +4991,7 @@ Name | Type | Description | Notes ## GetWebhookActivationLogs -> InlineResponse20036 GetWebhookActivationLogs(ctx).PageSize(pageSize).Skip(skip).Sort(sort).IntegrationRequestUuid(integrationRequestUuid).WebhookId(webhookId).ApplicationId(applicationId).CampaignId(campaignId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute() +> InlineResponse20038 GetWebhookActivationLogs(ctx).PageSize(pageSize).Skip(skip).Sort(sort).IntegrationRequestUuid(integrationRequestUuid).WebhookId(webhookId).ApplicationId(applicationId).CampaignId(campaignId).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute() List webhook activation log entries @@ -4338,19 +5008,19 @@ Other parameters are passed through a pointer to a apiGetWebhookActivationLogsRe Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **integrationRequestUuid** | **string** | Filter results by integration request UUID. | **webhookId** | **float32** | Filter results by Webhook. | **applicationId** | **float32** | Filter results by Application ID. | **campaignId** | **float32** | Filter results by campaign. | - **createdBefore** | **time.Time** | Only return events created before this date. You can use any timezone. Talon.One will convert to UTC internally. | - **createdAfter** | **time.Time** | Only return events created after this date. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Only return events created before this date. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Only return events created after this date. You can use any time zone setting. Talon.One will convert to UTC internally. | ### Return type -[**InlineResponse20036**](inline_response_200_36.md) +[**InlineResponse20038**](inline_response_200_38.md) ### Authorization @@ -4368,7 +5038,7 @@ Name | Type | Description | Notes ## GetWebhookLogs -> InlineResponse20037 GetWebhookLogs(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Status(status).WebhookId(webhookId).ApplicationId(applicationId).CampaignId(campaignId).RequestUuid(requestUuid).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute() +> InlineResponse20039 GetWebhookLogs(ctx).PageSize(pageSize).Skip(skip).Sort(sort).Status(status).WebhookId(webhookId).ApplicationId(applicationId).CampaignId(campaignId).RequestUuid(requestUuid).CreatedBefore(createdBefore).CreatedAfter(createdAfter).Execute() List webhook log entries @@ -4385,7 +5055,7 @@ Other parameters are passed through a pointer to a apiGetWebhookLogsRequest stru Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **status** | **string** | Filter results by HTTP status codes. | @@ -4393,12 +5063,12 @@ Name | Type | Description | Notes **applicationId** | **float32** | Filter results by Application ID. | **campaignId** | **float32** | Filter results by campaign. | **requestUuid** | **string** | Filter results by request UUID. | - **createdBefore** | **time.Time** | Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any timezone. Talon.One will convert to UTC internally. | - **createdAfter** | **time.Time** | 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. | + **createdBefore** | **time.Time** | Filter results where request and response times to return entries before parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results where request and response times to return entries after parameter value, expected to be an RFC3339 timestamp string. You can use any time zone setting. Talon.One will convert to UTC internally. | ### Return type -[**InlineResponse20037**](inline_response_200_37.md) +[**InlineResponse20039**](inline_response_200_39.md) ### Authorization @@ -4416,7 +5086,7 @@ Name | Type | Description | Notes ## GetWebhooks -> InlineResponse20035 GetWebhooks(ctx).ApplicationIds(applicationIds).Sort(sort).PageSize(pageSize).Skip(skip).CreationType(creationType).Visibility(visibility).OutgoingIntegrationsTypeId(outgoingIntegrationsTypeId).Title(title).Execute() +> InlineResponse20037 GetWebhooks(ctx).ApplicationIds(applicationIds).Sort(sort).PageSize(pageSize).Skip(skip).CreationType(creationType).Visibility(visibility).OutgoingIntegrationsTypeId(outgoingIntegrationsTypeId).Title(title).Execute() List webhooks @@ -4435,7 +5105,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **applicationIds** | **string** | Filter by one or more Application IDs, separated by a comma. | **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. | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **creationType** | **string** | Filter results by creation type. | **visibility** | **string** | Filter results by visibility. | @@ -4444,7 +5114,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20035**](inline_response_200_35.md) +[**InlineResponse20037**](inline_response_200_37.md) ### Authorization @@ -4484,7 +5154,7 @@ Other parameters are passed through a pointer to a apiImportAccountCollectionReq Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4528,7 +5198,51 @@ Other parameters are passed through a pointer to a apiImportAllowedListRequest s Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | + +### Return type + +[**Import**](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) + + +## ImportAudiencesMemberships + +> Import ImportAudiencesMemberships(ctx, audienceId).UpFile(upFile).Execute() + +Import audience members + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**audienceId** | **int32** | The ID of the audience. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiImportAudiencesMembershipsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4576,7 +5290,7 @@ Name | Type | Description | Notes - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4598,7 +5312,7 @@ Name | Type | Description | Notes ## ImportCoupons -> Import ImportCoupons(ctx, applicationId, campaignId).UpFile(upFile).Execute() +> Import ImportCoupons(ctx, applicationId, campaignId).SkipDuplicates(skipDuplicates).UpFile(upFile).Execute() Import coupons @@ -4622,7 +5336,8 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **skipDuplicates** | **bool** | An indicator of whether to skip duplicate coupon values instead of causing an error. Duplicate values are ignored when `skipDuplicates=true`. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4666,7 +5381,7 @@ Other parameters are passed through a pointer to a apiImportLoyaltyCardsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4700,7 +5415,7 @@ Import customers into loyalty tiers Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | +**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Other Parameters @@ -4710,7 +5425,7 @@ Other parameters are passed through a pointer to a apiImportLoyaltyCustomersTier Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4744,7 +5459,7 @@ Import loyalty points Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**loyaltyProgramId** | **int32** | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | +**loyaltyProgramId** | **int32** | Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | ### Other Parameters @@ -4754,7 +5469,7 @@ Other parameters are passed through a pointer to a apiImportLoyaltyPointsRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4798,7 +5513,7 @@ Other parameters are passed through a pointer to a apiImportPoolGiveawaysRequest Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4844,7 +5559,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **upFile** | **string** | The file with the information about the data that should be imported. | + **upFile** | **string** | The file containing the data that is being imported. | ### Return type @@ -4866,7 +5581,7 @@ Name | Type | Description | Notes ## ListAccountCollections -> InlineResponse20016 ListAccountCollections(ctx).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() +> InlineResponse20017 ListAccountCollections(ctx).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() List collections in account @@ -4883,7 +5598,7 @@ Other parameters are passed through a pointer to a apiListAccountCollectionsRequ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | @@ -4891,7 +5606,55 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20016**](inline_response_200_16.md) +[**InlineResponse20017**](inline_response_200_17.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) + + +## ListAchievements + +> InlineResponse20046 ListAchievements(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Title(title).Execute() + +List achievements + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAchievementsRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **pageSize** | **int32** | The number of items in the response. | [default to 50] + **skip** | **int32** | The number of items to skip when paging through large result sets. | + **title** | **string** | Filter by the display name for the achievement in the campaign manager. **Note**: If no `title` is provided, all the achievements from the campaign are returned. | + +### Return type + +[**InlineResponse20046**](inline_response_200_46.md) ### Authorization @@ -4909,7 +5672,7 @@ Name | Type | Description | Notes ## ListCatalogItems -> InlineResponse20033 ListCatalogItems(ctx, catalogId).PageSize(pageSize).Skip(skip).WithTotalResultSize(withTotalResultSize).Sku(sku).Execute() +> InlineResponse20035 ListCatalogItems(ctx, catalogId).PageSize(pageSize).Skip(skip).WithTotalResultSize(withTotalResultSize).Sku(sku).ProductNames(productNames).Execute() List items in a catalog @@ -4931,14 +5694,15 @@ Other parameters are passed through a pointer to a apiListCatalogItemsRequest st Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | - **sku** | **string** | The SKU of the item. | + **sku** | [**[]string**](string.md) | Filter results by one or more SKUs. Must be exact match. | + **productNames** | [**[]string**](string.md) | Filter results by one or more product names. Must be exact match. | ### Return type -[**InlineResponse20033**](inline_response_200_33.md) +[**InlineResponse20035**](inline_response_200_35.md) ### Authorization @@ -4956,7 +5720,7 @@ Name | Type | Description | Notes ## ListCollections -> InlineResponse20018 ListCollections(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() +> InlineResponse20017 ListCollections(ctx, applicationId, campaignId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() List collections in campaign @@ -4980,7 +5744,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | @@ -4988,7 +5752,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20018**](inline_response_200_18.md) +[**InlineResponse20017**](inline_response_200_17.md) ### Authorization @@ -5006,7 +5770,7 @@ Name | Type | Description | Notes ## ListCollectionsInApplication -> InlineResponse20018 ListCollectionsInApplication(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() +> InlineResponse20017 ListCollectionsInApplication(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() List collections in Application @@ -5028,7 +5792,7 @@ Other parameters are passed through a pointer to a apiListCollectionsInApplicati Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | @@ -5036,7 +5800,7 @@ Name | Type | Description | Notes ### Return type -[**InlineResponse20018**](inline_response_200_18.md) +[**InlineResponse20017**](inline_response_200_17.md) ### Authorization @@ -5054,7 +5818,7 @@ Name | Type | Description | Notes ## ListStores -> InlineResponse20043 ListStores(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).CampaignId(campaignId).Name(name).IntegrationId(integrationId).Execute() +> InlineResponse20045 ListStores(ctx, applicationId).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).CampaignId(campaignId).Name(name).IntegrationId(integrationId).Query(query).Execute() List stores @@ -5076,17 +5840,18 @@ Other parameters are passed through a pointer to a apiListStoresRequest struct v Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | **campaignId** | **float32** | Filter results by campaign. | **name** | **string** | The name of the store. | **integrationId** | **string** | The integration ID of the store. | + **query** | **string** | Filter results by `name` or `integrationId`. | ### Return type -[**InlineResponse20043**](inline_response_200_43.md) +[**InlineResponse20045**](inline_response_200_45.md) ### Authorization @@ -5388,12 +6153,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **body** | **map[string]interface{}** | body | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | @@ -5447,12 +6212,12 @@ Name | Type | Description | Notes **body** | **map[string]interface{}** | body | - **pageSize** | **int32** | The number of items in this response. | [default to 1000] + **pageSize** | **int32** | The number of items in the response. | [default to 1000] **skip** | **int32** | The number of items to skip when paging through large result sets. | **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. | **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. | - **createdBefore** | **time.Time** | Filter results comparing the parameter value, 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** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any timezone. Talon.One will convert to UTC internally. | + **createdBefore** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | + **createdAfter** | **time.Time** | Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the coupon creation timestamp. You can use any time zone setting. Talon.One will convert to UTC internally. | **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. | **usable** | **string** | Either \"true\" or \"false\". If \"true\", only coupons where `usageCounter < usageLimit` will be returned, \"false\" will return only coupons where `usageCounter >= usageLimit`. | **referralId** | **int32** | Filter the results by matching them with the ID of a referral. This filter shows the coupons created by redeeming a referral code. | @@ -5568,6 +6333,54 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## UpdateAchievement + +> Achievement UpdateAchievement(ctx, applicationId, campaignId, achievementId).Body(body).Execute() + +Update achievement + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**applicationId** | **int32** | The ID of the Application. It is displayed in your Talon.One deployment URL. | +**campaignId** | **int32** | The ID of the campaign. It is displayed in your Talon.One deployment URL. | +**achievementId** | **int32** | The ID of the achievement. You can get this ID with the [List achievement](https://docs.talon.one/management-api#tag/Achievements/operation/listAchievements) endpoint. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateAchievementRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **body** | [**UpdateAchievement**](UpdateAchievement.md) | body | + +### Return type + +[**Achievement**](Achievement.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) + + ## UpdateAdditionalCost > AccountAdditionalCost UpdateAdditionalCost(ctx, additionalCostId).Body(body).Execute() @@ -5938,6 +6751,50 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## UpdateRoleV2 + +> RoleV2 UpdateRoleV2(ctx, roleId).Body(body).Execute() + +Update role + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**roleId** | **int32** | The ID of role. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateRoleV2Request struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | **RoleV2Base** | body | + +### Return type + +[**RoleV2**](RoleV2.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) + + ## UpdateStore > Store UpdateStore(ctx, applicationId, storeId).Body(body).Execute() @@ -5983,3 +6840,47 @@ Name | Type | Description | Notes [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +## UpdateUser + +> User UpdateUser(ctx, userId).Body(body).Execute() + +Update user + + + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**userId** | **int32** | The ID of the user. | + +### Other Parameters + +Other parameters are passed through a pointer to a apiUpdateUserRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **body** | [**UpdateUser**](UpdateUser.md) | body | + +### Return type + +[**User**](User.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) + diff --git a/docs/MessageLogEntries.md b/docs/MessageLogEntries.md new file mode 100644 index 00000000..2d2396fe --- /dev/null +++ b/docs/MessageLogEntries.md @@ -0,0 +1,65 @@ +# MessageLogEntries + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextCursor** | Pointer to **string** | The next value in the database. **Note:** If this value is not present, it means that there are no more values in the database for this combination of request parameters. | [optional] +**Data** | Pointer to [**[]MessageLogEntry**](MessageLogEntry.md) | List of message logs. | + +## Methods + +### GetNextCursor + +`func (o *MessageLogEntries) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *MessageLogEntries) GetNextCursorOk() (string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNextCursor + +`func (o *MessageLogEntries) HasNextCursor() bool` + +HasNextCursor returns a boolean if a field has been set. + +### SetNextCursor + +`func (o *MessageLogEntries) SetNextCursor(v string)` + +SetNextCursor gets a reference to the given string and assigns it to the NextCursor field. + +### GetData + +`func (o *MessageLogEntries) GetData() []MessageLogEntry` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *MessageLogEntries) GetDataOk() ([]MessageLogEntry, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasData + +`func (o *MessageLogEntries) HasData() bool` + +HasData returns a boolean if a field has been set. + +### SetData + +`func (o *MessageLogEntries) SetData(v []MessageLogEntry)` + +SetData gets a reference to the given []MessageLogEntry and assigns it to the Data field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageLogEntry.md b/docs/MessageLogEntry.md new file mode 100644 index 00000000..14529b34 --- /dev/null +++ b/docs/MessageLogEntry.md @@ -0,0 +1,325 @@ +# MessageLogEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **string** | Unique identifier of the message. | +**Service** | Pointer to **string** | Name of the service that generated the log entry. | +**ChangeType** | Pointer to **string** | Type of change that triggered the notification. | [optional] +**NotificationId** | Pointer to **int32** | ID of the notification. | [optional] +**NotificationName** | Pointer to **string** | The name of the notification. | [optional] +**Request** | Pointer to [**MessageLogRequest**](MessageLogRequest.md) | | [optional] +**Response** | Pointer to [**MessageLogResponse**](MessageLogResponse.md) | | [optional] +**CreatedAt** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the log entry was created. | +**EntityType** | Pointer to **string** | The entity type the log is related to. | [optional] +**Url** | Pointer to **string** | The target URL of the request. | [optional] +**ApplicationId** | Pointer to **int32** | Identifier of the Application. | [optional] +**LoyaltyProgramId** | Pointer to **int32** | Identifier of the loyalty program. | [optional] + +## Methods + +### GetId + +`func (o *MessageLogEntry) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *MessageLogEntry) GetIdOk() (string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *MessageLogEntry) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *MessageLogEntry) SetId(v string)` + +SetId gets a reference to the given string and assigns it to the Id field. + +### GetService + +`func (o *MessageLogEntry) GetService() string` + +GetService returns the Service field if non-nil, zero value otherwise. + +### GetServiceOk + +`func (o *MessageLogEntry) GetServiceOk() (string, bool)` + +GetServiceOk returns a tuple with the Service field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasService + +`func (o *MessageLogEntry) HasService() bool` + +HasService returns a boolean if a field has been set. + +### SetService + +`func (o *MessageLogEntry) SetService(v string)` + +SetService gets a reference to the given string and assigns it to the Service field. + +### GetChangeType + +`func (o *MessageLogEntry) GetChangeType() string` + +GetChangeType returns the ChangeType field if non-nil, zero value otherwise. + +### GetChangeTypeOk + +`func (o *MessageLogEntry) GetChangeTypeOk() (string, bool)` + +GetChangeTypeOk returns a tuple with the ChangeType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasChangeType + +`func (o *MessageLogEntry) HasChangeType() bool` + +HasChangeType returns a boolean if a field has been set. + +### SetChangeType + +`func (o *MessageLogEntry) SetChangeType(v string)` + +SetChangeType gets a reference to the given string and assigns it to the ChangeType field. + +### GetNotificationId + +`func (o *MessageLogEntry) GetNotificationId() int32` + +GetNotificationId returns the NotificationId field if non-nil, zero value otherwise. + +### GetNotificationIdOk + +`func (o *MessageLogEntry) GetNotificationIdOk() (int32, bool)` + +GetNotificationIdOk returns a tuple with the NotificationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNotificationId + +`func (o *MessageLogEntry) HasNotificationId() bool` + +HasNotificationId returns a boolean if a field has been set. + +### SetNotificationId + +`func (o *MessageLogEntry) SetNotificationId(v int32)` + +SetNotificationId gets a reference to the given int32 and assigns it to the NotificationId field. + +### GetNotificationName + +`func (o *MessageLogEntry) GetNotificationName() string` + +GetNotificationName returns the NotificationName field if non-nil, zero value otherwise. + +### GetNotificationNameOk + +`func (o *MessageLogEntry) GetNotificationNameOk() (string, bool)` + +GetNotificationNameOk returns a tuple with the NotificationName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNotificationName + +`func (o *MessageLogEntry) HasNotificationName() bool` + +HasNotificationName returns a boolean if a field has been set. + +### SetNotificationName + +`func (o *MessageLogEntry) SetNotificationName(v string)` + +SetNotificationName gets a reference to the given string and assigns it to the NotificationName field. + +### GetRequest + +`func (o *MessageLogEntry) GetRequest() MessageLogRequest` + +GetRequest returns the Request field if non-nil, zero value otherwise. + +### GetRequestOk + +`func (o *MessageLogEntry) GetRequestOk() (MessageLogRequest, bool)` + +GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasRequest + +`func (o *MessageLogEntry) HasRequest() bool` + +HasRequest returns a boolean if a field has been set. + +### SetRequest + +`func (o *MessageLogEntry) SetRequest(v MessageLogRequest)` + +SetRequest gets a reference to the given MessageLogRequest and assigns it to the Request field. + +### GetResponse + +`func (o *MessageLogEntry) GetResponse() MessageLogResponse` + +GetResponse returns the Response field if non-nil, zero value otherwise. + +### GetResponseOk + +`func (o *MessageLogEntry) GetResponseOk() (MessageLogResponse, bool)` + +GetResponseOk returns a tuple with the Response field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasResponse + +`func (o *MessageLogEntry) HasResponse() bool` + +HasResponse returns a boolean if a field has been set. + +### SetResponse + +`func (o *MessageLogEntry) SetResponse(v MessageLogResponse)` + +SetResponse gets a reference to the given MessageLogResponse and assigns it to the Response field. + +### GetCreatedAt + +`func (o *MessageLogEntry) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *MessageLogEntry) GetCreatedAtOk() (time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCreatedAt + +`func (o *MessageLogEntry) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAt + +`func (o *MessageLogEntry) SetCreatedAt(v time.Time)` + +SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. + +### GetEntityType + +`func (o *MessageLogEntry) GetEntityType() string` + +GetEntityType returns the EntityType field if non-nil, zero value otherwise. + +### GetEntityTypeOk + +`func (o *MessageLogEntry) GetEntityTypeOk() (string, bool)` + +GetEntityTypeOk returns a tuple with the EntityType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEntityType + +`func (o *MessageLogEntry) HasEntityType() bool` + +HasEntityType returns a boolean if a field has been set. + +### SetEntityType + +`func (o *MessageLogEntry) SetEntityType(v string)` + +SetEntityType gets a reference to the given string and assigns it to the EntityType field. + +### GetUrl + +`func (o *MessageLogEntry) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *MessageLogEntry) GetUrlOk() (string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUrl + +`func (o *MessageLogEntry) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### SetUrl + +`func (o *MessageLogEntry) SetUrl(v string)` + +SetUrl gets a reference to the given string and assigns it to the Url field. + +### GetApplicationId + +`func (o *MessageLogEntry) GetApplicationId() int32` + +GetApplicationId returns the ApplicationId field if non-nil, zero value otherwise. + +### GetApplicationIdOk + +`func (o *MessageLogEntry) GetApplicationIdOk() (int32, bool)` + +GetApplicationIdOk returns a tuple with the ApplicationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasApplicationId + +`func (o *MessageLogEntry) HasApplicationId() bool` + +HasApplicationId returns a boolean if a field has been set. + +### SetApplicationId + +`func (o *MessageLogEntry) SetApplicationId(v int32)` + +SetApplicationId gets a reference to the given int32 and assigns it to the ApplicationId field. + +### GetLoyaltyProgramId + +`func (o *MessageLogEntry) GetLoyaltyProgramId() int32` + +GetLoyaltyProgramId returns the LoyaltyProgramId field if non-nil, zero value otherwise. + +### GetLoyaltyProgramIdOk + +`func (o *MessageLogEntry) GetLoyaltyProgramIdOk() (int32, bool)` + +GetLoyaltyProgramIdOk returns a tuple with the LoyaltyProgramId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasLoyaltyProgramId + +`func (o *MessageLogEntry) HasLoyaltyProgramId() bool` + +HasLoyaltyProgramId returns a boolean if a field has been set. + +### SetLoyaltyProgramId + +`func (o *MessageLogEntry) SetLoyaltyProgramId(v int32)` + +SetLoyaltyProgramId gets a reference to the given int32 and assigns it to the LoyaltyProgramId field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageLogRequest.md b/docs/MessageLogRequest.md new file mode 100644 index 00000000..3d9f0fb5 --- /dev/null +++ b/docs/MessageLogRequest.md @@ -0,0 +1,65 @@ +# MessageLogRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the request was made. | +**Request** | Pointer to **string** | Raw request data. | + +## Methods + +### GetCreatedAt + +`func (o *MessageLogRequest) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *MessageLogRequest) GetCreatedAtOk() (time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCreatedAt + +`func (o *MessageLogRequest) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAt + +`func (o *MessageLogRequest) SetCreatedAt(v time.Time)` + +SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. + +### GetRequest + +`func (o *MessageLogRequest) GetRequest() string` + +GetRequest returns the Request field if non-nil, zero value otherwise. + +### GetRequestOk + +`func (o *MessageLogRequest) GetRequestOk() (string, bool)` + +GetRequestOk returns a tuple with the Request field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasRequest + +`func (o *MessageLogRequest) HasRequest() bool` + +HasRequest returns a boolean if a field has been set. + +### SetRequest + +`func (o *MessageLogRequest) SetRequest(v string)` + +SetRequest gets a reference to the given string and assigns it to the Request field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/MessageLogResponse.md b/docs/MessageLogResponse.md new file mode 100644 index 00000000..34b87163 --- /dev/null +++ b/docs/MessageLogResponse.md @@ -0,0 +1,91 @@ +# MessageLogResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the response was received. | +**Response** | Pointer to **string** | Raw response data. | +**Status** | Pointer to **int32** | HTTP status code of the response. | + +## Methods + +### GetCreatedAt + +`func (o *MessageLogResponse) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *MessageLogResponse) GetCreatedAtOk() (time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasCreatedAt + +`func (o *MessageLogResponse) HasCreatedAt() bool` + +HasCreatedAt returns a boolean if a field has been set. + +### SetCreatedAt + +`func (o *MessageLogResponse) SetCreatedAt(v time.Time)` + +SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field. + +### GetResponse + +`func (o *MessageLogResponse) GetResponse() string` + +GetResponse returns the Response field if non-nil, zero value otherwise. + +### GetResponseOk + +`func (o *MessageLogResponse) GetResponseOk() (string, bool)` + +GetResponseOk returns a tuple with the Response field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasResponse + +`func (o *MessageLogResponse) HasResponse() bool` + +HasResponse returns a boolean if a field has been set. + +### SetResponse + +`func (o *MessageLogResponse) SetResponse(v string)` + +SetResponse gets a reference to the given string and assigns it to the Response field. + +### GetStatus + +`func (o *MessageLogResponse) GetStatus() int32` + +GetStatus returns the Status field if non-nil, zero value otherwise. + +### GetStatusOk + +`func (o *MessageLogResponse) GetStatusOk() (int32, bool)` + +GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasStatus + +`func (o *MessageLogResponse) HasStatus() bool` + +HasStatus returns a boolean if a field has been set. + +### SetStatus + +`func (o *MessageLogResponse) SetStatus(v int32)` + +SetStatus gets a reference to the given int32 and assigns it to the Status field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewAccountSignUp.md b/docs/NewAccountSignUp.md index 87cd7cf8..446d3ff1 100644 --- a/docs/NewAccountSignUp.md +++ b/docs/NewAccountSignUp.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | The email address associated with your account. | +**Email** | Pointer to **string** | The email address associated with the user profile. | **Password** | Pointer to **string** | The password for your account. | **CompanyName** | Pointer to **string** | | diff --git a/docs/NewApplicationApiKey.md b/docs/NewApplicationApiKey.md index 7e27ebb7..2b611ce5 100644 --- a/docs/NewApplicationApiKey.md +++ b/docs/NewApplicationApiKey.md @@ -4,9 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Title** | Pointer to **string** | Title for API Key. | -**Expires** | Pointer to [**time.Time**](time.Time.md) | The date the API key expired. | +**Title** | Pointer to **string** | Title of the API key. | +**Expires** | Pointer to [**time.Time**](time.Time.md) | The date the API key expires. | **Platform** | Pointer to **string** | The third-party platform the API key is valid for. Use `none` for a generic API key to be used from your own integration layer. | [optional] +**Type** | Pointer to **string** | The API key type. Can be empty or `staging`. Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. | [optional] +**TimeOffset** | Pointer to **int32** | A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. | [optional] **Id** | Pointer to **int32** | ID of the API Key. | **CreatedBy** | Pointer to **int32** | ID of user who created. | **AccountID** | Pointer to **int32** | ID of account the key is used for. | @@ -91,6 +93,56 @@ HasPlatform returns a boolean if a field has been set. SetPlatform gets a reference to the given string and assigns it to the Platform field. +### GetType + +`func (o *NewApplicationApiKey) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NewApplicationApiKey) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *NewApplicationApiKey) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *NewApplicationApiKey) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetTimeOffset + +`func (o *NewApplicationApiKey) GetTimeOffset() int32` + +GetTimeOffset returns the TimeOffset field if non-nil, zero value otherwise. + +### GetTimeOffsetOk + +`func (o *NewApplicationApiKey) GetTimeOffsetOk() (int32, bool)` + +GetTimeOffsetOk returns a tuple with the TimeOffset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTimeOffset + +`func (o *NewApplicationApiKey) HasTimeOffset() bool` + +HasTimeOffset returns a boolean if a field has been set. + +### SetTimeOffset + +`func (o *NewApplicationApiKey) SetTimeOffset(v int32)` + +SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. + ### GetId `func (o *NewApplicationApiKey) GetId() int32` diff --git a/docs/NewCampaign.md b/docs/NewCampaign.md index 28e261f5..5460f49b 100644 --- a/docs/NewCampaign.md +++ b/docs/NewCampaign.md @@ -17,9 +17,9 @@ Name | Type | Description | Notes **ReferralSettings** | Pointer to [**CodeGeneratorSettings**](CodeGeneratorSettings.md) | | [optional] **Limits** | Pointer to [**[]LimitConfig**](LimitConfig.md) | The set of [budget limits](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-budgets) for this campaign. | **CampaignGroups** | Pointer to **[]int32** | The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. | [optional] -**EvaluationGroupId** | Pointer to **int32** | The ID of the campaign evaluation group the campaign belongs to. | [optional] **Type** | Pointer to **string** | The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. | [optional] [default to TYPE_ADVANCED] **LinkedStoreIds** | Pointer to **[]int32** | A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. | [optional] +**EvaluationGroupId** | Pointer to **int32** | The ID of the campaign evaluation group the campaign belongs to. | [optional] ## Methods @@ -348,31 +348,6 @@ HasCampaignGroups returns a boolean if a field has been set. SetCampaignGroups gets a reference to the given []int32 and assigns it to the CampaignGroups field. -### GetEvaluationGroupId - -`func (o *NewCampaign) GetEvaluationGroupId() int32` - -GetEvaluationGroupId returns the EvaluationGroupId field if non-nil, zero value otherwise. - -### GetEvaluationGroupIdOk - -`func (o *NewCampaign) GetEvaluationGroupIdOk() (int32, bool)` - -GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasEvaluationGroupId - -`func (o *NewCampaign) HasEvaluationGroupId() bool` - -HasEvaluationGroupId returns a boolean if a field has been set. - -### SetEvaluationGroupId - -`func (o *NewCampaign) SetEvaluationGroupId(v int32)` - -SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. - ### GetType `func (o *NewCampaign) GetType() string` @@ -423,6 +398,31 @@ HasLinkedStoreIds returns a boolean if a field has been set. SetLinkedStoreIds gets a reference to the given []int32 and assigns it to the LinkedStoreIds field. +### GetEvaluationGroupId + +`func (o *NewCampaign) GetEvaluationGroupId() int32` + +GetEvaluationGroupId returns the EvaluationGroupId field if non-nil, zero value otherwise. + +### GetEvaluationGroupIdOk + +`func (o *NewCampaign) GetEvaluationGroupIdOk() (int32, bool)` + +GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEvaluationGroupId + +`func (o *NewCampaign) HasEvaluationGroupId() bool` + +HasEvaluationGroupId returns a boolean if a field has been set. + +### SetEvaluationGroupId + +`func (o *NewCampaign) SetEvaluationGroupId(v int32)` + +SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NewCampaignGroup.md b/docs/NewCampaignGroup.md index cb7907d8..5336ffc5 100644 --- a/docs/NewCampaignGroup.md +++ b/docs/NewCampaignGroup.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name of this campaign access group. | +**Name** | Pointer to **string** | The name of the campaign access group. | **Description** | Pointer to **string** | A longer description of the campaign access group. | [optional] **SubscribedApplicationsIds** | Pointer to **[]int32** | A list of IDs of the Applications that this campaign access group is enabled for. | [optional] **CampaignIds** | Pointer to **[]int32** | A list of IDs of the campaigns that are part of the campaign access group. | [optional] diff --git a/docs/NewCoupons.md b/docs/NewCoupons.md index e4e7d562..89329548 100644 --- a/docs/NewCoupons.md +++ b/docs/NewCoupons.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **RecipientIntegrationId** | Pointer to **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **ValidCharacters** | Pointer to **[]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** | Pointer to **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** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] ## Methods diff --git a/docs/NewCustomerSessionV2.md b/docs/NewCustomerSessionV2.md index 7270d062..6de3eb9f 100644 --- a/docs/NewCustomerSessionV2.md +++ b/docs/NewCustomerSessionV2.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **EvaluableCampaignIds** | Pointer to **[]int32** | 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** | Pointer to **[]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** | Pointer to **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** | Pointer to **[]string** | Any loyalty cards used. | [optional] +**LoyaltyCards** | Pointer to **[]string** | Identifier of a loyalty card. | [optional] **State** | Pointer to **string** | Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). | [optional] [default to STATE_OPEN] **CartItems** | Pointer to [**[]CartItem**](CartItem.md) | The items to add to this session. **Do not exceed 1000 items** and ensure the sum of all cart item's `quantity` **does not exceed 10.000** per request. | [optional] **AdditionalCosts** | Pointer to [**map[string]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] diff --git a/docs/NewInvitation.md b/docs/NewInvitation.md index 2b2751f6..acb4193d 100644 --- a/docs/NewInvitation.md +++ b/docs/NewInvitation.md @@ -4,11 +4,11 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | Name of the user being invited. | [optional] -**Email** | Pointer to **string** | | -**Acl** | Pointer to **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. Use one of the following: - normal user: `{\"Role\": 0}` - admin: `{\"Role\": 127}` | [optional] -**IsAdmin** | Pointer to **bool** | An indication of whether the user has admin permissions. We recommend using this flag over using the `acl` with value `{\"Role\": 127}`. | [optional] -**Roles** | Pointer to **[]int32** | An array of role IDs to assign to the new user. | [optional] +**Name** | Pointer to **string** | Name of the user. | [optional] +**Email** | Pointer to **string** | Email address of the user. | +**IsAdmin** | Pointer to **bool** | Indicates whether the user is an `admin`. | [optional] +**Roles** | Pointer to **[]int32** | A list of the IDs of the roles assigned to the user. | [optional] +**Acl** | Pointer to **string** | Indicates the access level of the user. | [optional] ## Methods @@ -62,31 +62,6 @@ HasEmail returns a boolean if a field has been set. SetEmail gets a reference to the given string and assigns it to the Email field. -### GetAcl - -`func (o *NewInvitation) GetAcl() string` - -GetAcl returns the Acl field if non-nil, zero value otherwise. - -### GetAclOk - -`func (o *NewInvitation) GetAclOk() (string, bool)` - -GetAclOk returns a tuple with the Acl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasAcl - -`func (o *NewInvitation) HasAcl() bool` - -HasAcl returns a boolean if a field has been set. - -### SetAcl - -`func (o *NewInvitation) SetAcl(v string)` - -SetAcl gets a reference to the given string and assigns it to the Acl field. - ### GetIsAdmin `func (o *NewInvitation) GetIsAdmin() bool` @@ -137,6 +112,31 @@ HasRoles returns a boolean if a field has been set. SetRoles gets a reference to the given []int32 and assigns it to the Roles field. +### GetAcl + +`func (o *NewInvitation) GetAcl() string` + +GetAcl returns the Acl field if non-nil, zero value otherwise. + +### GetAclOk + +`func (o *NewInvitation) GetAclOk() (string, bool)` + +GetAclOk returns a tuple with the Acl field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasAcl + +`func (o *NewInvitation) HasAcl() bool` + +HasAcl returns a boolean if a field has been set. + +### SetAcl + +`func (o *NewInvitation) SetAcl(v string)` + +SetAcl gets a reference to the given string and assigns it to the Acl field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NewInviteEmail.md b/docs/NewInviteEmail.md index 8456c94a..f0565110 100644 --- a/docs/NewInviteEmail.md +++ b/docs/NewInviteEmail.md @@ -4,8 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | | -**Token** | Pointer to **string** | | +**Email** | Pointer to **string** | Email address of the user. | +**Token** | Pointer to **string** | Invitation token of the user. | ## Methods diff --git a/docs/NewLoyaltyProgram.md b/docs/NewLoyaltyProgram.md index 5e08316c..d6b1e3e6 100644 --- a/docs/NewLoyaltyProgram.md +++ b/docs/NewLoyaltyProgram.md @@ -12,8 +12,10 @@ Name | Type | Description | Notes **AllowSubledger** | Pointer to **bool** | Indicates if this program supports subledgers inside the program. | **UsersPerCardLimit** | Pointer to **int32** | 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** | Pointer to **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | -**TiersExpireIn** | Pointer to **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**TiersExpirationPolicy** | Pointer to **string** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] +**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] **TiersDowngradePolicy** | Pointer to **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] +**ProgramJoinPolicy** | Pointer to **string** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] **Name** | Pointer to **string** | The internal name for the Loyalty Program. This is an immutable value. | **Tiers** | Pointer to [**[]NewLoyaltyTier**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] **Timezone** | Pointer to **string** | A string containing an IANA timezone descriptor. | @@ -221,6 +223,31 @@ HasSandbox returns a boolean if a field has been set. SetSandbox gets a reference to the given bool and assigns it to the Sandbox field. +### GetTiersExpirationPolicy + +`func (o *NewLoyaltyProgram) GetTiersExpirationPolicy() string` + +GetTiersExpirationPolicy returns the TiersExpirationPolicy field if non-nil, zero value otherwise. + +### GetTiersExpirationPolicyOk + +`func (o *NewLoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool)` + +GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTiersExpirationPolicy + +`func (o *NewLoyaltyProgram) HasTiersExpirationPolicy() bool` + +HasTiersExpirationPolicy returns a boolean if a field has been set. + +### SetTiersExpirationPolicy + +`func (o *NewLoyaltyProgram) SetTiersExpirationPolicy(v string)` + +SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. + ### GetTiersExpireIn `func (o *NewLoyaltyProgram) GetTiersExpireIn() string` @@ -271,6 +298,31 @@ HasTiersDowngradePolicy returns a boolean if a field has been set. SetTiersDowngradePolicy gets a reference to the given string and assigns it to the TiersDowngradePolicy field. +### GetProgramJoinPolicy + +`func (o *NewLoyaltyProgram) GetProgramJoinPolicy() string` + +GetProgramJoinPolicy returns the ProgramJoinPolicy field if non-nil, zero value otherwise. + +### GetProgramJoinPolicyOk + +`func (o *NewLoyaltyProgram) GetProgramJoinPolicyOk() (string, bool)` + +GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgramJoinPolicy + +`func (o *NewLoyaltyProgram) HasProgramJoinPolicy() bool` + +HasProgramJoinPolicy returns a boolean if a field has been set. + +### SetProgramJoinPolicy + +`func (o *NewLoyaltyProgram) SetProgramJoinPolicy(v string)` + +SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. + ### GetName `func (o *NewLoyaltyProgram) GetName() string` diff --git a/docs/NewNotificationTest.md b/docs/NewNotificationTest.md new file mode 100644 index 00000000..791010ea --- /dev/null +++ b/docs/NewNotificationTest.md @@ -0,0 +1,169 @@ +# NewNotificationTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | Pointer to **string** | The notification type. | +**QueryParams** | Pointer to **map[string]string** | Array of query parameters. | [optional] +**Headers** | Pointer to **map[string]string** | List of API HTTP headers for the given webhook-based notification. | [optional] +**Verb** | Pointer to **string** | API method for this notification. | +**Url** | Pointer to **string** | API URL for the given notification. | +**Payload** | Pointer to **string** | API payload of this notification. | + +## Methods + +### GetType + +`func (o *NewNotificationTest) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *NewNotificationTest) GetTypeOk() (string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasType + +`func (o *NewNotificationTest) HasType() bool` + +HasType returns a boolean if a field has been set. + +### SetType + +`func (o *NewNotificationTest) SetType(v string)` + +SetType gets a reference to the given string and assigns it to the Type field. + +### GetQueryParams + +`func (o *NewNotificationTest) GetQueryParams() map[string]string` + +GetQueryParams returns the QueryParams field if non-nil, zero value otherwise. + +### GetQueryParamsOk + +`func (o *NewNotificationTest) GetQueryParamsOk() (map[string]string, bool)` + +GetQueryParamsOk returns a tuple with the QueryParams field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasQueryParams + +`func (o *NewNotificationTest) HasQueryParams() bool` + +HasQueryParams returns a boolean if a field has been set. + +### SetQueryParams + +`func (o *NewNotificationTest) SetQueryParams(v map[string]string)` + +SetQueryParams gets a reference to the given map[string]string and assigns it to the QueryParams field. + +### GetHeaders + +`func (o *NewNotificationTest) GetHeaders() map[string]string` + +GetHeaders returns the Headers field if non-nil, zero value otherwise. + +### GetHeadersOk + +`func (o *NewNotificationTest) GetHeadersOk() (map[string]string, bool)` + +GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHeaders + +`func (o *NewNotificationTest) HasHeaders() bool` + +HasHeaders returns a boolean if a field has been set. + +### SetHeaders + +`func (o *NewNotificationTest) SetHeaders(v map[string]string)` + +SetHeaders gets a reference to the given map[string]string and assigns it to the Headers field. + +### GetVerb + +`func (o *NewNotificationTest) GetVerb() string` + +GetVerb returns the Verb field if non-nil, zero value otherwise. + +### GetVerbOk + +`func (o *NewNotificationTest) GetVerbOk() (string, bool)` + +GetVerbOk returns a tuple with the Verb field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasVerb + +`func (o *NewNotificationTest) HasVerb() bool` + +HasVerb returns a boolean if a field has been set. + +### SetVerb + +`func (o *NewNotificationTest) SetVerb(v string)` + +SetVerb gets a reference to the given string and assigns it to the Verb field. + +### GetUrl + +`func (o *NewNotificationTest) GetUrl() string` + +GetUrl returns the Url field if non-nil, zero value otherwise. + +### GetUrlOk + +`func (o *NewNotificationTest) GetUrlOk() (string, bool)` + +GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUrl + +`func (o *NewNotificationTest) HasUrl() bool` + +HasUrl returns a boolean if a field has been set. + +### SetUrl + +`func (o *NewNotificationTest) SetUrl(v string)` + +SetUrl gets a reference to the given string and assigns it to the Url field. + +### GetPayload + +`func (o *NewNotificationTest) GetPayload() string` + +GetPayload returns the Payload field if non-nil, zero value otherwise. + +### GetPayloadOk + +`func (o *NewNotificationTest) GetPayloadOk() (string, bool)` + +GetPayloadOk returns a tuple with the Payload field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPayload + +`func (o *NewNotificationTest) HasPayload() bool` + +HasPayload returns a boolean if a field has been set. + +### SetPayload + +`func (o *NewNotificationTest) SetPayload(v string)` + +SetPayload gets a reference to the given string and assigns it to the Payload field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NewPicklist.md b/docs/NewPicklist.md index 43649ca9..913ab39c 100644 --- a/docs/NewPicklist.md +++ b/docs/NewPicklist.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | Pointer to **string** | The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. | +**Type** | Pointer to **string** | The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string. | **Values** | Pointer to **[]string** | The list of allowed values provided by this picklist. | ## Methods diff --git a/docs/NewRoleV2.md b/docs/NewRoleV2.md index 0ae0c179..2f538523 100644 --- a/docs/NewRoleV2.md +++ b/docs/NewRoleV2.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | Name of the role. | **Description** | Pointer to **string** | Description of the role. | **Permissions** | Pointer to [**RoleV2Permissions**](RoleV2Permissions.md) | | [optional] -**Members** | Pointer to **[]int32** | A list of user identifiers the role is assigned to. | [optional] +**Members** | Pointer to **[]int32** | A list of user IDs the role is assigned to. | [optional] ## Methods diff --git a/docs/NewStore.md b/docs/NewStore.md index a2d375ed..6d10d3dc 100644 --- a/docs/NewStore.md +++ b/docs/NewStore.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | The name of the store. | **Description** | Pointer to **string** | The description of the store. | **Attributes** | Pointer to [**map[string]interface{}**](.md) | The attributes of the store. | [optional] -**IntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. | +**IntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. **Note**: You cannot edit the `integrationId` after the store has been created. | ## Methods diff --git a/docs/NewUser.md b/docs/NewUser.md index 295528eb..cfc29c1d 100644 --- a/docs/NewUser.md +++ b/docs/NewUser.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Email** | Pointer to **string** | The email address associated with your account. | +**Email** | Pointer to **string** | The email address associated with the user profile. | **Password** | Pointer to **string** | The password for your account. | **Name** | Pointer to **string** | Your name. | [optional] **InviteToken** | Pointer to **string** | | diff --git a/docs/NotificationListItem.md b/docs/NotificationListItem.md new file mode 100644 index 00000000..3a177570 --- /dev/null +++ b/docs/NotificationListItem.md @@ -0,0 +1,117 @@ +# NotificationListItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NotificationId** | Pointer to **int32** | The ID of the notification. | +**NotificationName** | Pointer to **string** | The name of the notification. | +**EntityId** | Pointer to **int32** | The ID of the entity to which this notification belongs. For example, in case of a loyalty notification, this value is the ID of the loyalty program. | +**Enabled** | Pointer to **bool** | Indicates whether the notification is activated. | + +## Methods + +### GetNotificationId + +`func (o *NotificationListItem) GetNotificationId() int32` + +GetNotificationId returns the NotificationId field if non-nil, zero value otherwise. + +### GetNotificationIdOk + +`func (o *NotificationListItem) GetNotificationIdOk() (int32, bool)` + +GetNotificationIdOk returns a tuple with the NotificationId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNotificationId + +`func (o *NotificationListItem) HasNotificationId() bool` + +HasNotificationId returns a boolean if a field has been set. + +### SetNotificationId + +`func (o *NotificationListItem) SetNotificationId(v int32)` + +SetNotificationId gets a reference to the given int32 and assigns it to the NotificationId field. + +### GetNotificationName + +`func (o *NotificationListItem) GetNotificationName() string` + +GetNotificationName returns the NotificationName field if non-nil, zero value otherwise. + +### GetNotificationNameOk + +`func (o *NotificationListItem) GetNotificationNameOk() (string, bool)` + +GetNotificationNameOk returns a tuple with the NotificationName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasNotificationName + +`func (o *NotificationListItem) HasNotificationName() bool` + +HasNotificationName returns a boolean if a field has been set. + +### SetNotificationName + +`func (o *NotificationListItem) SetNotificationName(v string)` + +SetNotificationName gets a reference to the given string and assigns it to the NotificationName field. + +### GetEntityId + +`func (o *NotificationListItem) GetEntityId() int32` + +GetEntityId returns the EntityId field if non-nil, zero value otherwise. + +### GetEntityIdOk + +`func (o *NotificationListItem) GetEntityIdOk() (int32, bool)` + +GetEntityIdOk returns a tuple with the EntityId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEntityId + +`func (o *NotificationListItem) HasEntityId() bool` + +HasEntityId returns a boolean if a field has been set. + +### SetEntityId + +`func (o *NotificationListItem) SetEntityId(v int32)` + +SetEntityId gets a reference to the given int32 and assigns it to the EntityId field. + +### GetEnabled + +`func (o *NotificationListItem) GetEnabled() bool` + +GetEnabled returns the Enabled field if non-nil, zero value otherwise. + +### GetEnabledOk + +`func (o *NotificationListItem) GetEnabledOk() (bool, bool)` + +GetEnabledOk returns a tuple with the Enabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEnabled + +`func (o *NotificationListItem) HasEnabled() bool` + +HasEnabled returns a boolean if a field has been set. + +### SetEnabled + +`func (o *NotificationListItem) SetEnabled(v bool)` + +SetEnabled gets a reference to the given bool and assigns it to the Enabled field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/NotificationTest.md b/docs/NotificationTest.md new file mode 100644 index 00000000..ee63e130 --- /dev/null +++ b/docs/NotificationTest.md @@ -0,0 +1,65 @@ +# NotificationTest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HttpResponse** | Pointer to **string** | The returned http response. | +**HttpStatus** | Pointer to **int32** | The returned http status code. | + +## Methods + +### GetHttpResponse + +`func (o *NotificationTest) GetHttpResponse() string` + +GetHttpResponse returns the HttpResponse field if non-nil, zero value otherwise. + +### GetHttpResponseOk + +`func (o *NotificationTest) GetHttpResponseOk() (string, bool)` + +GetHttpResponseOk returns a tuple with the HttpResponse field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHttpResponse + +`func (o *NotificationTest) HasHttpResponse() bool` + +HasHttpResponse returns a boolean if a field has been set. + +### SetHttpResponse + +`func (o *NotificationTest) SetHttpResponse(v string)` + +SetHttpResponse gets a reference to the given string and assigns it to the HttpResponse field. + +### GetHttpStatus + +`func (o *NotificationTest) GetHttpStatus() int32` + +GetHttpStatus returns the HttpStatus field if non-nil, zero value otherwise. + +### GetHttpStatusOk + +`func (o *NotificationTest) GetHttpStatusOk() (int32, bool)` + +GetHttpStatusOk returns a tuple with the HttpStatus field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHttpStatus + +`func (o *NotificationTest) HasHttpStatus() bool` + +HasHttpStatus returns a boolean if a field has been set. + +### SetHttpStatus + +`func (o *NotificationTest) SetHttpStatus(v int32)` + +SetHttpStatus gets a reference to the given int32 and assigns it to the HttpStatus field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PatchItemCatalogAction.md b/docs/PatchItemCatalogAction.md index a7f6c3bb..54c30647 100644 --- a/docs/PatchItemCatalogAction.md +++ b/docs/PatchItemCatalogAction.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Sku** | Pointer to **string** | The unique SKU of the item to patch. | **Price** | Pointer to **float32** | Price of the item. | [optional] **Attributes** | Pointer to [**map[string]interface{}**](.md) | The attributes of the item to patch. | [optional] +**Product** | Pointer to [**Product**](Product.md) | | [optional] **CreateIfNotExists** | Pointer to **bool** | Indicates whether to create an item if the SKU does not exist. | [optional] [default to false] ## Methods @@ -86,6 +87,31 @@ HasAttributes returns a boolean if a field has been set. SetAttributes gets a reference to the given map[string]interface{} and assigns it to the Attributes field. +### GetProduct + +`func (o *PatchItemCatalogAction) GetProduct() Product` + +GetProduct returns the Product field if non-nil, zero value otherwise. + +### GetProductOk + +`func (o *PatchItemCatalogAction) GetProductOk() (Product, bool)` + +GetProductOk returns a tuple with the Product field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProduct + +`func (o *PatchItemCatalogAction) HasProduct() bool` + +HasProduct returns a boolean if a field has been set. + +### SetProduct + +`func (o *PatchItemCatalogAction) SetProduct(v Product)` + +SetProduct gets a reference to the given Product and assigns it to the Product field. + ### GetCreateIfNotExists `func (o *PatchItemCatalogAction) GetCreateIfNotExists() bool` diff --git a/docs/PendingPointsNotificationPolicy.md b/docs/PendingPointsNotificationPolicy.md index cfadbeaa..b727b8d9 100644 --- a/docs/PendingPointsNotificationPolicy.md +++ b/docs/PendingPointsNotificationPolicy.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | Notification name. | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] ## Methods @@ -33,6 +34,31 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. +### GetBatchingEnabled + +`func (o *PendingPointsNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *PendingPointsNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *PendingPointsNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *PendingPointsNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Picklist.md b/docs/Picklist.md index 0d780fae..a912cc7f 100644 --- a/docs/Picklist.md +++ b/docs/Picklist.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Id** | Pointer to **int32** | Internal ID of this entity. | **Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. | -**Type** | Pointer to **string** | The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. | +**Type** | Pointer to **string** | The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string. | **Values** | Pointer to **[]string** | The list of allowed values provided by this picklist. | **ModifiedBy** | Pointer to **int32** | ID of the user who last updated this effect if available. | [optional] **CreatedBy** | Pointer to **int32** | ID of the user who created this effect. | diff --git a/docs/Product.md b/docs/Product.md new file mode 100644 index 00000000..10bdb9c6 --- /dev/null +++ b/docs/Product.md @@ -0,0 +1,39 @@ +# Product + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The name of the product. | + +## Methods + +### GetName + +`func (o *Product) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *Product) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *Product) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *Product) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RoleV2.md b/docs/RoleV2.md index a35c64b2..310ec8cf 100644 --- a/docs/RoleV2.md +++ b/docs/RoleV2.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | Name of the role. | [optional] **Description** | Pointer to **string** | Description of the role. | [optional] **Permissions** | Pointer to [**RoleV2Permissions**](RoleV2Permissions.md) | | [optional] -**Members** | Pointer to **[]int32** | A list of user identifiers the role is assigned to. | [optional] +**Members** | Pointer to **[]int32** | A list of user IDs the role is assigned to. | [optional] ## Methods diff --git a/docs/RoleV2Base.md b/docs/RoleV2Base.md index b2be1588..2ffc84c9 100644 --- a/docs/RoleV2Base.md +++ b/docs/RoleV2Base.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | Name of the role. | [optional] **Description** | Pointer to **string** | Description of the role. | [optional] **Permissions** | Pointer to [**RoleV2Permissions**](RoleV2Permissions.md) | | [optional] -**Members** | Pointer to **[]int32** | A list of user identifiers the role is assigned to. | [optional] +**Members** | Pointer to **[]int32** | A list of user IDs the role is assigned to. | [optional] ## Methods diff --git a/docs/RoleV2Permissions.md b/docs/RoleV2Permissions.md index 9198df09..8937d9a1 100644 --- a/docs/RoleV2Permissions.md +++ b/docs/RoleV2Permissions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**PermissionSets** | Pointer to [**[]RoleV2PermissionSet**](RoleV2PermissionSet.md) | List of grouped logical operations to use as a reference in the roles section. Each group of logical operations has a name. | [optional] +**PermissionSets** | Pointer to [**[]RoleV2PermissionSet**](RoleV2PermissionSet.md) | List of grouped logical operations referenced by roles. | [optional] **Roles** | Pointer to [**RoleV2RolesGroup**](RoleV2RolesGroup.md) | | [optional] ## Methods diff --git a/docs/SamlConnectionInternal.md b/docs/SamlConnectionInternal.md new file mode 100644 index 00000000..f1d5e7f4 --- /dev/null +++ b/docs/SamlConnectionInternal.md @@ -0,0 +1,65 @@ +# SamlConnectionInternal + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | ID of the SAML service. | +**MetadataDocument** | Pointer to **string** | Identity Provider metadata XML document. | + +## Methods + +### GetName + +`func (o *SamlConnectionInternal) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *SamlConnectionInternal) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *SamlConnectionInternal) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *SamlConnectionInternal) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetMetadataDocument + +`func (o *SamlConnectionInternal) GetMetadataDocument() string` + +GetMetadataDocument returns the MetadataDocument field if non-nil, zero value otherwise. + +### GetMetadataDocumentOk + +`func (o *SamlConnectionInternal) GetMetadataDocumentOk() (string, bool)` + +GetMetadataDocumentOk returns a tuple with the MetadataDocument field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMetadataDocument + +`func (o *SamlConnectionInternal) HasMetadataDocument() bool` + +HasMetadataDocument returns a boolean if a field has been set. + +### SetMetadataDocument + +`func (o *SamlConnectionInternal) SetMetadataDocument(v string)` + +SetMetadataDocument gets a reference to the given string and assigns it to the MetadataDocument field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SamlLoginEndpoint.md b/docs/SamlLoginEndpoint.md index 1b3a4533..785a6a8b 100644 --- a/docs/SamlLoginEndpoint.md +++ b/docs/SamlLoginEndpoint.md @@ -4,11 +4,37 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Id** | Pointer to **int32** | ID of the SAML login endpoint. | **Name** | Pointer to **string** | ID of the SAML service. | -**LoginURL** | Pointer to **string** | Single Sign-On URL. | +**LoginURL** | Pointer to **string** | The single sign-on URL. | ## Methods +### GetId + +`func (o *SamlLoginEndpoint) GetId() int32` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *SamlLoginEndpoint) GetIdOk() (int32, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasId + +`func (o *SamlLoginEndpoint) HasId() bool` + +HasId returns a boolean if a field has been set. + +### SetId + +`func (o *SamlLoginEndpoint) SetId(v int32)` + +SetId gets a reference to the given int32 and assigns it to the Id field. + ### GetName `func (o *SamlLoginEndpoint) GetName() string` diff --git a/docs/Store.md b/docs/Store.md index cf99b9fa..d912e8fc 100644 --- a/docs/Store.md +++ b/docs/Store.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **Name** | Pointer to **string** | The name of the store. | **Description** | Pointer to **string** | The description of the store. | **Attributes** | Pointer to [**map[string]interface{}**](.md) | The attributes of the store. | [optional] -**IntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. | +**IntegrationId** | Pointer to **string** | The integration ID of the store. You choose this ID when you create a store. **Note**: You cannot edit the `integrationId` after the store has been created. | **ApplicationId** | Pointer to **int32** | The ID of the application that owns this entity. | **Updated** | Pointer to [**time.Time**](time.Time.md) | Timestamp of the most recent update on this entity. | **LinkedCampaignIds** | Pointer to **[]int32** | A list of IDs of the campaigns that are linked with current store. | [optional] diff --git a/docs/TemplateArgDef.md b/docs/TemplateArgDef.md index 606507b2..fdd2f5c8 100644 --- a/docs/TemplateArgDef.md +++ b/docs/TemplateArgDef.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Type** | Pointer to **string** | The type of value this argument expects. | -**Description** | Pointer to **string** | A campaigner-friendly description of the argument, this will also be shown in the rule editor. | +**Description** | Pointer to **string** | A campaigner-friendly description of the argument, this will also be shown in the rule editor. | [optional] **Title** | Pointer to **string** | A campaigner friendly name for the argument, this will be shown in the rule editor. | **Ui** | Pointer to [**map[string]interface{}**](.md) | Arbitrary metadata that may be used to render an input for this argument. | **PicklistID** | Pointer to **int32** | ID of the picklist linked to a template. | [optional] diff --git a/docs/TierDowngradeNotificationPolicy.md b/docs/TierDowngradeNotificationPolicy.md index 93921b2c..a006b695 100644 --- a/docs/TierDowngradeNotificationPolicy.md +++ b/docs/TierDowngradeNotificationPolicy.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | The name of the notification. | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] ## Methods @@ -33,6 +34,31 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. +### GetBatchingEnabled + +`func (o *TierDowngradeNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *TierDowngradeNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *TierDowngradeNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *TierDowngradeNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TierUpgradeNotificationPolicy.md b/docs/TierUpgradeNotificationPolicy.md index 5c2a4ac6..9ab90402 100644 --- a/docs/TierUpgradeNotificationPolicy.md +++ b/docs/TierUpgradeNotificationPolicy.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | Notification name. | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] ## Methods @@ -33,6 +34,31 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. +### GetBatchingEnabled + +`func (o *TierUpgradeNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *TierUpgradeNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *TierUpgradeNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *TierUpgradeNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TierWillDowngradeNotificationPolicy.md b/docs/TierWillDowngradeNotificationPolicy.md index 7cbaad42..37ddcf03 100644 --- a/docs/TierWillDowngradeNotificationPolicy.md +++ b/docs/TierWillDowngradeNotificationPolicy.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | Pointer to **string** | The name of the notification. | +**BatchingEnabled** | Pointer to **bool** | Indicates whether batching is activated. | [optional] [default to true] **Triggers** | Pointer to [**[]TierWillDowngradeNotificationTrigger**](TierWillDowngradeNotificationTrigger.md) | | ## Methods @@ -34,6 +35,31 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. +### GetBatchingEnabled + +`func (o *TierWillDowngradeNotificationPolicy) GetBatchingEnabled() bool` + +GetBatchingEnabled returns the BatchingEnabled field if non-nil, zero value otherwise. + +### GetBatchingEnabledOk + +`func (o *TierWillDowngradeNotificationPolicy) GetBatchingEnabledOk() (bool, bool)` + +GetBatchingEnabledOk returns a tuple with the BatchingEnabled field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBatchingEnabled + +`func (o *TierWillDowngradeNotificationPolicy) HasBatchingEnabled() bool` + +HasBatchingEnabled returns a boolean if a field has been set. + +### SetBatchingEnabled + +`func (o *TierWillDowngradeNotificationPolicy) SetBatchingEnabled(v bool)` + +SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. + ### GetTriggers `func (o *TierWillDowngradeNotificationPolicy) GetTriggers() []TierWillDowngradeNotificationTrigger` diff --git a/docs/TimePoint.md b/docs/TimePoint.md new file mode 100644 index 00000000..a4e70e2d --- /dev/null +++ b/docs/TimePoint.md @@ -0,0 +1,169 @@ +# TimePoint + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Month** | Pointer to **int32** | The achievement ends and resets in this month. **Note**: Only applicable if the period is set to `Y`. | [optional] +**DayOfMonth** | Pointer to **int32** | The achievement ends and resets on this day of the month. **Note**: Only applicable if the period is set to `Y` or `M`. | [optional] +**DayOfWeek** | Pointer to **int32** | The achievement ends and resets on this day of the week. `1` represents `Monday` and `7` represents `Sunday`. **Note**: Only applicable if the period is set to `W`. | [optional] +**Hour** | Pointer to **int32** | The achievement ends and resets at this hour. | +**Minute** | Pointer to **int32** | The achievement ends and resets at this minute. | +**Second** | Pointer to **int32** | The achievement ends and resets at this second. | + +## Methods + +### GetMonth + +`func (o *TimePoint) GetMonth() int32` + +GetMonth returns the Month field if non-nil, zero value otherwise. + +### GetMonthOk + +`func (o *TimePoint) GetMonthOk() (int32, bool)` + +GetMonthOk returns a tuple with the Month field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMonth + +`func (o *TimePoint) HasMonth() bool` + +HasMonth returns a boolean if a field has been set. + +### SetMonth + +`func (o *TimePoint) SetMonth(v int32)` + +SetMonth gets a reference to the given int32 and assigns it to the Month field. + +### GetDayOfMonth + +`func (o *TimePoint) GetDayOfMonth() int32` + +GetDayOfMonth returns the DayOfMonth field if non-nil, zero value otherwise. + +### GetDayOfMonthOk + +`func (o *TimePoint) GetDayOfMonthOk() (int32, bool)` + +GetDayOfMonthOk returns a tuple with the DayOfMonth field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDayOfMonth + +`func (o *TimePoint) HasDayOfMonth() bool` + +HasDayOfMonth returns a boolean if a field has been set. + +### SetDayOfMonth + +`func (o *TimePoint) SetDayOfMonth(v int32)` + +SetDayOfMonth gets a reference to the given int32 and assigns it to the DayOfMonth field. + +### GetDayOfWeek + +`func (o *TimePoint) GetDayOfWeek() int32` + +GetDayOfWeek returns the DayOfWeek field if non-nil, zero value otherwise. + +### GetDayOfWeekOk + +`func (o *TimePoint) GetDayOfWeekOk() (int32, bool)` + +GetDayOfWeekOk returns a tuple with the DayOfWeek field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDayOfWeek + +`func (o *TimePoint) HasDayOfWeek() bool` + +HasDayOfWeek returns a boolean if a field has been set. + +### SetDayOfWeek + +`func (o *TimePoint) SetDayOfWeek(v int32)` + +SetDayOfWeek gets a reference to the given int32 and assigns it to the DayOfWeek field. + +### GetHour + +`func (o *TimePoint) GetHour() int32` + +GetHour returns the Hour field if non-nil, zero value otherwise. + +### GetHourOk + +`func (o *TimePoint) GetHourOk() (int32, bool)` + +GetHourOk returns a tuple with the Hour field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasHour + +`func (o *TimePoint) HasHour() bool` + +HasHour returns a boolean if a field has been set. + +### SetHour + +`func (o *TimePoint) SetHour(v int32)` + +SetHour gets a reference to the given int32 and assigns it to the Hour field. + +### GetMinute + +`func (o *TimePoint) GetMinute() int32` + +GetMinute returns the Minute field if non-nil, zero value otherwise. + +### GetMinuteOk + +`func (o *TimePoint) GetMinuteOk() (int32, bool)` + +GetMinuteOk returns a tuple with the Minute field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasMinute + +`func (o *TimePoint) HasMinute() bool` + +HasMinute returns a boolean if a field has been set. + +### SetMinute + +`func (o *TimePoint) SetMinute(v int32)` + +SetMinute gets a reference to the given int32 and assigns it to the Minute field. + +### GetSecond + +`func (o *TimePoint) GetSecond() int32` + +GetSecond returns the Second field if non-nil, zero value otherwise. + +### GetSecondOk + +`func (o *TimePoint) GetSecondOk() (int32, bool)` + +GetSecondOk returns a tuple with the Second field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSecond + +`func (o *TimePoint) HasSecond() bool` + +HasSecond returns a boolean if a field has been set. + +### SetSecond + +`func (o *TimePoint) SetSecond(v int32)` + +SetSecond gets a reference to the given int32 and assigns it to the Second field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateAchievement.md b/docs/UpdateAchievement.md new file mode 100644 index 00000000..a9b65f0e --- /dev/null +++ b/docs/UpdateAchievement.md @@ -0,0 +1,169 @@ +# UpdateAchievement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | The internal name of the achievement used in API requests. | [optional] +**Title** | Pointer to **string** | The display name for the achievement in the Campaign Manager. | [optional] +**Description** | Pointer to **string** | A description of the achievement. | [optional] +**Target** | Pointer to **float32** | The required number of actions or the transactional milestone to complete the achievement. | [optional] +**Period** | Pointer to **string** | The relative duration after which the achievement ends and resets for a particular customer profile. | [optional] +**PeriodEndOverride** | Pointer to [**TimePoint**](TimePoint.md) | | [optional] + +## Methods + +### GetName + +`func (o *UpdateAchievement) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *UpdateAchievement) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *UpdateAchievement) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *UpdateAchievement) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetTitle + +`func (o *UpdateAchievement) GetTitle() string` + +GetTitle returns the Title field if non-nil, zero value otherwise. + +### GetTitleOk + +`func (o *UpdateAchievement) GetTitleOk() (string, bool)` + +GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTitle + +`func (o *UpdateAchievement) HasTitle() bool` + +HasTitle returns a boolean if a field has been set. + +### SetTitle + +`func (o *UpdateAchievement) SetTitle(v string)` + +SetTitle gets a reference to the given string and assigns it to the Title field. + +### GetDescription + +`func (o *UpdateAchievement) GetDescription() string` + +GetDescription returns the Description field if non-nil, zero value otherwise. + +### GetDescriptionOk + +`func (o *UpdateAchievement) GetDescriptionOk() (string, bool)` + +GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasDescription + +`func (o *UpdateAchievement) HasDescription() bool` + +HasDescription returns a boolean if a field has been set. + +### SetDescription + +`func (o *UpdateAchievement) SetDescription(v string)` + +SetDescription gets a reference to the given string and assigns it to the Description field. + +### GetTarget + +`func (o *UpdateAchievement) GetTarget() float32` + +GetTarget returns the Target field if non-nil, zero value otherwise. + +### GetTargetOk + +`func (o *UpdateAchievement) GetTargetOk() (float32, bool)` + +GetTargetOk returns a tuple with the Target field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTarget + +`func (o *UpdateAchievement) HasTarget() bool` + +HasTarget returns a boolean if a field has been set. + +### SetTarget + +`func (o *UpdateAchievement) SetTarget(v float32)` + +SetTarget gets a reference to the given float32 and assigns it to the Target field. + +### GetPeriod + +`func (o *UpdateAchievement) GetPeriod() string` + +GetPeriod returns the Period field if non-nil, zero value otherwise. + +### GetPeriodOk + +`func (o *UpdateAchievement) GetPeriodOk() (string, bool)` + +GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriod + +`func (o *UpdateAchievement) HasPeriod() bool` + +HasPeriod returns a boolean if a field has been set. + +### SetPeriod + +`func (o *UpdateAchievement) SetPeriod(v string)` + +SetPeriod gets a reference to the given string and assigns it to the Period field. + +### GetPeriodEndOverride + +`func (o *UpdateAchievement) GetPeriodEndOverride() TimePoint` + +GetPeriodEndOverride returns the PeriodEndOverride field if non-nil, zero value otherwise. + +### GetPeriodEndOverrideOk + +`func (o *UpdateAchievement) GetPeriodEndOverrideOk() (TimePoint, bool)` + +GetPeriodEndOverrideOk returns a tuple with the PeriodEndOverride field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPeriodEndOverride + +`func (o *UpdateAchievement) HasPeriodEndOverride() bool` + +HasPeriodEndOverride returns a boolean if a field has been set. + +### SetPeriodEndOverride + +`func (o *UpdateAchievement) SetPeriodEndOverride(v TimePoint)` + +SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateApplicationApiKey.md b/docs/UpdateApplicationApiKey.md new file mode 100644 index 00000000..2c2fd139 --- /dev/null +++ b/docs/UpdateApplicationApiKey.md @@ -0,0 +1,39 @@ +# UpdateApplicationApiKey + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TimeOffset** | Pointer to **int32** | A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. | + +## Methods + +### GetTimeOffset + +`func (o *UpdateApplicationApiKey) GetTimeOffset() int32` + +GetTimeOffset returns the TimeOffset field if non-nil, zero value otherwise. + +### GetTimeOffsetOk + +`func (o *UpdateApplicationApiKey) GetTimeOffsetOk() (int32, bool)` + +GetTimeOffsetOk returns a tuple with the TimeOffset field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTimeOffset + +`func (o *UpdateApplicationApiKey) HasTimeOffset() bool` + +HasTimeOffset returns a boolean if a field has been set. + +### SetTimeOffset + +`func (o *UpdateApplicationApiKey) SetTimeOffset(v int32)` + +SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCampaignGroup.md b/docs/UpdateCampaignGroup.md index fa0ae212..a3261c24 100644 --- a/docs/UpdateCampaignGroup.md +++ b/docs/UpdateCampaignGroup.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The name of this campaign access group. | +**Name** | Pointer to **string** | The name of the campaign access group. | **Description** | Pointer to **string** | A longer description of the campaign access group. | [optional] **SubscribedApplicationsIds** | Pointer to **[]int32** | A list of IDs of the Applications that this campaign access group is enabled for. | [optional] **CampaignIds** | Pointer to **[]int32** | A list of IDs of the campaigns that are part of the campaign access group. | [optional] diff --git a/docs/UpdateCoupon.md b/docs/UpdateCoupon.md index 69e0327a..745f423d 100644 --- a/docs/UpdateCoupon.md +++ b/docs/UpdateCoupon.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **Limits** | Pointer to [**[]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** | Pointer to **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary properties associated with this item. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to true] +**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] ## Methods diff --git a/docs/UpdateLoyaltyProgram.md b/docs/UpdateLoyaltyProgram.md index 817a394d..3a84b1c8 100644 --- a/docs/UpdateLoyaltyProgram.md +++ b/docs/UpdateLoyaltyProgram.md @@ -12,8 +12,10 @@ Name | Type | Description | Notes **AllowSubledger** | Pointer to **bool** | Indicates if this program supports subledgers inside the program. | [optional] **UsersPerCardLimit** | Pointer to **int32** | 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** | Pointer to **bool** | Indicates if this program is a live or sandbox program. Programs of a given type can only be connected to Applications of the same type. | [optional] -**TiersExpireIn** | Pointer to **string** | The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] +**TiersExpirationPolicy** | Pointer to **string** | The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. | [optional] +**TiersExpireIn** | Pointer to **string** | The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. | [optional] **TiersDowngradePolicy** | Pointer to **string** | Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. | [optional] +**ProgramJoinPolicy** | Pointer to **string** | The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. | [optional] **Tiers** | Pointer to [**[]NewLoyaltyTier**](NewLoyaltyTier.md) | The tiers in this loyalty program. | [optional] ## Methods @@ -218,6 +220,31 @@ HasSandbox returns a boolean if a field has been set. SetSandbox gets a reference to the given bool and assigns it to the Sandbox field. +### GetTiersExpirationPolicy + +`func (o *UpdateLoyaltyProgram) GetTiersExpirationPolicy() string` + +GetTiersExpirationPolicy returns the TiersExpirationPolicy field if non-nil, zero value otherwise. + +### GetTiersExpirationPolicyOk + +`func (o *UpdateLoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool)` + +GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasTiersExpirationPolicy + +`func (o *UpdateLoyaltyProgram) HasTiersExpirationPolicy() bool` + +HasTiersExpirationPolicy returns a boolean if a field has been set. + +### SetTiersExpirationPolicy + +`func (o *UpdateLoyaltyProgram) SetTiersExpirationPolicy(v string)` + +SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. + ### GetTiersExpireIn `func (o *UpdateLoyaltyProgram) GetTiersExpireIn() string` @@ -268,6 +295,31 @@ HasTiersDowngradePolicy returns a boolean if a field has been set. SetTiersDowngradePolicy gets a reference to the given string and assigns it to the TiersDowngradePolicy field. +### GetProgramJoinPolicy + +`func (o *UpdateLoyaltyProgram) GetProgramJoinPolicy() string` + +GetProgramJoinPolicy returns the ProgramJoinPolicy field if non-nil, zero value otherwise. + +### GetProgramJoinPolicyOk + +`func (o *UpdateLoyaltyProgram) GetProgramJoinPolicyOk() (string, bool)` + +GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProgramJoinPolicy + +`func (o *UpdateLoyaltyProgram) HasProgramJoinPolicy() bool` + +HasProgramJoinPolicy returns a boolean if a field has been set. + +### SetProgramJoinPolicy + +`func (o *UpdateLoyaltyProgram) SetProgramJoinPolicy(v string)` + +SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. + ### GetTiers `func (o *UpdateLoyaltyProgram) GetTiers() []NewLoyaltyTier` diff --git a/docs/UpdatePicklist.md b/docs/UpdatePicklist.md index 4689155c..212c17e1 100644 --- a/docs/UpdatePicklist.md +++ b/docs/UpdatePicklist.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Type** | Pointer to **string** | The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. | +**Type** | Pointer to **string** | The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string. | **Values** | Pointer to **[]string** | The list of allowed values provided by this picklist. | ## Methods diff --git a/docs/UpdateUser.md b/docs/UpdateUser.md index fc5111b3..3dcca24c 100644 --- a/docs/UpdateUser.md +++ b/docs/UpdateUser.md @@ -4,12 +4,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | Pointer to **string** | The user name. | [optional] -**Policy** | Pointer to **string** | The `Access Control List` json defining the role of the user. This represents the access control on the user level. | [optional] -**State** | Pointer to **string** | New state (\"deactivated\" or \"active\") for the user. Only usable by admins for the user. | [optional] -**Roles** | Pointer to **[]int32** | List of roles to assign to the user. | [optional] -**ApplicationNotificationSubscriptions** | Pointer to [**map[string]interface{}**](.md) | | [optional] -**IsAdmin** | Pointer to **bool** | An indication of whether the user has admin permissions. | [optional] +**Name** | Pointer to **string** | Name of the user. | [optional] +**State** | Pointer to **string** | The state of the user. - `deactivated`: The user has been deactivated. - `active`: The user is active. **Note**: Only `admin` users can update the state of another user. | [optional] +**IsAdmin** | Pointer to **bool** | Indicates whether the user is an `admin`. | [optional] +**Policy** | Pointer to **string** | Indicates the access level of the user. | [optional] +**Roles** | Pointer to **[]int32** | A list of the IDs of the roles assigned to the user. **Note**: Use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint to find the ID of a role. | [optional] +**ApplicationNotificationSubscriptions** | Pointer to [**map[string]interface{}**](.md) | Application notifications that the user is subscribed to. | [optional] ## Methods @@ -38,55 +38,80 @@ HasName returns a boolean if a field has been set. SetName gets a reference to the given string and assigns it to the Name field. -### GetPolicy +### GetState -`func (o *UpdateUser) GetPolicy() string` +`func (o *UpdateUser) GetState() string` -GetPolicy returns the Policy field if non-nil, zero value otherwise. +GetState returns the State field if non-nil, zero value otherwise. -### GetPolicyOk +### GetStateOk -`func (o *UpdateUser) GetPolicyOk() (string, bool)` +`func (o *UpdateUser) GetStateOk() (string, bool)` -GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPolicy +### HasState -`func (o *UpdateUser) HasPolicy() bool` +`func (o *UpdateUser) HasState() bool` -HasPolicy returns a boolean if a field has been set. +HasState returns a boolean if a field has been set. -### SetPolicy +### SetState -`func (o *UpdateUser) SetPolicy(v string)` +`func (o *UpdateUser) SetState(v string)` -SetPolicy gets a reference to the given string and assigns it to the Policy field. +SetState gets a reference to the given string and assigns it to the State field. -### GetState +### GetIsAdmin -`func (o *UpdateUser) GetState() string` +`func (o *UpdateUser) GetIsAdmin() bool` -GetState returns the State field if non-nil, zero value otherwise. +GetIsAdmin returns the IsAdmin field if non-nil, zero value otherwise. -### GetStateOk +### GetIsAdminOk -`func (o *UpdateUser) GetStateOk() (string, bool)` +`func (o *UpdateUser) GetIsAdminOk() (bool, bool)` -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +GetIsAdminOk returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasState +### HasIsAdmin -`func (o *UpdateUser) HasState() bool` +`func (o *UpdateUser) HasIsAdmin() bool` -HasState returns a boolean if a field has been set. +HasIsAdmin returns a boolean if a field has been set. -### SetState +### SetIsAdmin -`func (o *UpdateUser) SetState(v string)` +`func (o *UpdateUser) SetIsAdmin(v bool)` -SetState gets a reference to the given string and assigns it to the State field. +SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. + +### GetPolicy + +`func (o *UpdateUser) GetPolicy() string` + +GetPolicy returns the Policy field if non-nil, zero value otherwise. + +### GetPolicyOk + +`func (o *UpdateUser) GetPolicyOk() (string, bool)` + +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasPolicy + +`func (o *UpdateUser) HasPolicy() bool` + +HasPolicy returns a boolean if a field has been set. + +### SetPolicy + +`func (o *UpdateUser) SetPolicy(v string)` + +SetPolicy gets a reference to the given string and assigns it to the Policy field. ### GetRoles @@ -138,31 +163,6 @@ HasApplicationNotificationSubscriptions returns a boolean if a field has been se SetApplicationNotificationSubscriptions gets a reference to the given map[string]interface{} and assigns it to the ApplicationNotificationSubscriptions field. -### GetIsAdmin - -`func (o *UpdateUser) GetIsAdmin() bool` - -GetIsAdmin returns the IsAdmin field if non-nil, zero value otherwise. - -### GetIsAdminOk - -`func (o *UpdateUser) GetIsAdminOk() (bool, bool)` - -GetIsAdminOk returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasIsAdmin - -`func (o *UpdateUser) HasIsAdmin() bool` - -HasIsAdmin returns a boolean if a field has been set. - -### SetIsAdmin - -`func (o *UpdateUser) SetIsAdmin(v bool)` - -SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. - [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/User.md b/docs/User.md index 2ab1775f..f2f3ded0 100644 --- a/docs/User.md +++ b/docs/User.md @@ -7,19 +7,19 @@ Name | Type | Description | Notes **Id** | Pointer to **int32** | Internal ID of this entity. | **Created** | Pointer to [**time.Time**](time.Time.md) | The time this entity was created. | **Modified** | Pointer to [**time.Time**](time.Time.md) | The time this entity was last modified. | -**Email** | Pointer to **string** | The email address associated with your account. | +**Email** | Pointer to **string** | The email address associated with the user profile. | **AccountId** | Pointer to **int32** | The ID of the account that owns this entity. | -**InviteToken** | Pointer to **string** | Invite token, empty if the user as already accepted their invite. | -**State** | Pointer to **string** | Current user state. | -**Name** | Pointer to **string** | Full name | -**Policy** | Pointer to [**map[string]interface{}**](.md) | User ACL Policy | -**LatestFeedTimestamp** | Pointer to [**time.Time**](time.Time.md) | Latest timestamp the user has been notified for feed. | [optional] -**Roles** | Pointer to **[]int32** | Contains a list of all roles the user is a member of. | [optional] -**ApplicationNotificationSubscriptions** | Pointer to [**map[string]interface{}**](.md) | | [optional] -**AuthMethod** | Pointer to **string** | The Authentication method for this user. | [optional] -**IsAdmin** | Pointer to **bool** | An indication of whether the user has admin permissions. | [optional] -**LastSignedIn** | Pointer to [**time.Time**](time.Time.md) | Date and time when the user last signed in to Talon.One. | [optional] -**LastAccessed** | Pointer to [**time.Time**](time.Time.md) | Date and time of the user's last activity after signing in to Talon.One. | [optional] +**Name** | Pointer to **string** | Name of the user. | +**State** | Pointer to **string** | State of the user. | +**InviteToken** | Pointer to **string** | Invitation token of the user. **Note**: If the user has already accepted their invitation, this is `null`. | +**IsAdmin** | Pointer to **bool** | Indicates whether the user is an `admin`. | [optional] +**Policy** | Pointer to [**map[string]interface{}**](.md) | Access level of the user. | +**Roles** | Pointer to **[]int32** | A list of the IDs of the roles assigned to the user. | [optional] +**AuthMethod** | Pointer to **string** | Authentication method for this user. | [optional] +**ApplicationNotificationSubscriptions** | Pointer to [**map[string]interface{}**](.md) | Application notifications that the user is subscribed to. | [optional] +**LastSignedIn** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the user last signed in to Talon.One. | [optional] +**LastAccessed** | Pointer to [**time.Time**](time.Time.md) | Timestamp of the user's last activity after signing in to Talon.One. | [optional] +**LatestFeedTimestamp** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the user was notified for feed. | [optional] ## Methods @@ -148,30 +148,30 @@ HasAccountId returns a boolean if a field has been set. SetAccountId gets a reference to the given int32 and assigns it to the AccountId field. -### GetInviteToken +### GetName -`func (o *User) GetInviteToken() string` +`func (o *User) GetName() string` -GetInviteToken returns the InviteToken field if non-nil, zero value otherwise. +GetName returns the Name field if non-nil, zero value otherwise. -### GetInviteTokenOk +### GetNameOk -`func (o *User) GetInviteTokenOk() (string, bool)` +`func (o *User) GetNameOk() (string, bool)` -GetInviteTokenOk returns a tuple with the InviteToken field if it's non-nil, zero value otherwise +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasInviteToken +### HasName -`func (o *User) HasInviteToken() bool` +`func (o *User) HasName() bool` -HasInviteToken returns a boolean if a field has been set. +HasName returns a boolean if a field has been set. -### SetInviteToken +### SetName -`func (o *User) SetInviteToken(v string)` +`func (o *User) SetName(v string)` -SetInviteToken gets a reference to the given string and assigns it to the InviteToken field. +SetName gets a reference to the given string and assigns it to the Name field. ### GetState @@ -198,80 +198,80 @@ HasState returns a boolean if a field has been set. SetState gets a reference to the given string and assigns it to the State field. -### GetName +### GetInviteToken -`func (o *User) GetName() string` +`func (o *User) GetInviteToken() string` -GetName returns the Name field if non-nil, zero value otherwise. +GetInviteToken returns the InviteToken field if non-nil, zero value otherwise. -### GetNameOk +### GetInviteTokenOk -`func (o *User) GetNameOk() (string, bool)` +`func (o *User) GetInviteTokenOk() (string, bool)` -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +GetInviteTokenOk returns a tuple with the InviteToken field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasName +### HasInviteToken -`func (o *User) HasName() bool` +`func (o *User) HasInviteToken() bool` -HasName returns a boolean if a field has been set. +HasInviteToken returns a boolean if a field has been set. -### SetName +### SetInviteToken -`func (o *User) SetName(v string)` +`func (o *User) SetInviteToken(v string)` -SetName gets a reference to the given string and assigns it to the Name field. +SetInviteToken gets a reference to the given string and assigns it to the InviteToken field. -### GetPolicy +### GetIsAdmin -`func (o *User) GetPolicy() map[string]interface{}` +`func (o *User) GetIsAdmin() bool` -GetPolicy returns the Policy field if non-nil, zero value otherwise. +GetIsAdmin returns the IsAdmin field if non-nil, zero value otherwise. -### GetPolicyOk +### GetIsAdminOk -`func (o *User) GetPolicyOk() (map[string]interface{}, bool)` +`func (o *User) GetIsAdminOk() (bool, bool)` -GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise +GetIsAdminOk returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasPolicy +### HasIsAdmin -`func (o *User) HasPolicy() bool` +`func (o *User) HasIsAdmin() bool` -HasPolicy returns a boolean if a field has been set. +HasIsAdmin returns a boolean if a field has been set. -### SetPolicy +### SetIsAdmin -`func (o *User) SetPolicy(v map[string]interface{})` +`func (o *User) SetIsAdmin(v bool)` -SetPolicy gets a reference to the given map[string]interface{} and assigns it to the Policy field. +SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. -### GetLatestFeedTimestamp +### GetPolicy -`func (o *User) GetLatestFeedTimestamp() time.Time` +`func (o *User) GetPolicy() map[string]interface{}` -GetLatestFeedTimestamp returns the LatestFeedTimestamp field if non-nil, zero value otherwise. +GetPolicy returns the Policy field if non-nil, zero value otherwise. -### GetLatestFeedTimestampOk +### GetPolicyOk -`func (o *User) GetLatestFeedTimestampOk() (time.Time, bool)` +`func (o *User) GetPolicyOk() (map[string]interface{}, bool)` -GetLatestFeedTimestampOk returns a tuple with the LatestFeedTimestamp field if it's non-nil, zero value otherwise +GetPolicyOk returns a tuple with the Policy field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasLatestFeedTimestamp +### HasPolicy -`func (o *User) HasLatestFeedTimestamp() bool` +`func (o *User) HasPolicy() bool` -HasLatestFeedTimestamp returns a boolean if a field has been set. +HasPolicy returns a boolean if a field has been set. -### SetLatestFeedTimestamp +### SetPolicy -`func (o *User) SetLatestFeedTimestamp(v time.Time)` +`func (o *User) SetPolicy(v map[string]interface{})` -SetLatestFeedTimestamp gets a reference to the given time.Time and assigns it to the LatestFeedTimestamp field. +SetPolicy gets a reference to the given map[string]interface{} and assigns it to the Policy field. ### GetRoles @@ -298,31 +298,6 @@ HasRoles returns a boolean if a field has been set. SetRoles gets a reference to the given []int32 and assigns it to the Roles field. -### GetApplicationNotificationSubscriptions - -`func (o *User) GetApplicationNotificationSubscriptions() map[string]interface{}` - -GetApplicationNotificationSubscriptions returns the ApplicationNotificationSubscriptions field if non-nil, zero value otherwise. - -### GetApplicationNotificationSubscriptionsOk - -`func (o *User) GetApplicationNotificationSubscriptionsOk() (map[string]interface{}, bool)` - -GetApplicationNotificationSubscriptionsOk returns a tuple with the ApplicationNotificationSubscriptions field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasApplicationNotificationSubscriptions - -`func (o *User) HasApplicationNotificationSubscriptions() bool` - -HasApplicationNotificationSubscriptions returns a boolean if a field has been set. - -### SetApplicationNotificationSubscriptions - -`func (o *User) SetApplicationNotificationSubscriptions(v map[string]interface{})` - -SetApplicationNotificationSubscriptions gets a reference to the given map[string]interface{} and assigns it to the ApplicationNotificationSubscriptions field. - ### GetAuthMethod `func (o *User) GetAuthMethod() string` @@ -348,30 +323,30 @@ HasAuthMethod returns a boolean if a field has been set. SetAuthMethod gets a reference to the given string and assigns it to the AuthMethod field. -### GetIsAdmin +### GetApplicationNotificationSubscriptions -`func (o *User) GetIsAdmin() bool` +`func (o *User) GetApplicationNotificationSubscriptions() map[string]interface{}` -GetIsAdmin returns the IsAdmin field if non-nil, zero value otherwise. +GetApplicationNotificationSubscriptions returns the ApplicationNotificationSubscriptions field if non-nil, zero value otherwise. -### GetIsAdminOk +### GetApplicationNotificationSubscriptionsOk -`func (o *User) GetIsAdminOk() (bool, bool)` +`func (o *User) GetApplicationNotificationSubscriptionsOk() (map[string]interface{}, bool)` -GetIsAdminOk returns a tuple with the IsAdmin field if it's non-nil, zero value otherwise +GetApplicationNotificationSubscriptionsOk returns a tuple with the ApplicationNotificationSubscriptions field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### HasIsAdmin +### HasApplicationNotificationSubscriptions -`func (o *User) HasIsAdmin() bool` +`func (o *User) HasApplicationNotificationSubscriptions() bool` -HasIsAdmin returns a boolean if a field has been set. +HasApplicationNotificationSubscriptions returns a boolean if a field has been set. -### SetIsAdmin +### SetApplicationNotificationSubscriptions -`func (o *User) SetIsAdmin(v bool)` +`func (o *User) SetApplicationNotificationSubscriptions(v map[string]interface{})` -SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. +SetApplicationNotificationSubscriptions gets a reference to the given map[string]interface{} and assigns it to the ApplicationNotificationSubscriptions field. ### GetLastSignedIn @@ -423,6 +398,31 @@ HasLastAccessed returns a boolean if a field has been set. SetLastAccessed gets a reference to the given time.Time and assigns it to the LastAccessed field. +### GetLatestFeedTimestamp + +`func (o *User) GetLatestFeedTimestamp() time.Time` + +GetLatestFeedTimestamp returns the LatestFeedTimestamp field if non-nil, zero value otherwise. + +### GetLatestFeedTimestampOk + +`func (o *User) GetLatestFeedTimestampOk() (time.Time, bool)` + +GetLatestFeedTimestampOk returns a tuple with the LatestFeedTimestamp field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasLatestFeedTimestamp + +`func (o *User) HasLatestFeedTimestamp() bool` + +HasLatestFeedTimestamp returns a boolean if a field has been set. + +### SetLatestFeedTimestamp + +`func (o *User) SetLatestFeedTimestamp(v time.Time)` + +SetLatestFeedTimestamp gets a reference to the given time.Time and assigns it to the LatestFeedTimestamp field. + [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/go.mod b/go.mod index f7eb4cc9..20bde2aa 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/talon-one/talon_go/v5 +module github.com/talon-one/talon_go/v6 go 1.13 diff --git a/model_account_dashboard_statistic.go b/model_account_dashboard_statistic.go index 907c855d..7d5eebaf 100644 --- a/model_account_dashboard_statistic.go +++ b/model_account_dashboard_statistic.go @@ -24,9 +24,7 @@ type AccountDashboardStatistic struct { LoyaltyPoints *[]AccountDashboardStatisticLoyaltyPoints `json:"loyaltyPoints,omitempty"` // Aggregated statistic for account referrals. Referrals *[]AccountDashboardStatisticReferrals `json:"referrals,omitempty"` - // Aggregated statistic for the number of account API calls. - ApiCalls *[]AccountDashboardStatisticApiCalls `json:"apiCalls,omitempty"` - Campaigns AccountDashboardStatisticCampaigns `json:"campaigns"` + Campaigns AccountDashboardStatisticCampaigns `json:"campaigns"` } // GetRevenue returns the Revenue field value if set, zero value otherwise. @@ -161,39 +159,6 @@ func (o *AccountDashboardStatistic) SetReferrals(v []AccountDashboardStatisticRe o.Referrals = &v } -// GetApiCalls returns the ApiCalls field value if set, zero value otherwise. -func (o *AccountDashboardStatistic) GetApiCalls() []AccountDashboardStatisticApiCalls { - if o == nil || o.ApiCalls == nil { - var ret []AccountDashboardStatisticApiCalls - return ret - } - return *o.ApiCalls -} - -// GetApiCallsOk returns a tuple with the ApiCalls field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *AccountDashboardStatistic) GetApiCallsOk() ([]AccountDashboardStatisticApiCalls, bool) { - if o == nil || o.ApiCalls == nil { - var ret []AccountDashboardStatisticApiCalls - return ret, false - } - return *o.ApiCalls, true -} - -// HasApiCalls returns a boolean if a field has been set. -func (o *AccountDashboardStatistic) HasApiCalls() bool { - if o != nil && o.ApiCalls != nil { - return true - } - - return false -} - -// SetApiCalls gets a reference to the given []AccountDashboardStatisticApiCalls and assigns it to the ApiCalls field. -func (o *AccountDashboardStatistic) SetApiCalls(v []AccountDashboardStatisticApiCalls) { - o.ApiCalls = &v -} - // GetCampaigns returns the Campaigns field value func (o *AccountDashboardStatistic) GetCampaigns() AccountDashboardStatisticCampaigns { if o == nil { diff --git a/model_achievement.go b/model_achievement.go new file mode 100644 index 00000000..5e3a3899 --- /dev/null +++ b/model_achievement.go @@ -0,0 +1,282 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// Achievement +type Achievement struct { + // Internal ID of this entity. + Id int32 `json:"id"` + // The time this entity was created. + Created time.Time `json:"created"` + // The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. + Name string `json:"name"` + // The display name for the achievement in the Campaign Manager. + Title string `json:"title"` + // A description of the achievement. + Description string `json:"description"` + // The required number of actions or the transactional milestone to complete the achievement. + Target float32 `json:"target"` + // The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. + Period string `json:"period"` + PeriodEndOverride *TimePoint `json:"periodEndOverride,omitempty"` + // ID of the campaign, to which the achievement belongs to + CampaignId int32 `json:"campaignId"` + // ID of the user that created this achievement. + UserId int32 `json:"userId"` + // Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. + CreatedBy string `json:"createdBy"` + // Indicates if a customer has made progress in the achievement. + HasProgress *bool `json:"hasProgress,omitempty"` +} + +// GetId returns the Id field value +func (o *Achievement) GetId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Id +} + +// SetId sets field value +func (o *Achievement) SetId(v int32) { + o.Id = v +} + +// GetCreated returns the Created field value +func (o *Achievement) GetCreated() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.Created +} + +// SetCreated sets field value +func (o *Achievement) SetCreated(v time.Time) { + o.Created = v +} + +// GetName returns the Name field value +func (o *Achievement) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *Achievement) SetName(v string) { + o.Name = v +} + +// GetTitle returns the Title field value +func (o *Achievement) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// SetTitle sets field value +func (o *Achievement) SetTitle(v string) { + o.Title = v +} + +// GetDescription returns the Description field value +func (o *Achievement) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// SetDescription sets field value +func (o *Achievement) SetDescription(v string) { + o.Description = v +} + +// GetTarget returns the Target field value +func (o *Achievement) GetTarget() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Target +} + +// SetTarget sets field value +func (o *Achievement) SetTarget(v float32) { + o.Target = v +} + +// GetPeriod returns the Period field value +func (o *Achievement) GetPeriod() string { + if o == nil { + var ret string + return ret + } + + return o.Period +} + +// SetPeriod sets field value +func (o *Achievement) SetPeriod(v string) { + o.Period = v +} + +// GetPeriodEndOverride returns the PeriodEndOverride field value if set, zero value otherwise. +func (o *Achievement) GetPeriodEndOverride() TimePoint { + if o == nil || o.PeriodEndOverride == nil { + var ret TimePoint + return ret + } + return *o.PeriodEndOverride +} + +// GetPeriodEndOverrideOk returns a tuple with the PeriodEndOverride field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Achievement) GetPeriodEndOverrideOk() (TimePoint, bool) { + if o == nil || o.PeriodEndOverride == nil { + var ret TimePoint + return ret, false + } + return *o.PeriodEndOverride, true +} + +// HasPeriodEndOverride returns a boolean if a field has been set. +func (o *Achievement) HasPeriodEndOverride() bool { + if o != nil && o.PeriodEndOverride != nil { + return true + } + + return false +} + +// SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field. +func (o *Achievement) SetPeriodEndOverride(v TimePoint) { + o.PeriodEndOverride = &v +} + +// GetCampaignId returns the CampaignId field value +func (o *Achievement) GetCampaignId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CampaignId +} + +// SetCampaignId sets field value +func (o *Achievement) SetCampaignId(v int32) { + o.CampaignId = v +} + +// GetUserId returns the UserId field value +func (o *Achievement) GetUserId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.UserId +} + +// SetUserId sets field value +func (o *Achievement) SetUserId(v int32) { + o.UserId = v +} + +// GetCreatedBy returns the CreatedBy field value +func (o *Achievement) GetCreatedBy() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedBy +} + +// SetCreatedBy sets field value +func (o *Achievement) SetCreatedBy(v string) { + o.CreatedBy = v +} + +// GetHasProgress returns the HasProgress field value if set, zero value otherwise. +func (o *Achievement) GetHasProgress() bool { + if o == nil || o.HasProgress == nil { + var ret bool + return ret + } + return *o.HasProgress +} + +// GetHasProgressOk returns a tuple with the HasProgress field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Achievement) GetHasProgressOk() (bool, bool) { + if o == nil || o.HasProgress == nil { + var ret bool + return ret, false + } + return *o.HasProgress, true +} + +// HasHasProgress returns a boolean if a field has been set. +func (o *Achievement) HasHasProgress() bool { + if o != nil && o.HasProgress != nil { + return true + } + + return false +} + +// SetHasProgress gets a reference to the given bool and assigns it to the HasProgress field. +func (o *Achievement) SetHasProgress(v bool) { + o.HasProgress = &v +} + +type NullableAchievement struct { + Value Achievement + ExplicitNull bool +} + +func (v NullableAchievement) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAchievement) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_achievement_additional_properties.go b/model_achievement_additional_properties.go new file mode 100644 index 00000000..87d56691 --- /dev/null +++ b/model_achievement_additional_properties.go @@ -0,0 +1,128 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// AchievementAdditionalProperties struct for AchievementAdditionalProperties +type AchievementAdditionalProperties struct { + // ID of the campaign, to which the achievement belongs to + CampaignId int32 `json:"campaignId"` + // ID of the user that created this achievement. + UserId int32 `json:"userId"` + // Name of the user that created the achievement. **Note**: This is not available if the user has been deleted. + CreatedBy string `json:"createdBy"` + // Indicates if a customer has made progress in the achievement. + HasProgress *bool `json:"hasProgress,omitempty"` +} + +// GetCampaignId returns the CampaignId field value +func (o *AchievementAdditionalProperties) GetCampaignId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CampaignId +} + +// SetCampaignId sets field value +func (o *AchievementAdditionalProperties) SetCampaignId(v int32) { + o.CampaignId = v +} + +// GetUserId returns the UserId field value +func (o *AchievementAdditionalProperties) GetUserId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.UserId +} + +// SetUserId sets field value +func (o *AchievementAdditionalProperties) SetUserId(v int32) { + o.UserId = v +} + +// GetCreatedBy returns the CreatedBy field value +func (o *AchievementAdditionalProperties) GetCreatedBy() string { + if o == nil { + var ret string + return ret + } + + return o.CreatedBy +} + +// SetCreatedBy sets field value +func (o *AchievementAdditionalProperties) SetCreatedBy(v string) { + o.CreatedBy = v +} + +// GetHasProgress returns the HasProgress field value if set, zero value otherwise. +func (o *AchievementAdditionalProperties) GetHasProgress() bool { + if o == nil || o.HasProgress == nil { + var ret bool + return ret + } + return *o.HasProgress +} + +// GetHasProgressOk returns a tuple with the HasProgress field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AchievementAdditionalProperties) GetHasProgressOk() (bool, bool) { + if o == nil || o.HasProgress == nil { + var ret bool + return ret, false + } + return *o.HasProgress, true +} + +// HasHasProgress returns a boolean if a field has been set. +func (o *AchievementAdditionalProperties) HasHasProgress() bool { + if o != nil && o.HasProgress != nil { + return true + } + + return false +} + +// SetHasProgress gets a reference to the given bool and assigns it to the HasProgress field. +func (o *AchievementAdditionalProperties) SetHasProgress(v bool) { + o.HasProgress = &v +} + +type NullableAchievementAdditionalProperties struct { + Value AchievementAdditionalProperties + ExplicitNull bool +} + +func (v NullableAchievementAdditionalProperties) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAchievementAdditionalProperties) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_achievement_progress.go b/model_achievement_progress.go new file mode 100644 index 00000000..a570205f --- /dev/null +++ b/model_achievement_progress.go @@ -0,0 +1,249 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// AchievementProgress struct for AchievementProgress +type AchievementProgress struct { + // The internal ID of the achievement. + AchievementId int32 `json:"achievementId"` + // The internal name of the achievement used in API requests. + Name string `json:"name"` + // The display name of the achievement in the Campaign Manager. + Title string `json:"title"` + // The ID of the campaign the achievement belongs to. + CampaignId int32 `json:"campaignId"` + // The status of the achievement. + Status string `json:"status"` + // The required number of actions or the transactional milestone to complete the achievement. + Target *float32 `json:"target,omitempty"` + // The current progress of the customer in the achievement. + Progress float32 `json:"progress"` + // Timestamp at which the customer started the achievement. + StartDate time.Time `json:"startDate"` + // Timestamp at which point the customer completed the achievement. + CompletionDate *time.Time `json:"completionDate,omitempty"` + // Timestamp at which point the achievement ends and resets for the customer. + EndDate time.Time `json:"endDate"` +} + +// GetAchievementId returns the AchievementId field value +func (o *AchievementProgress) GetAchievementId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AchievementId +} + +// SetAchievementId sets field value +func (o *AchievementProgress) SetAchievementId(v int32) { + o.AchievementId = v +} + +// GetName returns the Name field value +func (o *AchievementProgress) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *AchievementProgress) SetName(v string) { + o.Name = v +} + +// GetTitle returns the Title field value +func (o *AchievementProgress) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// SetTitle sets field value +func (o *AchievementProgress) SetTitle(v string) { + o.Title = v +} + +// GetCampaignId returns the CampaignId field value +func (o *AchievementProgress) GetCampaignId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.CampaignId +} + +// SetCampaignId sets field value +func (o *AchievementProgress) SetCampaignId(v int32) { + o.CampaignId = v +} + +// GetStatus returns the Status field value +func (o *AchievementProgress) GetStatus() string { + if o == nil { + var ret string + return ret + } + + return o.Status +} + +// SetStatus sets field value +func (o *AchievementProgress) SetStatus(v string) { + o.Status = v +} + +// GetTarget returns the Target field value if set, zero value otherwise. +func (o *AchievementProgress) GetTarget() float32 { + if o == nil || o.Target == nil { + var ret float32 + return ret + } + return *o.Target +} + +// GetTargetOk returns a tuple with the Target field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AchievementProgress) GetTargetOk() (float32, bool) { + if o == nil || o.Target == nil { + var ret float32 + return ret, false + } + return *o.Target, true +} + +// HasTarget returns a boolean if a field has been set. +func (o *AchievementProgress) HasTarget() bool { + if o != nil && o.Target != nil { + return true + } + + return false +} + +// SetTarget gets a reference to the given float32 and assigns it to the Target field. +func (o *AchievementProgress) SetTarget(v float32) { + o.Target = &v +} + +// GetProgress returns the Progress field value +func (o *AchievementProgress) GetProgress() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Progress +} + +// SetProgress sets field value +func (o *AchievementProgress) SetProgress(v float32) { + o.Progress = v +} + +// GetStartDate returns the StartDate field value +func (o *AchievementProgress) GetStartDate() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.StartDate +} + +// SetStartDate sets field value +func (o *AchievementProgress) SetStartDate(v time.Time) { + o.StartDate = v +} + +// GetCompletionDate returns the CompletionDate field value if set, zero value otherwise. +func (o *AchievementProgress) GetCompletionDate() time.Time { + if o == nil || o.CompletionDate == nil { + var ret time.Time + return ret + } + return *o.CompletionDate +} + +// GetCompletionDateOk returns a tuple with the CompletionDate field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AchievementProgress) GetCompletionDateOk() (time.Time, bool) { + if o == nil || o.CompletionDate == nil { + var ret time.Time + return ret, false + } + return *o.CompletionDate, true +} + +// HasCompletionDate returns a boolean if a field has been set. +func (o *AchievementProgress) HasCompletionDate() bool { + if o != nil && o.CompletionDate != nil { + return true + } + + return false +} + +// SetCompletionDate gets a reference to the given time.Time and assigns it to the CompletionDate field. +func (o *AchievementProgress) SetCompletionDate(v time.Time) { + o.CompletionDate = &v +} + +// GetEndDate returns the EndDate field value +func (o *AchievementProgress) GetEndDate() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.EndDate +} + +// SetEndDate sets field value +func (o *AchievementProgress) SetEndDate(v time.Time) { + o.EndDate = v +} + +type NullableAchievementProgress struct { + Value AchievementProgress + ExplicitNull bool +} + +func (v NullableAchievementProgress) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableAchievementProgress) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_add_item_catalog_action.go b/model_add_item_catalog_action.go index 41cf44c1..474771a4 100644 --- a/model_add_item_catalog_action.go +++ b/model_add_item_catalog_action.go @@ -22,7 +22,8 @@ type AddItemCatalogAction struct { Price *float32 `json:"price,omitempty"` // The attributes of the item to add. Attributes *map[string]interface{} `json:"attributes,omitempty"` - // Indicates whether to replace the attributes of the item if the same SKU exists. + Product *Product `json:"product,omitempty"` + // Indicates whether to replace the attributes of the item if the same SKU exists. **Note**: When set to `true`: - If you do not provide a new `price` value, the existing `price` value is retained. - If you do not provide a new `product` value, the `product` value is set to `null`. ReplaceIfExists *bool `json:"replaceIfExists,omitempty"` } @@ -107,6 +108,39 @@ func (o *AddItemCatalogAction) SetAttributes(v map[string]interface{}) { o.Attributes = &v } +// GetProduct returns the Product field value if set, zero value otherwise. +func (o *AddItemCatalogAction) GetProduct() Product { + if o == nil || o.Product == nil { + var ret Product + return ret + } + return *o.Product +} + +// GetProductOk returns a tuple with the Product field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *AddItemCatalogAction) GetProductOk() (Product, bool) { + if o == nil || o.Product == nil { + var ret Product + return ret, false + } + return *o.Product, true +} + +// HasProduct returns a boolean if a field has been set. +func (o *AddItemCatalogAction) HasProduct() bool { + if o != nil && o.Product != nil { + return true + } + + return false +} + +// SetProduct gets a reference to the given Product and assigns it to the Product field. +func (o *AddItemCatalogAction) SetProduct(v Product) { + o.Product = &v +} + // GetReplaceIfExists returns the ReplaceIfExists field value if set, zero value otherwise. func (o *AddItemCatalogAction) GetReplaceIfExists() bool { if o == nil || o.ReplaceIfExists == nil { diff --git a/model_additional_campaign_properties.go b/model_additional_campaign_properties.go index fadd784f..01a2a52b 100644 --- a/model_additional_campaign_properties.go +++ b/model_additional_campaign_properties.go @@ -59,6 +59,8 @@ type AdditionalCampaignProperties struct { UpdatedBy *string `json:"updatedBy,omitempty"` // The ID of the Campaign Template this Campaign was created from. TemplateId *int32 `json:"templateId,omitempty"` + // A campaign state described exactly as in the Campaign Manager. + FrontendState string `json:"frontendState"` } // GetBudgets returns the Budgets field value @@ -736,6 +738,21 @@ func (o *AdditionalCampaignProperties) SetTemplateId(v int32) { o.TemplateId = &v } +// GetFrontendState returns the FrontendState field value +func (o *AdditionalCampaignProperties) GetFrontendState() string { + if o == nil { + var ret string + return ret + } + + return o.FrontendState +} + +// SetFrontendState sets field value +func (o *AdditionalCampaignProperties) SetFrontendState(v string) { + o.FrontendState = v +} + type NullableAdditionalCampaignProperties struct { Value AdditionalCampaignProperties ExplicitNull bool diff --git a/model_application_analytics_data_point.go b/model_application_analytics_data_point.go new file mode 100644 index 00000000..740e417d --- /dev/null +++ b/model_application_analytics_data_point.go @@ -0,0 +1,319 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// ApplicationAnalyticsDataPoint struct for ApplicationAnalyticsDataPoint +type ApplicationAnalyticsDataPoint struct { + // The start of the aggregation time frame in UTC. + StartTime *time.Time `json:"startTime,omitempty"` + // The end of the aggregation time frame in UTC. + EndTime *time.Time `json:"endTime,omitempty"` + TotalRevenue *ApplicationAnalyticsDataPointTotalRevenue `json:"totalRevenue,omitempty"` + SessionsCount *ApplicationAnalyticsDataPointSessionsCount `json:"sessionsCount,omitempty"` + AvgItemsPerSession *ApplicationAnalyticsDataPointAvgItemsPerSession `json:"avgItemsPerSession,omitempty"` + AvgSessionValue *ApplicationAnalyticsDataPointAvgSessionValue `json:"avgSessionValue,omitempty"` + // The total value of discounts given for cart items in influenced sessions. + TotalDiscounts *float32 `json:"totalDiscounts,omitempty"` + // The number of times a coupon was successfully redeemed in influenced sessions. + CouponsCount *float32 `json:"couponsCount,omitempty"` +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetStartTime() time.Time { + if o == nil || o.StartTime == nil { + var ret time.Time + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetStartTimeOk() (time.Time, bool) { + if o == nil || o.StartTime == nil { + var ret time.Time + return ret, false + } + return *o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasStartTime() bool { + if o != nil && o.StartTime != nil { + return true + } + + return false +} + +// SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field. +func (o *ApplicationAnalyticsDataPoint) SetStartTime(v time.Time) { + o.StartTime = &v +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetEndTime() time.Time { + if o == nil || o.EndTime == nil { + var ret time.Time + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetEndTimeOk() (time.Time, bool) { + if o == nil || o.EndTime == nil { + var ret time.Time + return ret, false + } + return *o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasEndTime() bool { + if o != nil && o.EndTime != nil { + return true + } + + return false +} + +// SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field. +func (o *ApplicationAnalyticsDataPoint) SetEndTime(v time.Time) { + o.EndTime = &v +} + +// GetTotalRevenue returns the TotalRevenue field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetTotalRevenue() ApplicationAnalyticsDataPointTotalRevenue { + if o == nil || o.TotalRevenue == nil { + var ret ApplicationAnalyticsDataPointTotalRevenue + return ret + } + return *o.TotalRevenue +} + +// GetTotalRevenueOk returns a tuple with the TotalRevenue field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetTotalRevenueOk() (ApplicationAnalyticsDataPointTotalRevenue, bool) { + if o == nil || o.TotalRevenue == nil { + var ret ApplicationAnalyticsDataPointTotalRevenue + return ret, false + } + return *o.TotalRevenue, true +} + +// HasTotalRevenue returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasTotalRevenue() bool { + if o != nil && o.TotalRevenue != nil { + return true + } + + return false +} + +// SetTotalRevenue gets a reference to the given ApplicationAnalyticsDataPointTotalRevenue and assigns it to the TotalRevenue field. +func (o *ApplicationAnalyticsDataPoint) SetTotalRevenue(v ApplicationAnalyticsDataPointTotalRevenue) { + o.TotalRevenue = &v +} + +// GetSessionsCount returns the SessionsCount field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetSessionsCount() ApplicationAnalyticsDataPointSessionsCount { + if o == nil || o.SessionsCount == nil { + var ret ApplicationAnalyticsDataPointSessionsCount + return ret + } + return *o.SessionsCount +} + +// GetSessionsCountOk returns a tuple with the SessionsCount field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetSessionsCountOk() (ApplicationAnalyticsDataPointSessionsCount, bool) { + if o == nil || o.SessionsCount == nil { + var ret ApplicationAnalyticsDataPointSessionsCount + return ret, false + } + return *o.SessionsCount, true +} + +// HasSessionsCount returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasSessionsCount() bool { + if o != nil && o.SessionsCount != nil { + return true + } + + return false +} + +// SetSessionsCount gets a reference to the given ApplicationAnalyticsDataPointSessionsCount and assigns it to the SessionsCount field. +func (o *ApplicationAnalyticsDataPoint) SetSessionsCount(v ApplicationAnalyticsDataPointSessionsCount) { + o.SessionsCount = &v +} + +// GetAvgItemsPerSession returns the AvgItemsPerSession field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetAvgItemsPerSession() ApplicationAnalyticsDataPointAvgItemsPerSession { + if o == nil || o.AvgItemsPerSession == nil { + var ret ApplicationAnalyticsDataPointAvgItemsPerSession + return ret + } + return *o.AvgItemsPerSession +} + +// GetAvgItemsPerSessionOk returns a tuple with the AvgItemsPerSession field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetAvgItemsPerSessionOk() (ApplicationAnalyticsDataPointAvgItemsPerSession, bool) { + if o == nil || o.AvgItemsPerSession == nil { + var ret ApplicationAnalyticsDataPointAvgItemsPerSession + return ret, false + } + return *o.AvgItemsPerSession, true +} + +// HasAvgItemsPerSession returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasAvgItemsPerSession() bool { + if o != nil && o.AvgItemsPerSession != nil { + return true + } + + return false +} + +// SetAvgItemsPerSession gets a reference to the given ApplicationAnalyticsDataPointAvgItemsPerSession and assigns it to the AvgItemsPerSession field. +func (o *ApplicationAnalyticsDataPoint) SetAvgItemsPerSession(v ApplicationAnalyticsDataPointAvgItemsPerSession) { + o.AvgItemsPerSession = &v +} + +// GetAvgSessionValue returns the AvgSessionValue field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetAvgSessionValue() ApplicationAnalyticsDataPointAvgSessionValue { + if o == nil || o.AvgSessionValue == nil { + var ret ApplicationAnalyticsDataPointAvgSessionValue + return ret + } + return *o.AvgSessionValue +} + +// GetAvgSessionValueOk returns a tuple with the AvgSessionValue field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetAvgSessionValueOk() (ApplicationAnalyticsDataPointAvgSessionValue, bool) { + if o == nil || o.AvgSessionValue == nil { + var ret ApplicationAnalyticsDataPointAvgSessionValue + return ret, false + } + return *o.AvgSessionValue, true +} + +// HasAvgSessionValue returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasAvgSessionValue() bool { + if o != nil && o.AvgSessionValue != nil { + return true + } + + return false +} + +// SetAvgSessionValue gets a reference to the given ApplicationAnalyticsDataPointAvgSessionValue and assigns it to the AvgSessionValue field. +func (o *ApplicationAnalyticsDataPoint) SetAvgSessionValue(v ApplicationAnalyticsDataPointAvgSessionValue) { + o.AvgSessionValue = &v +} + +// GetTotalDiscounts returns the TotalDiscounts field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetTotalDiscounts() float32 { + if o == nil || o.TotalDiscounts == nil { + var ret float32 + return ret + } + return *o.TotalDiscounts +} + +// GetTotalDiscountsOk returns a tuple with the TotalDiscounts field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetTotalDiscountsOk() (float32, bool) { + if o == nil || o.TotalDiscounts == nil { + var ret float32 + return ret, false + } + return *o.TotalDiscounts, true +} + +// HasTotalDiscounts returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasTotalDiscounts() bool { + if o != nil && o.TotalDiscounts != nil { + return true + } + + return false +} + +// SetTotalDiscounts gets a reference to the given float32 and assigns it to the TotalDiscounts field. +func (o *ApplicationAnalyticsDataPoint) SetTotalDiscounts(v float32) { + o.TotalDiscounts = &v +} + +// GetCouponsCount returns the CouponsCount field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPoint) GetCouponsCount() float32 { + if o == nil || o.CouponsCount == nil { + var ret float32 + return ret + } + return *o.CouponsCount +} + +// GetCouponsCountOk returns a tuple with the CouponsCount field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPoint) GetCouponsCountOk() (float32, bool) { + if o == nil || o.CouponsCount == nil { + var ret float32 + return ret, false + } + return *o.CouponsCount, true +} + +// HasCouponsCount returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPoint) HasCouponsCount() bool { + if o != nil && o.CouponsCount != nil { + return true + } + + return false +} + +// SetCouponsCount gets a reference to the given float32 and assigns it to the CouponsCount field. +func (o *ApplicationAnalyticsDataPoint) SetCouponsCount(v float32) { + o.CouponsCount = &v +} + +type NullableApplicationAnalyticsDataPoint struct { + Value ApplicationAnalyticsDataPoint + ExplicitNull bool +} + +func (v NullableApplicationAnalyticsDataPoint) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationAnalyticsDataPoint) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_analytics_data_point_avg_items_per_session.go b/model_application_analytics_data_point_avg_items_per_session.go new file mode 100644 index 00000000..44a1b792 --- /dev/null +++ b/model_application_analytics_data_point_avg_items_per_session.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationAnalyticsDataPointAvgItemsPerSession The number of items from sessions divided by the number of sessions. The `influenced` value includes only sessions with at least one applied effect. +type ApplicationAnalyticsDataPointAvgItemsPerSession struct { + Total *float32 `json:"total,omitempty"` + Influenced *float32 `json:"influenced,omitempty"` +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetTotal() float32 { + if o == nil || o.Total == nil { + var ret float32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetTotalOk() (float32, bool) { + if o == nil || o.Total == nil { + var ret float32 + return ret, false + } + return *o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given float32 and assigns it to the Total field. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) SetTotal(v float32) { + o.Total = &v +} + +// GetInfluenced returns the Influenced field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetInfluenced() float32 { + if o == nil || o.Influenced == nil { + var ret float32 + return ret + } + return *o.Influenced +} + +// GetInfluencedOk returns a tuple with the Influenced field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) GetInfluencedOk() (float32, bool) { + if o == nil || o.Influenced == nil { + var ret float32 + return ret, false + } + return *o.Influenced, true +} + +// HasInfluenced returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) HasInfluenced() bool { + if o != nil && o.Influenced != nil { + return true + } + + return false +} + +// SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. +func (o *ApplicationAnalyticsDataPointAvgItemsPerSession) SetInfluenced(v float32) { + o.Influenced = &v +} + +type NullableApplicationAnalyticsDataPointAvgItemsPerSession struct { + Value ApplicationAnalyticsDataPointAvgItemsPerSession + ExplicitNull bool +} + +func (v NullableApplicationAnalyticsDataPointAvgItemsPerSession) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationAnalyticsDataPointAvgItemsPerSession) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_analytics_data_point_avg_session_value.go b/model_application_analytics_data_point_avg_session_value.go new file mode 100644 index 00000000..d35119a1 --- /dev/null +++ b/model_application_analytics_data_point_avg_session_value.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationAnalyticsDataPointAvgSessionValue The average customer session value, calculated by dividing the revenue value by the number of sessions. The `influenced` value includes only sessions with at least one applied effect. +type ApplicationAnalyticsDataPointAvgSessionValue struct { + Total *float32 `json:"total,omitempty"` + Influenced *float32 `json:"influenced,omitempty"` +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetTotal() float32 { + if o == nil || o.Total == nil { + var ret float32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetTotalOk() (float32, bool) { + if o == nil || o.Total == nil { + var ret float32 + return ret, false + } + return *o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given float32 and assigns it to the Total field. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) SetTotal(v float32) { + o.Total = &v +} + +// GetInfluenced returns the Influenced field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetInfluenced() float32 { + if o == nil || o.Influenced == nil { + var ret float32 + return ret + } + return *o.Influenced +} + +// GetInfluencedOk returns a tuple with the Influenced field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) GetInfluencedOk() (float32, bool) { + if o == nil || o.Influenced == nil { + var ret float32 + return ret, false + } + return *o.Influenced, true +} + +// HasInfluenced returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) HasInfluenced() bool { + if o != nil && o.Influenced != nil { + return true + } + + return false +} + +// SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. +func (o *ApplicationAnalyticsDataPointAvgSessionValue) SetInfluenced(v float32) { + o.Influenced = &v +} + +type NullableApplicationAnalyticsDataPointAvgSessionValue struct { + Value ApplicationAnalyticsDataPointAvgSessionValue + ExplicitNull bool +} + +func (v NullableApplicationAnalyticsDataPointAvgSessionValue) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationAnalyticsDataPointAvgSessionValue) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_analytics_data_point_sessions_count.go b/model_application_analytics_data_point_sessions_count.go new file mode 100644 index 00000000..ffd7684c --- /dev/null +++ b/model_application_analytics_data_point_sessions_count.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationAnalyticsDataPointSessionsCount The number of all closed sessions. The `influenced` value includes only sessions with at least one applied effect. +type ApplicationAnalyticsDataPointSessionsCount struct { + Total *float32 `json:"total,omitempty"` + Influenced *float32 `json:"influenced,omitempty"` +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointSessionsCount) GetTotal() float32 { + if o == nil || o.Total == nil { + var ret float32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointSessionsCount) GetTotalOk() (float32, bool) { + if o == nil || o.Total == nil { + var ret float32 + return ret, false + } + return *o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointSessionsCount) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given float32 and assigns it to the Total field. +func (o *ApplicationAnalyticsDataPointSessionsCount) SetTotal(v float32) { + o.Total = &v +} + +// GetInfluenced returns the Influenced field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointSessionsCount) GetInfluenced() float32 { + if o == nil || o.Influenced == nil { + var ret float32 + return ret + } + return *o.Influenced +} + +// GetInfluencedOk returns a tuple with the Influenced field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointSessionsCount) GetInfluencedOk() (float32, bool) { + if o == nil || o.Influenced == nil { + var ret float32 + return ret, false + } + return *o.Influenced, true +} + +// HasInfluenced returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointSessionsCount) HasInfluenced() bool { + if o != nil && o.Influenced != nil { + return true + } + + return false +} + +// SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. +func (o *ApplicationAnalyticsDataPointSessionsCount) SetInfluenced(v float32) { + o.Influenced = &v +} + +type NullableApplicationAnalyticsDataPointSessionsCount struct { + Value ApplicationAnalyticsDataPointSessionsCount + ExplicitNull bool +} + +func (v NullableApplicationAnalyticsDataPointSessionsCount) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationAnalyticsDataPointSessionsCount) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_analytics_data_point_total_revenue.go b/model_application_analytics_data_point_total_revenue.go new file mode 100644 index 00000000..16ba1268 --- /dev/null +++ b/model_application_analytics_data_point_total_revenue.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationAnalyticsDataPointTotalRevenue The total, pre-discount value of all items purchased in a customer session. +type ApplicationAnalyticsDataPointTotalRevenue struct { + Total *float32 `json:"total,omitempty"` + Influenced *float32 `json:"influenced,omitempty"` +} + +// GetTotal returns the Total field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointTotalRevenue) GetTotal() float32 { + if o == nil || o.Total == nil { + var ret float32 + return ret + } + return *o.Total +} + +// GetTotalOk returns a tuple with the Total field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointTotalRevenue) GetTotalOk() (float32, bool) { + if o == nil || o.Total == nil { + var ret float32 + return ret, false + } + return *o.Total, true +} + +// HasTotal returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointTotalRevenue) HasTotal() bool { + if o != nil && o.Total != nil { + return true + } + + return false +} + +// SetTotal gets a reference to the given float32 and assigns it to the Total field. +func (o *ApplicationAnalyticsDataPointTotalRevenue) SetTotal(v float32) { + o.Total = &v +} + +// GetInfluenced returns the Influenced field value if set, zero value otherwise. +func (o *ApplicationAnalyticsDataPointTotalRevenue) GetInfluenced() float32 { + if o == nil || o.Influenced == nil { + var ret float32 + return ret + } + return *o.Influenced +} + +// GetInfluencedOk returns a tuple with the Influenced field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationAnalyticsDataPointTotalRevenue) GetInfluencedOk() (float32, bool) { + if o == nil || o.Influenced == nil { + var ret float32 + return ret, false + } + return *o.Influenced, true +} + +// HasInfluenced returns a boolean if a field has been set. +func (o *ApplicationAnalyticsDataPointTotalRevenue) HasInfluenced() bool { + if o != nil && o.Influenced != nil { + return true + } + + return false +} + +// SetInfluenced gets a reference to the given float32 and assigns it to the Influenced field. +func (o *ApplicationAnalyticsDataPointTotalRevenue) SetInfluenced(v float32) { + o.Influenced = &v +} + +type NullableApplicationAnalyticsDataPointTotalRevenue struct { + Value ApplicationAnalyticsDataPointTotalRevenue + ExplicitNull bool +} + +func (v NullableApplicationAnalyticsDataPointTotalRevenue) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationAnalyticsDataPointTotalRevenue) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_api_key.go b/model_application_api_key.go index 37e116b5..b316e9da 100644 --- a/model_application_api_key.go +++ b/model_application_api_key.go @@ -17,12 +17,16 @@ import ( // ApplicationApiKey type ApplicationApiKey struct { - // Title for API Key. + // Title of the API key. Title string `json:"title"` - // The date the API key expired. + // The date the API key expires. Expires time.Time `json:"expires"` // The third-party platform the API key is valid for. Use `none` for a generic API key to be used from your own integration layer. Platform *string `json:"platform,omitempty"` + // The API key type. Can be empty or `staging`. Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. + Type *string `json:"type,omitempty"` + // A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + TimeOffset *int32 `json:"timeOffset,omitempty"` // ID of the API Key. Id int32 `json:"id"` // ID of user who created. @@ -98,6 +102,72 @@ func (o *ApplicationApiKey) SetPlatform(v string) { o.Platform = &v } +// GetType returns the Type field value if set, zero value otherwise. +func (o *ApplicationApiKey) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationApiKey) GetTypeOk() (string, bool) { + if o == nil || o.Type == nil { + var ret string + return ret, false + } + return *o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *ApplicationApiKey) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *ApplicationApiKey) SetType(v string) { + o.Type = &v +} + +// GetTimeOffset returns the TimeOffset field value if set, zero value otherwise. +func (o *ApplicationApiKey) GetTimeOffset() int32 { + if o == nil || o.TimeOffset == nil { + var ret int32 + return ret + } + return *o.TimeOffset +} + +// GetTimeOffsetOk returns a tuple with the TimeOffset field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationApiKey) GetTimeOffsetOk() (int32, bool) { + if o == nil || o.TimeOffset == nil { + var ret int32 + return ret, false + } + return *o.TimeOffset, true +} + +// HasTimeOffset returns a boolean if a field has been set. +func (o *ApplicationApiKey) HasTimeOffset() bool { + if o != nil && o.TimeOffset != nil { + return true + } + + return false +} + +// SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. +func (o *ApplicationApiKey) SetTimeOffset(v int32) { + o.TimeOffset = &v +} + // GetId returns the Id field value func (o *ApplicationApiKey) GetId() int32 { if o == nil { diff --git a/model_application_campaign_analytics.go b/model_application_campaign_analytics.go new file mode 100644 index 00000000..155a546c --- /dev/null +++ b/model_application_campaign_analytics.go @@ -0,0 +1,562 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// ApplicationCampaignAnalytics struct for ApplicationCampaignAnalytics +type ApplicationCampaignAnalytics struct { + // The start of the aggregation time frame in UTC. + StartTime *time.Time `json:"startTime,omitempty"` + // The end of the aggregation time frame in UTC. + EndTime *time.Time `json:"endTime,omitempty"` + // The ID of the campaign. + CampaignId *int32 `json:"campaignId,omitempty"` + // The name of the campaign. + CampaignName *string `json:"campaignName,omitempty"` + // A list of tags for the campaign. + CampaignTags *[]string `json:"campaignTags,omitempty"` + // The state of the campaign. **Note:** A disabled or archived campaign is not evaluated for rules or coupons. + CampaignState *string `json:"campaignState,omitempty"` + // The [ID of the ruleset](https://docs.talon.one/management-api#operation/getRulesets) this campaign applies on customer session evaluation. + CampaignActiveRulesetId *int32 `json:"campaignActiveRulesetId,omitempty"` + // Date and time when the campaign becomes active. + CampaignStartTime *time.Time `json:"campaignStartTime,omitempty"` + // Date and time when the campaign becomes inactive. + CampaignEndTime *time.Time `json:"campaignEndTime,omitempty"` + TotalRevenue *ApplicationCampaignAnalyticsTotalRevenue `json:"totalRevenue,omitempty"` + SessionsCount *ApplicationCampaignAnalyticsSessionsCount `json:"sessionsCount,omitempty"` + AvgItemsPerSession *ApplicationCampaignAnalyticsAvgItemsPerSession `json:"avgItemsPerSession,omitempty"` + AvgSessionValue *ApplicationCampaignAnalyticsAvgSessionValue `json:"avgSessionValue,omitempty"` + TotalDiscounts *ApplicationCampaignAnalyticsTotalDiscounts `json:"totalDiscounts,omitempty"` + CouponsCount *ApplicationCampaignAnalyticsCouponsCount `json:"couponsCount,omitempty"` +} + +// GetStartTime returns the StartTime field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetStartTime() time.Time { + if o == nil || o.StartTime == nil { + var ret time.Time + return ret + } + return *o.StartTime +} + +// GetStartTimeOk returns a tuple with the StartTime field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetStartTimeOk() (time.Time, bool) { + if o == nil || o.StartTime == nil { + var ret time.Time + return ret, false + } + return *o.StartTime, true +} + +// HasStartTime returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasStartTime() bool { + if o != nil && o.StartTime != nil { + return true + } + + return false +} + +// SetStartTime gets a reference to the given time.Time and assigns it to the StartTime field. +func (o *ApplicationCampaignAnalytics) SetStartTime(v time.Time) { + o.StartTime = &v +} + +// GetEndTime returns the EndTime field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetEndTime() time.Time { + if o == nil || o.EndTime == nil { + var ret time.Time + return ret + } + return *o.EndTime +} + +// GetEndTimeOk returns a tuple with the EndTime field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetEndTimeOk() (time.Time, bool) { + if o == nil || o.EndTime == nil { + var ret time.Time + return ret, false + } + return *o.EndTime, true +} + +// HasEndTime returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasEndTime() bool { + if o != nil && o.EndTime != nil { + return true + } + + return false +} + +// SetEndTime gets a reference to the given time.Time and assigns it to the EndTime field. +func (o *ApplicationCampaignAnalytics) SetEndTime(v time.Time) { + o.EndTime = &v +} + +// GetCampaignId returns the CampaignId field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignId() int32 { + if o == nil || o.CampaignId == nil { + var ret int32 + return ret + } + return *o.CampaignId +} + +// GetCampaignIdOk returns a tuple with the CampaignId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignIdOk() (int32, bool) { + if o == nil || o.CampaignId == nil { + var ret int32 + return ret, false + } + return *o.CampaignId, true +} + +// HasCampaignId returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignId() bool { + if o != nil && o.CampaignId != nil { + return true + } + + return false +} + +// SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. +func (o *ApplicationCampaignAnalytics) SetCampaignId(v int32) { + o.CampaignId = &v +} + +// GetCampaignName returns the CampaignName field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignName() string { + if o == nil || o.CampaignName == nil { + var ret string + return ret + } + return *o.CampaignName +} + +// GetCampaignNameOk returns a tuple with the CampaignName field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignNameOk() (string, bool) { + if o == nil || o.CampaignName == nil { + var ret string + return ret, false + } + return *o.CampaignName, true +} + +// HasCampaignName returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignName() bool { + if o != nil && o.CampaignName != nil { + return true + } + + return false +} + +// SetCampaignName gets a reference to the given string and assigns it to the CampaignName field. +func (o *ApplicationCampaignAnalytics) SetCampaignName(v string) { + o.CampaignName = &v +} + +// GetCampaignTags returns the CampaignTags field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignTags() []string { + if o == nil || o.CampaignTags == nil { + var ret []string + return ret + } + return *o.CampaignTags +} + +// GetCampaignTagsOk returns a tuple with the CampaignTags field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignTagsOk() ([]string, bool) { + if o == nil || o.CampaignTags == nil { + var ret []string + return ret, false + } + return *o.CampaignTags, true +} + +// HasCampaignTags returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignTags() bool { + if o != nil && o.CampaignTags != nil { + return true + } + + return false +} + +// SetCampaignTags gets a reference to the given []string and assigns it to the CampaignTags field. +func (o *ApplicationCampaignAnalytics) SetCampaignTags(v []string) { + o.CampaignTags = &v +} + +// GetCampaignState returns the CampaignState field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignState() string { + if o == nil || o.CampaignState == nil { + var ret string + return ret + } + return *o.CampaignState +} + +// GetCampaignStateOk returns a tuple with the CampaignState field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignStateOk() (string, bool) { + if o == nil || o.CampaignState == nil { + var ret string + return ret, false + } + return *o.CampaignState, true +} + +// HasCampaignState returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignState() bool { + if o != nil && o.CampaignState != nil { + return true + } + + return false +} + +// SetCampaignState gets a reference to the given string and assigns it to the CampaignState field. +func (o *ApplicationCampaignAnalytics) SetCampaignState(v string) { + o.CampaignState = &v +} + +// GetCampaignActiveRulesetId returns the CampaignActiveRulesetId field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignActiveRulesetId() int32 { + if o == nil || o.CampaignActiveRulesetId == nil { + var ret int32 + return ret + } + return *o.CampaignActiveRulesetId +} + +// GetCampaignActiveRulesetIdOk returns a tuple with the CampaignActiveRulesetId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignActiveRulesetIdOk() (int32, bool) { + if o == nil || o.CampaignActiveRulesetId == nil { + var ret int32 + return ret, false + } + return *o.CampaignActiveRulesetId, true +} + +// HasCampaignActiveRulesetId returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignActiveRulesetId() bool { + if o != nil && o.CampaignActiveRulesetId != nil { + return true + } + + return false +} + +// SetCampaignActiveRulesetId gets a reference to the given int32 and assigns it to the CampaignActiveRulesetId field. +func (o *ApplicationCampaignAnalytics) SetCampaignActiveRulesetId(v int32) { + o.CampaignActiveRulesetId = &v +} + +// GetCampaignStartTime returns the CampaignStartTime field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignStartTime() time.Time { + if o == nil || o.CampaignStartTime == nil { + var ret time.Time + return ret + } + return *o.CampaignStartTime +} + +// GetCampaignStartTimeOk returns a tuple with the CampaignStartTime field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignStartTimeOk() (time.Time, bool) { + if o == nil || o.CampaignStartTime == nil { + var ret time.Time + return ret, false + } + return *o.CampaignStartTime, true +} + +// HasCampaignStartTime returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignStartTime() bool { + if o != nil && o.CampaignStartTime != nil { + return true + } + + return false +} + +// SetCampaignStartTime gets a reference to the given time.Time and assigns it to the CampaignStartTime field. +func (o *ApplicationCampaignAnalytics) SetCampaignStartTime(v time.Time) { + o.CampaignStartTime = &v +} + +// GetCampaignEndTime returns the CampaignEndTime field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCampaignEndTime() time.Time { + if o == nil || o.CampaignEndTime == nil { + var ret time.Time + return ret + } + return *o.CampaignEndTime +} + +// GetCampaignEndTimeOk returns a tuple with the CampaignEndTime field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCampaignEndTimeOk() (time.Time, bool) { + if o == nil || o.CampaignEndTime == nil { + var ret time.Time + return ret, false + } + return *o.CampaignEndTime, true +} + +// HasCampaignEndTime returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCampaignEndTime() bool { + if o != nil && o.CampaignEndTime != nil { + return true + } + + return false +} + +// SetCampaignEndTime gets a reference to the given time.Time and assigns it to the CampaignEndTime field. +func (o *ApplicationCampaignAnalytics) SetCampaignEndTime(v time.Time) { + o.CampaignEndTime = &v +} + +// GetTotalRevenue returns the TotalRevenue field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetTotalRevenue() ApplicationCampaignAnalyticsTotalRevenue { + if o == nil || o.TotalRevenue == nil { + var ret ApplicationCampaignAnalyticsTotalRevenue + return ret + } + return *o.TotalRevenue +} + +// GetTotalRevenueOk returns a tuple with the TotalRevenue field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetTotalRevenueOk() (ApplicationCampaignAnalyticsTotalRevenue, bool) { + if o == nil || o.TotalRevenue == nil { + var ret ApplicationCampaignAnalyticsTotalRevenue + return ret, false + } + return *o.TotalRevenue, true +} + +// HasTotalRevenue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasTotalRevenue() bool { + if o != nil && o.TotalRevenue != nil { + return true + } + + return false +} + +// SetTotalRevenue gets a reference to the given ApplicationCampaignAnalyticsTotalRevenue and assigns it to the TotalRevenue field. +func (o *ApplicationCampaignAnalytics) SetTotalRevenue(v ApplicationCampaignAnalyticsTotalRevenue) { + o.TotalRevenue = &v +} + +// GetSessionsCount returns the SessionsCount field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetSessionsCount() ApplicationCampaignAnalyticsSessionsCount { + if o == nil || o.SessionsCount == nil { + var ret ApplicationCampaignAnalyticsSessionsCount + return ret + } + return *o.SessionsCount +} + +// GetSessionsCountOk returns a tuple with the SessionsCount field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetSessionsCountOk() (ApplicationCampaignAnalyticsSessionsCount, bool) { + if o == nil || o.SessionsCount == nil { + var ret ApplicationCampaignAnalyticsSessionsCount + return ret, false + } + return *o.SessionsCount, true +} + +// HasSessionsCount returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasSessionsCount() bool { + if o != nil && o.SessionsCount != nil { + return true + } + + return false +} + +// SetSessionsCount gets a reference to the given ApplicationCampaignAnalyticsSessionsCount and assigns it to the SessionsCount field. +func (o *ApplicationCampaignAnalytics) SetSessionsCount(v ApplicationCampaignAnalyticsSessionsCount) { + o.SessionsCount = &v +} + +// GetAvgItemsPerSession returns the AvgItemsPerSession field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetAvgItemsPerSession() ApplicationCampaignAnalyticsAvgItemsPerSession { + if o == nil || o.AvgItemsPerSession == nil { + var ret ApplicationCampaignAnalyticsAvgItemsPerSession + return ret + } + return *o.AvgItemsPerSession +} + +// GetAvgItemsPerSessionOk returns a tuple with the AvgItemsPerSession field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetAvgItemsPerSessionOk() (ApplicationCampaignAnalyticsAvgItemsPerSession, bool) { + if o == nil || o.AvgItemsPerSession == nil { + var ret ApplicationCampaignAnalyticsAvgItemsPerSession + return ret, false + } + return *o.AvgItemsPerSession, true +} + +// HasAvgItemsPerSession returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasAvgItemsPerSession() bool { + if o != nil && o.AvgItemsPerSession != nil { + return true + } + + return false +} + +// SetAvgItemsPerSession gets a reference to the given ApplicationCampaignAnalyticsAvgItemsPerSession and assigns it to the AvgItemsPerSession field. +func (o *ApplicationCampaignAnalytics) SetAvgItemsPerSession(v ApplicationCampaignAnalyticsAvgItemsPerSession) { + o.AvgItemsPerSession = &v +} + +// GetAvgSessionValue returns the AvgSessionValue field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetAvgSessionValue() ApplicationCampaignAnalyticsAvgSessionValue { + if o == nil || o.AvgSessionValue == nil { + var ret ApplicationCampaignAnalyticsAvgSessionValue + return ret + } + return *o.AvgSessionValue +} + +// GetAvgSessionValueOk returns a tuple with the AvgSessionValue field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetAvgSessionValueOk() (ApplicationCampaignAnalyticsAvgSessionValue, bool) { + if o == nil || o.AvgSessionValue == nil { + var ret ApplicationCampaignAnalyticsAvgSessionValue + return ret, false + } + return *o.AvgSessionValue, true +} + +// HasAvgSessionValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasAvgSessionValue() bool { + if o != nil && o.AvgSessionValue != nil { + return true + } + + return false +} + +// SetAvgSessionValue gets a reference to the given ApplicationCampaignAnalyticsAvgSessionValue and assigns it to the AvgSessionValue field. +func (o *ApplicationCampaignAnalytics) SetAvgSessionValue(v ApplicationCampaignAnalyticsAvgSessionValue) { + o.AvgSessionValue = &v +} + +// GetTotalDiscounts returns the TotalDiscounts field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetTotalDiscounts() ApplicationCampaignAnalyticsTotalDiscounts { + if o == nil || o.TotalDiscounts == nil { + var ret ApplicationCampaignAnalyticsTotalDiscounts + return ret + } + return *o.TotalDiscounts +} + +// GetTotalDiscountsOk returns a tuple with the TotalDiscounts field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetTotalDiscountsOk() (ApplicationCampaignAnalyticsTotalDiscounts, bool) { + if o == nil || o.TotalDiscounts == nil { + var ret ApplicationCampaignAnalyticsTotalDiscounts + return ret, false + } + return *o.TotalDiscounts, true +} + +// HasTotalDiscounts returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasTotalDiscounts() bool { + if o != nil && o.TotalDiscounts != nil { + return true + } + + return false +} + +// SetTotalDiscounts gets a reference to the given ApplicationCampaignAnalyticsTotalDiscounts and assigns it to the TotalDiscounts field. +func (o *ApplicationCampaignAnalytics) SetTotalDiscounts(v ApplicationCampaignAnalyticsTotalDiscounts) { + o.TotalDiscounts = &v +} + +// GetCouponsCount returns the CouponsCount field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalytics) GetCouponsCount() ApplicationCampaignAnalyticsCouponsCount { + if o == nil || o.CouponsCount == nil { + var ret ApplicationCampaignAnalyticsCouponsCount + return ret + } + return *o.CouponsCount +} + +// GetCouponsCountOk returns a tuple with the CouponsCount field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalytics) GetCouponsCountOk() (ApplicationCampaignAnalyticsCouponsCount, bool) { + if o == nil || o.CouponsCount == nil { + var ret ApplicationCampaignAnalyticsCouponsCount + return ret, false + } + return *o.CouponsCount, true +} + +// HasCouponsCount returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalytics) HasCouponsCount() bool { + if o != nil && o.CouponsCount != nil { + return true + } + + return false +} + +// SetCouponsCount gets a reference to the given ApplicationCampaignAnalyticsCouponsCount and assigns it to the CouponsCount field. +func (o *ApplicationCampaignAnalytics) SetCouponsCount(v ApplicationCampaignAnalyticsCouponsCount) { + o.CouponsCount = &v +} + +type NullableApplicationCampaignAnalytics struct { + Value ApplicationCampaignAnalytics + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalytics) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalytics) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_campaign_analytics_avg_items_per_session.go b/model_application_campaign_analytics_avg_items_per_session.go new file mode 100644 index 00000000..ec183345 --- /dev/null +++ b/model_application_campaign_analytics_avg_items_per_session.go @@ -0,0 +1,144 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationCampaignAnalyticsAvgItemsPerSession The number of items from sessions divided by the number of sessions. The `influenced` value includes only sessions with at least one applied effect. +type ApplicationCampaignAnalyticsAvgItemsPerSession struct { + Value *float32 `json:"value,omitempty"` + Uplift *float32 `json:"uplift,omitempty"` + Trend *float32 `json:"trend,omitempty"` +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetValue() float32 { + if o == nil || o.Value == nil { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetValueOk() (float32, bool) { + if o == nil || o.Value == nil { + var ret float32 + return ret, false + } + return *o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) SetValue(v float32) { + o.Value = &v +} + +// GetUplift returns the Uplift field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetUplift() float32 { + if o == nil || o.Uplift == nil { + var ret float32 + return ret + } + return *o.Uplift +} + +// GetUpliftOk returns a tuple with the Uplift field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetUpliftOk() (float32, bool) { + if o == nil || o.Uplift == nil { + var ret float32 + return ret, false + } + return *o.Uplift, true +} + +// HasUplift returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) HasUplift() bool { + if o != nil && o.Uplift != nil { + return true + } + + return false +} + +// SetUplift gets a reference to the given float32 and assigns it to the Uplift field. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) SetUplift(v float32) { + o.Uplift = &v +} + +// GetTrend returns the Trend field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetTrend() float32 { + if o == nil || o.Trend == nil { + var ret float32 + return ret + } + return *o.Trend +} + +// GetTrendOk returns a tuple with the Trend field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) GetTrendOk() (float32, bool) { + if o == nil || o.Trend == nil { + var ret float32 + return ret, false + } + return *o.Trend, true +} + +// HasTrend returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) HasTrend() bool { + if o != nil && o.Trend != nil { + return true + } + + return false +} + +// SetTrend gets a reference to the given float32 and assigns it to the Trend field. +func (o *ApplicationCampaignAnalyticsAvgItemsPerSession) SetTrend(v float32) { + o.Trend = &v +} + +type NullableApplicationCampaignAnalyticsAvgItemsPerSession struct { + Value ApplicationCampaignAnalyticsAvgItemsPerSession + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalyticsAvgItemsPerSession) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalyticsAvgItemsPerSession) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_campaign_analytics_avg_session_value.go b/model_application_campaign_analytics_avg_session_value.go new file mode 100644 index 00000000..a91ba6fb --- /dev/null +++ b/model_application_campaign_analytics_avg_session_value.go @@ -0,0 +1,144 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationCampaignAnalyticsAvgSessionValue The average customer session value, calculated by dividing the revenue value by the number of sessions. The `influenced` value includes only sessions with at least one applied effect. +type ApplicationCampaignAnalyticsAvgSessionValue struct { + Value *float32 `json:"value,omitempty"` + Uplift *float32 `json:"uplift,omitempty"` + Trend *float32 `json:"trend,omitempty"` +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetValue() float32 { + if o == nil || o.Value == nil { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetValueOk() (float32, bool) { + if o == nil || o.Value == nil { + var ret float32 + return ret, false + } + return *o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) SetValue(v float32) { + o.Value = &v +} + +// GetUplift returns the Uplift field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetUplift() float32 { + if o == nil || o.Uplift == nil { + var ret float32 + return ret + } + return *o.Uplift +} + +// GetUpliftOk returns a tuple with the Uplift field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetUpliftOk() (float32, bool) { + if o == nil || o.Uplift == nil { + var ret float32 + return ret, false + } + return *o.Uplift, true +} + +// HasUplift returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) HasUplift() bool { + if o != nil && o.Uplift != nil { + return true + } + + return false +} + +// SetUplift gets a reference to the given float32 and assigns it to the Uplift field. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) SetUplift(v float32) { + o.Uplift = &v +} + +// GetTrend returns the Trend field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetTrend() float32 { + if o == nil || o.Trend == nil { + var ret float32 + return ret + } + return *o.Trend +} + +// GetTrendOk returns a tuple with the Trend field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) GetTrendOk() (float32, bool) { + if o == nil || o.Trend == nil { + var ret float32 + return ret, false + } + return *o.Trend, true +} + +// HasTrend returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) HasTrend() bool { + if o != nil && o.Trend != nil { + return true + } + + return false +} + +// SetTrend gets a reference to the given float32 and assigns it to the Trend field. +func (o *ApplicationCampaignAnalyticsAvgSessionValue) SetTrend(v float32) { + o.Trend = &v +} + +type NullableApplicationCampaignAnalyticsAvgSessionValue struct { + Value ApplicationCampaignAnalyticsAvgSessionValue + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalyticsAvgSessionValue) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalyticsAvgSessionValue) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_campaign_analytics_coupons_count.go b/model_application_campaign_analytics_coupons_count.go new file mode 100644 index 00000000..5af8bbd9 --- /dev/null +++ b/model_application_campaign_analytics_coupons_count.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationCampaignAnalyticsCouponsCount The number of times a coupon was successfully redeemed in influenced sessions. +type ApplicationCampaignAnalyticsCouponsCount struct { + Value *float32 `json:"value,omitempty"` + Trend *float32 `json:"trend,omitempty"` +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsCouponsCount) GetValue() float32 { + if o == nil || o.Value == nil { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsCouponsCount) GetValueOk() (float32, bool) { + if o == nil || o.Value == nil { + var ret float32 + return ret, false + } + return *o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsCouponsCount) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *ApplicationCampaignAnalyticsCouponsCount) SetValue(v float32) { + o.Value = &v +} + +// GetTrend returns the Trend field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsCouponsCount) GetTrend() float32 { + if o == nil || o.Trend == nil { + var ret float32 + return ret + } + return *o.Trend +} + +// GetTrendOk returns a tuple with the Trend field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsCouponsCount) GetTrendOk() (float32, bool) { + if o == nil || o.Trend == nil { + var ret float32 + return ret, false + } + return *o.Trend, true +} + +// HasTrend returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsCouponsCount) HasTrend() bool { + if o != nil && o.Trend != nil { + return true + } + + return false +} + +// SetTrend gets a reference to the given float32 and assigns it to the Trend field. +func (o *ApplicationCampaignAnalyticsCouponsCount) SetTrend(v float32) { + o.Trend = &v +} + +type NullableApplicationCampaignAnalyticsCouponsCount struct { + Value ApplicationCampaignAnalyticsCouponsCount + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalyticsCouponsCount) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalyticsCouponsCount) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_campaign_analytics_sessions_count.go b/model_application_campaign_analytics_sessions_count.go new file mode 100644 index 00000000..a90d4055 --- /dev/null +++ b/model_application_campaign_analytics_sessions_count.go @@ -0,0 +1,144 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationCampaignAnalyticsSessionsCount The number of all closed sessions. The `influenced` value includes only sessions with at least one applied effect. +type ApplicationCampaignAnalyticsSessionsCount struct { + Value *float32 `json:"value,omitempty"` + InfluenceRate *float32 `json:"influence_rate,omitempty"` + Trend *float32 `json:"trend,omitempty"` +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsSessionsCount) GetValue() float32 { + if o == nil || o.Value == nil { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsSessionsCount) GetValueOk() (float32, bool) { + if o == nil || o.Value == nil { + var ret float32 + return ret, false + } + return *o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsSessionsCount) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *ApplicationCampaignAnalyticsSessionsCount) SetValue(v float32) { + o.Value = &v +} + +// GetInfluenceRate returns the InfluenceRate field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsSessionsCount) GetInfluenceRate() float32 { + if o == nil || o.InfluenceRate == nil { + var ret float32 + return ret + } + return *o.InfluenceRate +} + +// GetInfluenceRateOk returns a tuple with the InfluenceRate field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsSessionsCount) GetInfluenceRateOk() (float32, bool) { + if o == nil || o.InfluenceRate == nil { + var ret float32 + return ret, false + } + return *o.InfluenceRate, true +} + +// HasInfluenceRate returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsSessionsCount) HasInfluenceRate() bool { + if o != nil && o.InfluenceRate != nil { + return true + } + + return false +} + +// SetInfluenceRate gets a reference to the given float32 and assigns it to the InfluenceRate field. +func (o *ApplicationCampaignAnalyticsSessionsCount) SetInfluenceRate(v float32) { + o.InfluenceRate = &v +} + +// GetTrend returns the Trend field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsSessionsCount) GetTrend() float32 { + if o == nil || o.Trend == nil { + var ret float32 + return ret + } + return *o.Trend +} + +// GetTrendOk returns a tuple with the Trend field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsSessionsCount) GetTrendOk() (float32, bool) { + if o == nil || o.Trend == nil { + var ret float32 + return ret, false + } + return *o.Trend, true +} + +// HasTrend returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsSessionsCount) HasTrend() bool { + if o != nil && o.Trend != nil { + return true + } + + return false +} + +// SetTrend gets a reference to the given float32 and assigns it to the Trend field. +func (o *ApplicationCampaignAnalyticsSessionsCount) SetTrend(v float32) { + o.Trend = &v +} + +type NullableApplicationCampaignAnalyticsSessionsCount struct { + Value ApplicationCampaignAnalyticsSessionsCount + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalyticsSessionsCount) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalyticsSessionsCount) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_campaign_analytics_total_discounts.go b/model_application_campaign_analytics_total_discounts.go new file mode 100644 index 00000000..b3b983ad --- /dev/null +++ b/model_application_campaign_analytics_total_discounts.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationCampaignAnalyticsTotalDiscounts The total value of discounts given for cart items in influenced sessions. +type ApplicationCampaignAnalyticsTotalDiscounts struct { + Value *float32 `json:"value,omitempty"` + Trend *float32 `json:"trend,omitempty"` +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetValue() float32 { + if o == nil || o.Value == nil { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetValueOk() (float32, bool) { + if o == nil || o.Value == nil { + var ret float32 + return ret, false + } + return *o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) SetValue(v float32) { + o.Value = &v +} + +// GetTrend returns the Trend field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetTrend() float32 { + if o == nil || o.Trend == nil { + var ret float32 + return ret + } + return *o.Trend +} + +// GetTrendOk returns a tuple with the Trend field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) GetTrendOk() (float32, bool) { + if o == nil || o.Trend == nil { + var ret float32 + return ret, false + } + return *o.Trend, true +} + +// HasTrend returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) HasTrend() bool { + if o != nil && o.Trend != nil { + return true + } + + return false +} + +// SetTrend gets a reference to the given float32 and assigns it to the Trend field. +func (o *ApplicationCampaignAnalyticsTotalDiscounts) SetTrend(v float32) { + o.Trend = &v +} + +type NullableApplicationCampaignAnalyticsTotalDiscounts struct { + Value ApplicationCampaignAnalyticsTotalDiscounts + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalyticsTotalDiscounts) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalyticsTotalDiscounts) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_campaign_analytics_total_revenue.go b/model_application_campaign_analytics_total_revenue.go new file mode 100644 index 00000000..594334ed --- /dev/null +++ b/model_application_campaign_analytics_total_revenue.go @@ -0,0 +1,144 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ApplicationCampaignAnalyticsTotalRevenue The total, pre-discount value of all items purchased in a customer session. +type ApplicationCampaignAnalyticsTotalRevenue struct { + Value *float32 `json:"value,omitempty"` + InfluenceRate *float32 `json:"influence_rate,omitempty"` + Trend *float32 `json:"trend,omitempty"` +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsTotalRevenue) GetValue() float32 { + if o == nil || o.Value == nil { + var ret float32 + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsTotalRevenue) GetValueOk() (float32, bool) { + if o == nil || o.Value == nil { + var ret float32 + return ret, false + } + return *o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsTotalRevenue) HasValue() bool { + if o != nil && o.Value != nil { + return true + } + + return false +} + +// SetValue gets a reference to the given float32 and assigns it to the Value field. +func (o *ApplicationCampaignAnalyticsTotalRevenue) SetValue(v float32) { + o.Value = &v +} + +// GetInfluenceRate returns the InfluenceRate field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsTotalRevenue) GetInfluenceRate() float32 { + if o == nil || o.InfluenceRate == nil { + var ret float32 + return ret + } + return *o.InfluenceRate +} + +// GetInfluenceRateOk returns a tuple with the InfluenceRate field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsTotalRevenue) GetInfluenceRateOk() (float32, bool) { + if o == nil || o.InfluenceRate == nil { + var ret float32 + return ret, false + } + return *o.InfluenceRate, true +} + +// HasInfluenceRate returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsTotalRevenue) HasInfluenceRate() bool { + if o != nil && o.InfluenceRate != nil { + return true + } + + return false +} + +// SetInfluenceRate gets a reference to the given float32 and assigns it to the InfluenceRate field. +func (o *ApplicationCampaignAnalyticsTotalRevenue) SetInfluenceRate(v float32) { + o.InfluenceRate = &v +} + +// GetTrend returns the Trend field value if set, zero value otherwise. +func (o *ApplicationCampaignAnalyticsTotalRevenue) GetTrend() float32 { + if o == nil || o.Trend == nil { + var ret float32 + return ret + } + return *o.Trend +} + +// GetTrendOk returns a tuple with the Trend field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ApplicationCampaignAnalyticsTotalRevenue) GetTrendOk() (float32, bool) { + if o == nil || o.Trend == nil { + var ret float32 + return ret, false + } + return *o.Trend, true +} + +// HasTrend returns a boolean if a field has been set. +func (o *ApplicationCampaignAnalyticsTotalRevenue) HasTrend() bool { + if o != nil && o.Trend != nil { + return true + } + + return false +} + +// SetTrend gets a reference to the given float32 and assigns it to the Trend field. +func (o *ApplicationCampaignAnalyticsTotalRevenue) SetTrend(v float32) { + o.Trend = &v +} + +type NullableApplicationCampaignAnalyticsTotalRevenue struct { + Value ApplicationCampaignAnalyticsTotalRevenue + ExplicitNull bool +} + +func (v NullableApplicationCampaignAnalyticsTotalRevenue) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableApplicationCampaignAnalyticsTotalRevenue) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_application_customer.go b/model_application_customer.go index 5a8a1398..a9cb6310 100644 --- a/model_application_customer.go +++ b/model_application_customer.go @@ -37,7 +37,7 @@ type ApplicationCustomer struct { AudienceMemberships *[]AudienceMembership `json:"audienceMemberships,omitempty"` // Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. LastActivity time.Time `json:"lastActivity"` - // 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). + // An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). Sandbox *bool `json:"sandbox,omitempty"` // The Integration ID of the Customer Profile that referred this Customer in the Application. AdvocateIntegrationId *string `json:"advocateIntegrationId,omitempty"` diff --git a/model_audience_analytics.go b/model_audience_analytics.go index 8893c111..36643481 100644 --- a/model_audience_analytics.go +++ b/model_audience_analytics.go @@ -14,11 +14,11 @@ import ( "encoding/json" ) -// AudienceAnalytics The audiences and their members count. +// AudienceAnalytics The audiences and their member count. type AudienceAnalytics struct { // The ID of the audience. AudienceId *int32 `json:"audienceId,omitempty"` - // The count of members under a single audience. + // The member count of the audience. MembersCount *int32 `json:"membersCount,omitempty"` } diff --git a/model_audience_customer.go b/model_audience_customer.go index 9dbddeb6..777475c3 100644 --- a/model_audience_customer.go +++ b/model_audience_customer.go @@ -37,7 +37,7 @@ type AudienceCustomer struct { AudienceMemberships *[]AudienceMembership `json:"audienceMemberships,omitempty"` // Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. LastActivity time.Time `json:"lastActivity"` - // 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). + // An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). Sandbox *bool `json:"sandbox,omitempty"` // A list of the IDs of the Applications that are connected to this customer profile. ConnectedApplicationsIds *[]int32 `json:"connectedApplicationsIds,omitempty"` diff --git a/model_base_campaign.go b/model_base_campaign.go index bb1b5c35..4450ff2d 100644 --- a/model_base_campaign.go +++ b/model_base_campaign.go @@ -41,8 +41,6 @@ type BaseCampaign struct { Limits []LimitConfig `json:"limits"` // The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. CampaignGroups *[]int32 `json:"campaignGroups,omitempty"` - // The ID of the campaign evaluation group the campaign belongs to. - EvaluationGroupId *int32 `json:"evaluationGroupId,omitempty"` // The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. Type *string `json:"type,omitempty"` // A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. @@ -388,39 +386,6 @@ func (o *BaseCampaign) SetCampaignGroups(v []int32) { o.CampaignGroups = &v } -// GetEvaluationGroupId returns the EvaluationGroupId field value if set, zero value otherwise. -func (o *BaseCampaign) GetEvaluationGroupId() int32 { - if o == nil || o.EvaluationGroupId == nil { - var ret int32 - return ret - } - return *o.EvaluationGroupId -} - -// GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *BaseCampaign) GetEvaluationGroupIdOk() (int32, bool) { - if o == nil || o.EvaluationGroupId == nil { - var ret int32 - return ret, false - } - return *o.EvaluationGroupId, true -} - -// HasEvaluationGroupId returns a boolean if a field has been set. -func (o *BaseCampaign) HasEvaluationGroupId() bool { - if o != nil && o.EvaluationGroupId != nil { - return true - } - - return false -} - -// SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. -func (o *BaseCampaign) SetEvaluationGroupId(v int32) { - o.EvaluationGroupId = &v -} - // GetType returns the Type field value if set, zero value otherwise. func (o *BaseCampaign) GetType() string { if o == nil || o.Type == nil { diff --git a/model_base_loyalty_program.go b/model_base_loyalty_program.go index 48b4c750..e69634bb 100644 --- a/model_base_loyalty_program.go +++ b/model_base_loyalty_program.go @@ -32,10 +32,14 @@ type BaseLoyaltyProgram struct { UsersPerCardLimit *int32 `json:"usersPerCardLimit,omitempty"` // 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. Sandbox *bool `json:"sandbox,omitempty"` - // The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + // The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + TiersExpirationPolicy *string `json:"tiersExpirationPolicy,omitempty"` + // The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. TiersExpireIn *string `json:"tiersExpireIn,omitempty"` // Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"` + // The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + ProgramJoinPolicy *string `json:"programJoinPolicy,omitempty"` } // GetTitle returns the Title field value if set, zero value otherwise. @@ -302,6 +306,39 @@ func (o *BaseLoyaltyProgram) SetSandbox(v bool) { o.Sandbox = &v } +// GetTiersExpirationPolicy returns the TiersExpirationPolicy field value if set, zero value otherwise. +func (o *BaseLoyaltyProgram) GetTiersExpirationPolicy() string { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret + } + return *o.TiersExpirationPolicy +} + +// GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *BaseLoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool) { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret, false + } + return *o.TiersExpirationPolicy, true +} + +// HasTiersExpirationPolicy returns a boolean if a field has been set. +func (o *BaseLoyaltyProgram) HasTiersExpirationPolicy() bool { + if o != nil && o.TiersExpirationPolicy != nil { + return true + } + + return false +} + +// SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. +func (o *BaseLoyaltyProgram) SetTiersExpirationPolicy(v string) { + o.TiersExpirationPolicy = &v +} + // GetTiersExpireIn returns the TiersExpireIn field value if set, zero value otherwise. func (o *BaseLoyaltyProgram) GetTiersExpireIn() string { if o == nil || o.TiersExpireIn == nil { @@ -368,6 +405,39 @@ func (o *BaseLoyaltyProgram) SetTiersDowngradePolicy(v string) { o.TiersDowngradePolicy = &v } +// GetProgramJoinPolicy returns the ProgramJoinPolicy field value if set, zero value otherwise. +func (o *BaseLoyaltyProgram) GetProgramJoinPolicy() string { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret + } + return *o.ProgramJoinPolicy +} + +// GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *BaseLoyaltyProgram) GetProgramJoinPolicyOk() (string, bool) { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret, false + } + return *o.ProgramJoinPolicy, true +} + +// HasProgramJoinPolicy returns a boolean if a field has been set. +func (o *BaseLoyaltyProgram) HasProgramJoinPolicy() bool { + if o != nil && o.ProgramJoinPolicy != nil { + return true + } + + return false +} + +// SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. +func (o *BaseLoyaltyProgram) SetProgramJoinPolicy(v string) { + o.ProgramJoinPolicy = &v +} + type NullableBaseLoyaltyProgram struct { Value BaseLoyaltyProgram ExplicitNull bool diff --git a/model_campaign.go b/model_campaign.go index b84b887e..c4c5f777 100644 --- a/model_campaign.go +++ b/model_campaign.go @@ -49,8 +49,6 @@ type Campaign struct { Limits []LimitConfig `json:"limits"` // The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. CampaignGroups *[]int32 `json:"campaignGroups,omitempty"` - // The ID of the campaign evaluation group the campaign belongs to. - EvaluationGroupId *int32 `json:"evaluationGroupId,omitempty"` // The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. Type string `json:"type"` // A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. @@ -97,6 +95,8 @@ type Campaign struct { UpdatedBy *string `json:"updatedBy,omitempty"` // The ID of the Campaign Template this Campaign was created from. TemplateId *int32 `json:"templateId,omitempty"` + // A campaign state described exactly as in the Campaign Manager. + FrontendState string `json:"frontendState"` } // GetId returns the Id field value @@ -480,39 +480,6 @@ func (o *Campaign) SetCampaignGroups(v []int32) { o.CampaignGroups = &v } -// GetEvaluationGroupId returns the EvaluationGroupId field value if set, zero value otherwise. -func (o *Campaign) GetEvaluationGroupId() int32 { - if o == nil || o.EvaluationGroupId == nil { - var ret int32 - return ret - } - return *o.EvaluationGroupId -} - -// GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *Campaign) GetEvaluationGroupIdOk() (int32, bool) { - if o == nil || o.EvaluationGroupId == nil { - var ret int32 - return ret, false - } - return *o.EvaluationGroupId, true -} - -// HasEvaluationGroupId returns a boolean if a field has been set. -func (o *Campaign) HasEvaluationGroupId() bool { - if o != nil && o.EvaluationGroupId != nil { - return true - } - - return false -} - -// SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. -func (o *Campaign) SetEvaluationGroupId(v int32) { - o.EvaluationGroupId = &v -} - // GetType returns the Type field value func (o *Campaign) GetType() string { if o == nil { @@ -1236,6 +1203,21 @@ func (o *Campaign) SetTemplateId(v int32) { o.TemplateId = &v } +// GetFrontendState returns the FrontendState field value +func (o *Campaign) GetFrontendState() string { + if o == nil { + var ret string + return ret + } + + return o.FrontendState +} + +// SetFrontendState sets field value +func (o *Campaign) SetFrontendState(v string) { + o.FrontendState = v +} + type NullableCampaign struct { Value Campaign ExplicitNull bool diff --git a/model_campaign_created_notification.go b/model_campaign_created_notification.go index 1dc39058..d6747183 100644 --- a/model_campaign_created_notification.go +++ b/model_campaign_created_notification.go @@ -16,15 +16,15 @@ import ( // CampaignCreatedNotification A notification regarding a campaign that was created. type CampaignCreatedNotification struct { - Campaign CampaignStateNotification `json:"campaign"` + Campaign Campaign `json:"campaign"` Ruleset *Ruleset `json:"ruleset,omitempty"` EvaluationPosition CampaignEvaluationPosition `json:"evaluationPosition"` } // GetCampaign returns the Campaign field value -func (o *CampaignCreatedNotification) GetCampaign() CampaignStateNotification { +func (o *CampaignCreatedNotification) GetCampaign() Campaign { if o == nil { - var ret CampaignStateNotification + var ret Campaign return ret } @@ -32,7 +32,7 @@ func (o *CampaignCreatedNotification) GetCampaign() CampaignStateNotification { } // SetCampaign sets field value -func (o *CampaignCreatedNotification) SetCampaign(v CampaignStateNotification) { +func (o *CampaignCreatedNotification) SetCampaign(v Campaign) { o.Campaign = v } diff --git a/model_campaign_deleted_notification.go b/model_campaign_deleted_notification.go index bae9b557..03a46e82 100644 --- a/model_campaign_deleted_notification.go +++ b/model_campaign_deleted_notification.go @@ -17,15 +17,15 @@ import ( // CampaignDeletedNotification A notification regarding a campaign that was deleted. type CampaignDeletedNotification struct { - Campaign CampaignStateNotification `json:"campaign"` + Campaign Campaign `json:"campaign"` // Time when the campaign was deleted. DeletedAt time.Time `json:"deletedAt"` } // GetCampaign returns the Campaign field value -func (o *CampaignDeletedNotification) GetCampaign() CampaignStateNotification { +func (o *CampaignDeletedNotification) GetCampaign() Campaign { if o == nil { - var ret CampaignStateNotification + var ret Campaign return ret } @@ -33,7 +33,7 @@ func (o *CampaignDeletedNotification) GetCampaign() CampaignStateNotification { } // SetCampaign sets field value -func (o *CampaignDeletedNotification) SetCampaign(v CampaignStateNotification) { +func (o *CampaignDeletedNotification) SetCampaign(v Campaign) { o.Campaign = v } diff --git a/model_campaign_edited_notification.go b/model_campaign_edited_notification.go index ac27b66f..da2433ac 100644 --- a/model_campaign_edited_notification.go +++ b/model_campaign_edited_notification.go @@ -16,15 +16,15 @@ import ( // CampaignEditedNotification A notification regarding a campaign which was edited. type CampaignEditedNotification struct { - Campaign CampaignStateNotification `json:"campaign"` - OldCampaign CampaignStateNotification `json:"oldCampaign"` - Ruleset *Ruleset `json:"ruleset,omitempty"` + Campaign Campaign `json:"campaign"` + OldCampaign Campaign `json:"oldCampaign"` + Ruleset *Ruleset `json:"ruleset,omitempty"` } // GetCampaign returns the Campaign field value -func (o *CampaignEditedNotification) GetCampaign() CampaignStateNotification { +func (o *CampaignEditedNotification) GetCampaign() Campaign { if o == nil { - var ret CampaignStateNotification + var ret Campaign return ret } @@ -32,14 +32,14 @@ func (o *CampaignEditedNotification) GetCampaign() CampaignStateNotification { } // SetCampaign sets field value -func (o *CampaignEditedNotification) SetCampaign(v CampaignStateNotification) { +func (o *CampaignEditedNotification) SetCampaign(v Campaign) { o.Campaign = v } // GetOldCampaign returns the OldCampaign field value -func (o *CampaignEditedNotification) GetOldCampaign() CampaignStateNotification { +func (o *CampaignEditedNotification) GetOldCampaign() Campaign { if o == nil { - var ret CampaignStateNotification + var ret Campaign return ret } @@ -47,7 +47,7 @@ func (o *CampaignEditedNotification) GetOldCampaign() CampaignStateNotification } // SetOldCampaign sets field value -func (o *CampaignEditedNotification) SetOldCampaign(v CampaignStateNotification) { +func (o *CampaignEditedNotification) SetOldCampaign(v Campaign) { o.OldCampaign = v } diff --git a/model_campaign_group.go b/model_campaign_group.go index c3de2d43..4c1ff44c 100644 --- a/model_campaign_group.go +++ b/model_campaign_group.go @@ -25,7 +25,7 @@ type CampaignGroup struct { Modified time.Time `json:"modified"` // The ID of the account that owns this entity. AccountId int32 `json:"accountId"` - // The name of this campaign access group. + // The name of the campaign access group. Name string `json:"name"` // A longer description of the campaign access group. Description *string `json:"description,omitempty"` diff --git a/model_campaign_ruleset_changed_notification.go b/model_campaign_ruleset_changed_notification.go index eec3a97b..26c50c6d 100644 --- a/model_campaign_ruleset_changed_notification.go +++ b/model_campaign_ruleset_changed_notification.go @@ -16,15 +16,15 @@ import ( // CampaignRulesetChangedNotification A notification regarding a campaign whose ruleset was changed. type CampaignRulesetChangedNotification struct { - Campaign CampaignStateNotification `json:"campaign"` - OldRuleset *Ruleset `json:"oldRuleset,omitempty"` - Ruleset *Ruleset `json:"ruleset,omitempty"` + Campaign Campaign `json:"campaign"` + OldRuleset *Ruleset `json:"oldRuleset,omitempty"` + Ruleset *Ruleset `json:"ruleset,omitempty"` } // GetCampaign returns the Campaign field value -func (o *CampaignRulesetChangedNotification) GetCampaign() CampaignStateNotification { +func (o *CampaignRulesetChangedNotification) GetCampaign() Campaign { if o == nil { - var ret CampaignStateNotification + var ret Campaign return ret } @@ -32,7 +32,7 @@ func (o *CampaignRulesetChangedNotification) GetCampaign() CampaignStateNotifica } // SetCampaign sets field value -func (o *CampaignRulesetChangedNotification) SetCampaign(v CampaignStateNotification) { +func (o *CampaignRulesetChangedNotification) SetCampaign(v Campaign) { o.Campaign = v } diff --git a/model_campaign_state_changed_notification.go b/model_campaign_state_changed_notification.go index 7350fa05..f5d60aae 100644 --- a/model_campaign_state_changed_notification.go +++ b/model_campaign_state_changed_notification.go @@ -16,7 +16,7 @@ import ( // CampaignStateChangedNotification A notification regarding a campaign whose state changed. type CampaignStateChangedNotification struct { - Campaign CampaignForNotification `json:"campaign"` + Campaign Campaign `json:"campaign"` // The campaign's old state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] OldState string `json:"oldState"` // The campaign's new state. Can be one of the following: ['running', 'disabled', 'scheduled', 'expired', 'draft', 'archived'] @@ -25,9 +25,9 @@ type CampaignStateChangedNotification struct { } // GetCampaign returns the Campaign field value -func (o *CampaignStateChangedNotification) GetCampaign() CampaignForNotification { +func (o *CampaignStateChangedNotification) GetCampaign() Campaign { if o == nil { - var ret CampaignForNotification + var ret Campaign return ret } @@ -35,7 +35,7 @@ func (o *CampaignStateChangedNotification) GetCampaign() CampaignForNotification } // SetCampaign sets field value -func (o *CampaignStateChangedNotification) SetCampaign(v CampaignForNotification) { +func (o *CampaignStateChangedNotification) SetCampaign(v Campaign) { o.Campaign = v } diff --git a/model_card_expiring_points_notification_policy.go b/model_card_expiring_points_notification_policy.go new file mode 100644 index 00000000..89931394 --- /dev/null +++ b/model_card_expiring_points_notification_policy.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// CardExpiringPointsNotificationPolicy struct for CardExpiringPointsNotificationPolicy +type CardExpiringPointsNotificationPolicy struct { + // Notification name. + Name string `json:"name"` + Triggers []CardExpiringPointsNotificationTrigger `json:"triggers"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` +} + +// GetName returns the Name field value +func (o *CardExpiringPointsNotificationPolicy) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *CardExpiringPointsNotificationPolicy) SetName(v string) { + o.Name = v +} + +// GetTriggers returns the Triggers field value +func (o *CardExpiringPointsNotificationPolicy) GetTriggers() []CardExpiringPointsNotificationTrigger { + if o == nil { + var ret []CardExpiringPointsNotificationTrigger + return ret + } + + return o.Triggers +} + +// SetTriggers sets field value +func (o *CardExpiringPointsNotificationPolicy) SetTriggers(v []CardExpiringPointsNotificationTrigger) { + o.Triggers = v +} + +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *CardExpiringPointsNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CardExpiringPointsNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *CardExpiringPointsNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *CardExpiringPointsNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + +type NullableCardExpiringPointsNotificationPolicy struct { + Value CardExpiringPointsNotificationPolicy + ExplicitNull bool +} + +func (v NullableCardExpiringPointsNotificationPolicy) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCardExpiringPointsNotificationPolicy) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_card_expiring_points_notification_trigger.go b/model_card_expiring_points_notification_trigger.go new file mode 100644 index 00000000..dab13d53 --- /dev/null +++ b/model_card_expiring_points_notification_trigger.go @@ -0,0 +1,76 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// CardExpiringPointsNotificationTrigger struct for CardExpiringPointsNotificationTrigger +type CardExpiringPointsNotificationTrigger struct { + // The amount of period. + Amount int32 `json:"amount"` + // Notification period indicated by a letter; \"w\" means week, \"d\" means day. + Period string `json:"period"` +} + +// GetAmount returns the Amount field value +func (o *CardExpiringPointsNotificationTrigger) GetAmount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Amount +} + +// SetAmount sets field value +func (o *CardExpiringPointsNotificationTrigger) SetAmount(v int32) { + o.Amount = v +} + +// GetPeriod returns the Period field value +func (o *CardExpiringPointsNotificationTrigger) GetPeriod() string { + if o == nil { + var ret string + return ret + } + + return o.Period +} + +// SetPeriod sets field value +func (o *CardExpiringPointsNotificationTrigger) SetPeriod(v string) { + o.Period = v +} + +type NullableCardExpiringPointsNotificationTrigger struct { + Value CardExpiringPointsNotificationTrigger + ExplicitNull bool +} + +func (v NullableCardExpiringPointsNotificationTrigger) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCardExpiringPointsNotificationTrigger) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_cart_item.go b/model_cart_item.go index 84add361..4ed295af 100644 --- a/model_cart_item.go +++ b/model_cart_item.go @@ -29,7 +29,8 @@ type CartItem struct { // 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 *float32 `json:"price,omitempty"` // Type, group or model of the item. - Category *string `json:"category,omitempty"` + Category *string `json:"category,omitempty"` + Product *Product `json:"product,omitempty"` // Weight of item in grams. Weight *float32 `json:"weight,omitempty"` // Height of item in mm. @@ -243,6 +244,39 @@ func (o *CartItem) SetCategory(v string) { o.Category = &v } +// GetProduct returns the Product field value if set, zero value otherwise. +func (o *CartItem) GetProduct() Product { + if o == nil || o.Product == nil { + var ret Product + return ret + } + return *o.Product +} + +// GetProductOk returns a tuple with the Product field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CartItem) GetProductOk() (Product, bool) { + if o == nil || o.Product == nil { + var ret Product + return ret, false + } + return *o.Product, true +} + +// HasProduct returns a boolean if a field has been set. +func (o *CartItem) HasProduct() bool { + if o != nil && o.Product != nil { + return true + } + + return false +} + +// SetProduct gets a reference to the given Product and assigns it to the Product field. +func (o *CartItem) SetProduct(v Product) { + o.Product = &v +} + // GetWeight returns the Weight field value if set, zero value otherwise. func (o *CartItem) GetWeight() float32 { if o == nil || o.Weight == nil { diff --git a/model_catalog_item.go b/model_catalog_item.go index 6cf3e113..e6d652cd 100644 --- a/model_catalog_item.go +++ b/model_catalog_item.go @@ -30,6 +30,7 @@ type CatalogItem struct { // The version of the catalog item. Version int32 `json:"version"` Attributes *[]ItemAttribute `json:"attributes,omitempty"` + Product *Product `json:"product,omitempty"` } // GetId returns the Id field value @@ -173,6 +174,39 @@ func (o *CatalogItem) SetAttributes(v []ItemAttribute) { o.Attributes = &v } +// GetProduct returns the Product field value if set, zero value otherwise. +func (o *CatalogItem) GetProduct() Product { + if o == nil || o.Product == nil { + var ret Product + return ret + } + return *o.Product +} + +// GetProductOk returns a tuple with the Product field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CatalogItem) GetProductOk() (Product, bool) { + if o == nil || o.Product == nil { + var ret Product + return ret, false + } + return *o.Product, true +} + +// HasProduct returns a boolean if a field has been set. +func (o *CatalogItem) HasProduct() bool { + if o != nil && o.Product != nil { + return true + } + + return false +} + +// SetProduct gets a reference to the given Product and assigns it to the Product field. +func (o *CatalogItem) SetProduct(v Product) { + o.Product = &v +} + type NullableCatalogItem struct { Value CatalogItem ExplicitNull bool diff --git a/model_change_loyalty_tier_level_effect_props.go b/model_change_loyalty_tier_level_effect_props.go new file mode 100644 index 00000000..bedeafce --- /dev/null +++ b/model_change_loyalty_tier_level_effect_props.go @@ -0,0 +1,181 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// ChangeLoyaltyTierLevelEffectProps The properties specific to the \"changeLoyaltyTierLevel\" effect. This is triggered whenever the user's loyalty tier is upgraded due to a validated rule that contained an \"addLoyaltyPoints\" effect. +type ChangeLoyaltyTierLevelEffectProps struct { + // The title of the rule that triggered the tier upgrade. + RuleTitle string `json:"ruleTitle"` + // The ID of the loyalty program where these points were added. + ProgramId int32 `json:"programId"` + // The ID of the subledger within the loyalty program where these points were added. + SubLedgerId string `json:"subLedgerId"` + // The name of the tier from which the user was upgraded. + PreviousTierName *string `json:"previousTierName,omitempty"` + // The name of the tier to which the user has been upgraded. + NewTierName string `json:"newTierName"` + // The expiration date of the new tier. + ExpiryDate *time.Time `json:"expiryDate,omitempty"` +} + +// GetRuleTitle returns the RuleTitle field value +func (o *ChangeLoyaltyTierLevelEffectProps) GetRuleTitle() string { + if o == nil { + var ret string + return ret + } + + return o.RuleTitle +} + +// SetRuleTitle sets field value +func (o *ChangeLoyaltyTierLevelEffectProps) SetRuleTitle(v string) { + o.RuleTitle = v +} + +// GetProgramId returns the ProgramId field value +func (o *ChangeLoyaltyTierLevelEffectProps) GetProgramId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.ProgramId +} + +// SetProgramId sets field value +func (o *ChangeLoyaltyTierLevelEffectProps) SetProgramId(v int32) { + o.ProgramId = v +} + +// GetSubLedgerId returns the SubLedgerId field value +func (o *ChangeLoyaltyTierLevelEffectProps) GetSubLedgerId() string { + if o == nil { + var ret string + return ret + } + + return o.SubLedgerId +} + +// SetSubLedgerId sets field value +func (o *ChangeLoyaltyTierLevelEffectProps) SetSubLedgerId(v string) { + o.SubLedgerId = v +} + +// GetPreviousTierName returns the PreviousTierName field value if set, zero value otherwise. +func (o *ChangeLoyaltyTierLevelEffectProps) GetPreviousTierName() string { + if o == nil || o.PreviousTierName == nil { + var ret string + return ret + } + return *o.PreviousTierName +} + +// GetPreviousTierNameOk returns a tuple with the PreviousTierName field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ChangeLoyaltyTierLevelEffectProps) GetPreviousTierNameOk() (string, bool) { + if o == nil || o.PreviousTierName == nil { + var ret string + return ret, false + } + return *o.PreviousTierName, true +} + +// HasPreviousTierName returns a boolean if a field has been set. +func (o *ChangeLoyaltyTierLevelEffectProps) HasPreviousTierName() bool { + if o != nil && o.PreviousTierName != nil { + return true + } + + return false +} + +// SetPreviousTierName gets a reference to the given string and assigns it to the PreviousTierName field. +func (o *ChangeLoyaltyTierLevelEffectProps) SetPreviousTierName(v string) { + o.PreviousTierName = &v +} + +// GetNewTierName returns the NewTierName field value +func (o *ChangeLoyaltyTierLevelEffectProps) GetNewTierName() string { + if o == nil { + var ret string + return ret + } + + return o.NewTierName +} + +// SetNewTierName sets field value +func (o *ChangeLoyaltyTierLevelEffectProps) SetNewTierName(v string) { + o.NewTierName = v +} + +// GetExpiryDate returns the ExpiryDate field value if set, zero value otherwise. +func (o *ChangeLoyaltyTierLevelEffectProps) GetExpiryDate() time.Time { + if o == nil || o.ExpiryDate == nil { + var ret time.Time + return ret + } + return *o.ExpiryDate +} + +// GetExpiryDateOk returns a tuple with the ExpiryDate field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ChangeLoyaltyTierLevelEffectProps) GetExpiryDateOk() (time.Time, bool) { + if o == nil || o.ExpiryDate == nil { + var ret time.Time + return ret, false + } + return *o.ExpiryDate, true +} + +// HasExpiryDate returns a boolean if a field has been set. +func (o *ChangeLoyaltyTierLevelEffectProps) HasExpiryDate() bool { + if o != nil && o.ExpiryDate != nil { + return true + } + + return false +} + +// SetExpiryDate gets a reference to the given time.Time and assigns it to the ExpiryDate field. +func (o *ChangeLoyaltyTierLevelEffectProps) SetExpiryDate(v time.Time) { + o.ExpiryDate = &v +} + +type NullableChangeLoyaltyTierLevelEffectProps struct { + Value ChangeLoyaltyTierLevelEffectProps + ExplicitNull bool +} + +func (v NullableChangeLoyaltyTierLevelEffectProps) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableChangeLoyaltyTierLevelEffectProps) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_coupon_creation_job.go b/model_coupon_creation_job.go index fa9b4e17..1b70c88e 100644 --- a/model_coupon_creation_job.go +++ b/model_coupon_creation_job.go @@ -44,7 +44,7 @@ type CouponCreationJob struct { Attributes map[string]interface{} `json:"attributes"` // The batch ID coupons created by this job will bear. BatchId string `json:"batchId"` - // The current status of this request. Possible values: - `pending` - `completed` - `failed` - `coupon pattern full` + // The current status of this request. Possible values: - `pending verification` - `pending` - `completed` - `failed` - `coupon pattern full` Status string `json:"status"` // The number of coupon codes that were already created for this request. CreatedAmount int32 `json:"createdAmount"` diff --git a/model_coupons_notification_policy.go b/model_coupons_notification_policy.go index dcb2a09c..13cae64d 100644 --- a/model_coupons_notification_policy.go +++ b/model_coupons_notification_policy.go @@ -19,6 +19,8 @@ type CouponsNotificationPolicy struct { // Notification name. Name string `json:"name"` Scopes []string `json:"scopes"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` } // GetName returns the Name field value @@ -51,6 +53,39 @@ func (o *CouponsNotificationPolicy) SetScopes(v []string) { o.Scopes = v } +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *CouponsNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CouponsNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *CouponsNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *CouponsNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + type NullableCouponsNotificationPolicy struct { Value CouponsNotificationPolicy ExplicitNull bool diff --git a/model_create_achievement.go b/model_create_achievement.go new file mode 100644 index 00000000..3c02e953 --- /dev/null +++ b/model_create_achievement.go @@ -0,0 +1,161 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// CreateAchievement struct for CreateAchievement +type CreateAchievement struct { + // The internal name of the achievement used in API requests. **Note**: The name should start with a letter. This cannot be changed after the achievement has been created. + Name string `json:"name"` + // The display name for the achievement in the Campaign Manager. + Title string `json:"title"` + // A description of the achievement. + Description string `json:"description"` + // The required number of actions or the transactional milestone to complete the achievement. + Target float32 `json:"target"` + // The relative duration after which the achievement ends and resets for a particular customer profile. **Note**: The `period` does not start when the achievement is created. The period is a **positive real number** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can also round certain units down to the beginning of period and up to the end of period.: - `_D` for rounding down days only. Signifies the start of the day. Example: `30D_D` - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. Example: `23W_U` **Note**: You can either use the round down and round up option or set an absolute period. + Period string `json:"period"` + PeriodEndOverride *TimePoint `json:"periodEndOverride,omitempty"` +} + +// GetName returns the Name field value +func (o *CreateAchievement) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *CreateAchievement) SetName(v string) { + o.Name = v +} + +// GetTitle returns the Title field value +func (o *CreateAchievement) GetTitle() string { + if o == nil { + var ret string + return ret + } + + return o.Title +} + +// SetTitle sets field value +func (o *CreateAchievement) SetTitle(v string) { + o.Title = v +} + +// GetDescription returns the Description field value +func (o *CreateAchievement) GetDescription() string { + if o == nil { + var ret string + return ret + } + + return o.Description +} + +// SetDescription sets field value +func (o *CreateAchievement) SetDescription(v string) { + o.Description = v +} + +// GetTarget returns the Target field value +func (o *CreateAchievement) GetTarget() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Target +} + +// SetTarget sets field value +func (o *CreateAchievement) SetTarget(v float32) { + o.Target = v +} + +// GetPeriod returns the Period field value +func (o *CreateAchievement) GetPeriod() string { + if o == nil { + var ret string + return ret + } + + return o.Period +} + +// SetPeriod sets field value +func (o *CreateAchievement) SetPeriod(v string) { + o.Period = v +} + +// GetPeriodEndOverride returns the PeriodEndOverride field value if set, zero value otherwise. +func (o *CreateAchievement) GetPeriodEndOverride() TimePoint { + if o == nil || o.PeriodEndOverride == nil { + var ret TimePoint + return ret + } + return *o.PeriodEndOverride +} + +// GetPeriodEndOverrideOk returns a tuple with the PeriodEndOverride field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CreateAchievement) GetPeriodEndOverrideOk() (TimePoint, bool) { + if o == nil || o.PeriodEndOverride == nil { + var ret TimePoint + return ret, false + } + return *o.PeriodEndOverride, true +} + +// HasPeriodEndOverride returns a boolean if a field has been set. +func (o *CreateAchievement) HasPeriodEndOverride() bool { + if o != nil && o.PeriodEndOverride != nil { + return true + } + + return false +} + +// SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field. +func (o *CreateAchievement) SetPeriodEndOverride(v TimePoint) { + o.PeriodEndOverride = &v +} + +type NullableCreateAchievement struct { + Value CreateAchievement + ExplicitNull bool +} + +func (v NullableCreateAchievement) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableCreateAchievement) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_create_application_api_key.go b/model_create_application_api_key.go index 5680f089..09adc2a1 100644 --- a/model_create_application_api_key.go +++ b/model_create_application_api_key.go @@ -17,12 +17,16 @@ import ( // CreateApplicationApiKey struct for CreateApplicationApiKey type CreateApplicationApiKey struct { - // Title for API Key. + // Title of the API key. Title string `json:"title"` - // The date the API key expired. + // The date the API key expires. Expires time.Time `json:"expires"` // The third-party platform the API key is valid for. Use `none` for a generic API key to be used from your own integration layer. Platform *string `json:"platform,omitempty"` + // The API key type. Can be empty or `staging`. Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. + Type *string `json:"type,omitempty"` + // A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + TimeOffset *int32 `json:"timeOffset,omitempty"` } // GetTitle returns the Title field value @@ -88,6 +92,72 @@ func (o *CreateApplicationApiKey) SetPlatform(v string) { o.Platform = &v } +// GetType returns the Type field value if set, zero value otherwise. +func (o *CreateApplicationApiKey) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CreateApplicationApiKey) GetTypeOk() (string, bool) { + if o == nil || o.Type == nil { + var ret string + return ret, false + } + return *o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *CreateApplicationApiKey) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *CreateApplicationApiKey) SetType(v string) { + o.Type = &v +} + +// GetTimeOffset returns the TimeOffset field value if set, zero value otherwise. +func (o *CreateApplicationApiKey) GetTimeOffset() int32 { + if o == nil || o.TimeOffset == nil { + var ret int32 + return ret + } + return *o.TimeOffset +} + +// GetTimeOffsetOk returns a tuple with the TimeOffset field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CreateApplicationApiKey) GetTimeOffsetOk() (int32, bool) { + if o == nil || o.TimeOffset == nil { + var ret int32 + return ret, false + } + return *o.TimeOffset, true +} + +// HasTimeOffset returns a boolean if a field has been set. +func (o *CreateApplicationApiKey) HasTimeOffset() bool { + if o != nil && o.TimeOffset != nil { + return true + } + + return false +} + +// SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. +func (o *CreateApplicationApiKey) SetTimeOffset(v int32) { + o.TimeOffset = &v +} + type NullableCreateApplicationApiKey struct { Value CreateApplicationApiKey ExplicitNull bool diff --git a/model_customer_inventory.go b/model_customer_inventory.go index f6992164..7b31bddc 100644 --- a/model_customer_inventory.go +++ b/model_customer_inventory.go @@ -20,8 +20,9 @@ type CustomerInventory struct { Loyalty *Loyalty `json:"loyalty,omitempty"` Referrals *[]InventoryReferral `json:"referrals,omitempty"` // The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. - Coupons *[]InventoryCoupon `json:"coupons,omitempty"` - Giveaways *[]Giveaway `json:"giveaways,omitempty"` + Coupons *[]InventoryCoupon `json:"coupons,omitempty"` + Giveaways *[]Giveaway `json:"giveaways,omitempty"` + Achievements *[]AchievementProgress `json:"achievements,omitempty"` } // GetProfile returns the Profile field value if set, zero value otherwise. @@ -189,6 +190,39 @@ func (o *CustomerInventory) SetGiveaways(v []Giveaway) { o.Giveaways = &v } +// GetAchievements returns the Achievements field value if set, zero value otherwise. +func (o *CustomerInventory) GetAchievements() []AchievementProgress { + if o == nil || o.Achievements == nil { + var ret []AchievementProgress + return ret + } + return *o.Achievements +} + +// GetAchievementsOk returns a tuple with the Achievements field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *CustomerInventory) GetAchievementsOk() ([]AchievementProgress, bool) { + if o == nil || o.Achievements == nil { + var ret []AchievementProgress + return ret, false + } + return *o.Achievements, true +} + +// HasAchievements returns a boolean if a field has been set. +func (o *CustomerInventory) HasAchievements() bool { + if o != nil && o.Achievements != nil { + return true + } + + return false +} + +// SetAchievements gets a reference to the given []AchievementProgress and assigns it to the Achievements field. +func (o *CustomerInventory) SetAchievements(v []AchievementProgress) { + o.Achievements = &v +} + type NullableCustomerInventory struct { Value CustomerInventory ExplicitNull bool diff --git a/model_customer_profile.go b/model_customer_profile.go index 067c32cd..afd8b7ad 100644 --- a/model_customer_profile.go +++ b/model_customer_profile.go @@ -37,7 +37,7 @@ type CustomerProfile struct { AudienceMemberships *[]AudienceMembership `json:"audienceMemberships,omitempty"` // Timestamp of the most recent event received from this customer. This field is updated on calls that trigger the Rule Engine and that are not [dry requests](https://docs.talon.one/docs/dev/integration-api/dry-requests/#overlay). For example, [reserving a coupon](https://docs.talon.one/integration-api#operation/createCouponReservation) for a customer doesn't impact this field. LastActivity time.Time `json:"lastActivity"` - // 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). + // An indicator of whether the customer is part of a sandbox or live Application. See the [docs](https://docs.talon.one/docs/product/applications/overview#application-environments). Sandbox *bool `json:"sandbox,omitempty"` } diff --git a/model_customer_profile_audience_request_item.go b/model_customer_profile_audience_request_item.go index 5ea2233f..fde01ac5 100644 --- a/model_customer_profile_audience_request_item.go +++ b/model_customer_profile_audience_request_item.go @@ -16,7 +16,7 @@ import ( // CustomerProfileAudienceRequestItem struct for CustomerProfileAudienceRequestItem type CustomerProfileAudienceRequestItem struct { - // Defines the action to perform: - `add`: Adds the customer profile to the audience. - `delete`: Removes the customer profile from the audience. + // Defines the action to perform: - `add`: Adds the customer profile to the audience. If the customer profile does not exist, it will be created. - `delete`: Removes the customer profile from the audience. Action string `json:"action"` // The ID of this customer profile in the third-party integration. ProfileIntegrationId string `json:"profileIntegrationId"` diff --git a/model_customer_session_v2.go b/model_customer_session_v2.go index b01dfe64..e1cc28ed 100644 --- a/model_customer_session_v2.go +++ b/model_customer_session_v2.go @@ -35,7 +35,7 @@ type CustomerSessionV2 struct { CouponCodes *[]string `json:"couponCodes,omitempty"` // 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. ReferralCode *string `json:"referralCode,omitempty"` - // Any loyalty cards used. + // Identifier of a loyalty card. LoyaltyCards *[]string `json:"loyaltyCards,omitempty"` // Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). State string `json:"state"` diff --git a/model_deactivate_user_request.go b/model_deactivate_user_request.go new file mode 100644 index 00000000..4941aa87 --- /dev/null +++ b/model_deactivate_user_request.go @@ -0,0 +1,59 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// DeactivateUserRequest +type DeactivateUserRequest struct { + // The email address associated with the user profile. + Email string `json:"email"` +} + +// GetEmail returns the Email field value +func (o *DeactivateUserRequest) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// SetEmail sets field value +func (o *DeactivateUserRequest) SetEmail(v string) { + o.Email = v +} + +type NullableDeactivateUserRequest struct { + Value DeactivateUserRequest + ExplicitNull bool +} + +func (v NullableDeactivateUserRequest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableDeactivateUserRequest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_delete_user_request.go b/model_delete_user_request.go new file mode 100644 index 00000000..9abf867a --- /dev/null +++ b/model_delete_user_request.go @@ -0,0 +1,59 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// DeleteUserRequest +type DeleteUserRequest struct { + // The email address associated with the user profile. + Email string `json:"email"` +} + +// GetEmail returns the Email field value +func (o *DeleteUserRequest) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// SetEmail sets field value +func (o *DeleteUserRequest) SetEmail(v string) { + o.Email = v +} + +type NullableDeleteUserRequest struct { + Value DeleteUserRequest + ExplicitNull bool +} + +func (v NullableDeleteUserRequest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableDeleteUserRequest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_email_entity.go b/model_email_entity.go index 80d0043a..ac971737 100644 --- a/model_email_entity.go +++ b/model_email_entity.go @@ -16,7 +16,7 @@ import ( // EmailEntity struct for EmailEntity type EmailEntity struct { - // The email address associated with your account. + // The email address associated with the user profile. Email string `json:"email"` } diff --git a/model_environment.go b/model_environment.go index b4164a38..42818965 100644 --- a/model_environment.go +++ b/model_environment.go @@ -35,6 +35,8 @@ type Environment struct { GiveawaysPools *[]GiveawaysPool `json:"giveawaysPools,omitempty"` // The loyalty programs that the application is subscribed to. LoyaltyPrograms *[]LoyaltyProgram `json:"loyaltyPrograms,omitempty"` + // The achievements, linked to the campaigns, belonging to the application. + Achievements *[]Achievement `json:"achievements,omitempty"` // The attributes that the application is subscribed to. Attributes *[]Attribute `json:"attributes,omitempty"` // The additional costs that the application is subscribed to. @@ -216,6 +218,39 @@ func (o *Environment) SetLoyaltyPrograms(v []LoyaltyProgram) { o.LoyaltyPrograms = &v } +// GetAchievements returns the Achievements field value if set, zero value otherwise. +func (o *Environment) GetAchievements() []Achievement { + if o == nil || o.Achievements == nil { + var ret []Achievement + return ret + } + return *o.Achievements +} + +// GetAchievementsOk returns a tuple with the Achievements field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *Environment) GetAchievementsOk() ([]Achievement, bool) { + if o == nil || o.Achievements == nil { + var ret []Achievement + return ret, false + } + return *o.Achievements, true +} + +// HasAchievements returns a boolean if a field has been set. +func (o *Environment) HasAchievements() bool { + if o != nil && o.Achievements != nil { + return true + } + + return false +} + +// SetAchievements gets a reference to the given []Achievement and assigns it to the Achievements field. +func (o *Environment) SetAchievements(v []Achievement) { + o.Achievements = &v +} + // GetAttributes returns the Attributes field value if set, zero value otherwise. func (o *Environment) GetAttributes() []Attribute { if o == nil || o.Attributes == nil { diff --git a/model_expiring_coupons_notification_policy.go b/model_expiring_coupons_notification_policy.go new file mode 100644 index 00000000..6ab908f3 --- /dev/null +++ b/model_expiring_coupons_notification_policy.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ExpiringCouponsNotificationPolicy struct for ExpiringCouponsNotificationPolicy +type ExpiringCouponsNotificationPolicy struct { + // Notification name. + Name string `json:"name"` + Triggers []ExpiringCouponsNotificationTrigger `json:"triggers"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` +} + +// GetName returns the Name field value +func (o *ExpiringCouponsNotificationPolicy) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *ExpiringCouponsNotificationPolicy) SetName(v string) { + o.Name = v +} + +// GetTriggers returns the Triggers field value +func (o *ExpiringCouponsNotificationPolicy) GetTriggers() []ExpiringCouponsNotificationTrigger { + if o == nil { + var ret []ExpiringCouponsNotificationTrigger + return ret + } + + return o.Triggers +} + +// SetTriggers sets field value +func (o *ExpiringCouponsNotificationPolicy) SetTriggers(v []ExpiringCouponsNotificationTrigger) { + o.Triggers = v +} + +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *ExpiringCouponsNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ExpiringCouponsNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *ExpiringCouponsNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *ExpiringCouponsNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + +type NullableExpiringCouponsNotificationPolicy struct { + Value ExpiringCouponsNotificationPolicy + ExplicitNull bool +} + +func (v NullableExpiringCouponsNotificationPolicy) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableExpiringCouponsNotificationPolicy) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_expiring_coupons_notification_trigger.go b/model_expiring_coupons_notification_trigger.go new file mode 100644 index 00000000..402cf257 --- /dev/null +++ b/model_expiring_coupons_notification_trigger.go @@ -0,0 +1,76 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ExpiringCouponsNotificationTrigger struct for ExpiringCouponsNotificationTrigger +type ExpiringCouponsNotificationTrigger struct { + // The amount of period. + Amount int32 `json:"amount"` + // Notification period indicated by a letter; \"w\" means week, \"d\" means day. + Period string `json:"period"` +} + +// GetAmount returns the Amount field value +func (o *ExpiringCouponsNotificationTrigger) GetAmount() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Amount +} + +// SetAmount sets field value +func (o *ExpiringCouponsNotificationTrigger) SetAmount(v int32) { + o.Amount = v +} + +// GetPeriod returns the Period field value +func (o *ExpiringCouponsNotificationTrigger) GetPeriod() string { + if o == nil { + var ret string + return ret + } + + return o.Period +} + +// SetPeriod sets field value +func (o *ExpiringCouponsNotificationTrigger) SetPeriod(v string) { + o.Period = v +} + +type NullableExpiringCouponsNotificationTrigger struct { + Value ExpiringCouponsNotificationTrigger + ExplicitNull bool +} + +func (v NullableExpiringCouponsNotificationTrigger) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableExpiringCouponsNotificationTrigger) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_expiring_points_notification_policy.go b/model_expiring_points_notification_policy.go index 5818c702..f1d3ac74 100644 --- a/model_expiring_points_notification_policy.go +++ b/model_expiring_points_notification_policy.go @@ -19,6 +19,8 @@ type ExpiringPointsNotificationPolicy struct { // Notification name. Name string `json:"name"` Triggers []ExpiringPointsNotificationTrigger `json:"triggers"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` } // GetName returns the Name field value @@ -51,6 +53,39 @@ func (o *ExpiringPointsNotificationPolicy) SetTriggers(v []ExpiringPointsNotific o.Triggers = v } +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *ExpiringPointsNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *ExpiringPointsNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *ExpiringPointsNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *ExpiringPointsNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + type NullableExpiringPointsNotificationPolicy struct { Value ExpiringPointsNotificationPolicy ExplicitNull bool diff --git a/model_func_arg_def.go b/model_func_arg_def.go index 024ad27a..b57c212d 100644 --- a/model_func_arg_def.go +++ b/model_func_arg_def.go @@ -19,7 +19,7 @@ type FuncArgDef struct { // The type of value this argument expects. Type string `json:"type"` // A campaigner-friendly description of the argument, this will also be shown in the rule editor. - Description string `json:"description"` + Description *string `json:"description,omitempty"` } // GetType returns the Type field value @@ -37,19 +37,37 @@ func (o *FuncArgDef) SetType(v string) { o.Type = v } -// GetDescription returns the Description field value +// GetDescription returns the Description field value if set, zero value otherwise. func (o *FuncArgDef) GetDescription() string { - if o == nil { + if o == nil || o.Description == nil { var ret string return ret } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *FuncArgDef) GetDescriptionOk() (string, bool) { + if o == nil || o.Description == nil { + var ret string + return ret, false + } + return *o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *FuncArgDef) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } - return o.Description + return false } -// SetDescription sets field value +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *FuncArgDef) SetDescription(v string) { - o.Description = v + o.Description = &v } type NullableFuncArgDef struct { diff --git a/model_get_integration_coupon_request.go b/model_get_integration_coupon_request.go new file mode 100644 index 00000000..243a66c0 --- /dev/null +++ b/model_get_integration_coupon_request.go @@ -0,0 +1,76 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// GetIntegrationCouponRequest struct for GetIntegrationCouponRequest +type GetIntegrationCouponRequest struct { + // A list of IDs of the campaigns to get coupons from. + CampaignIds []int32 `json:"campaignIds"` + // The maximum number of coupons included in the response. + Limit int32 `json:"limit"` +} + +// GetCampaignIds returns the CampaignIds field value +func (o *GetIntegrationCouponRequest) GetCampaignIds() []int32 { + if o == nil { + var ret []int32 + return ret + } + + return o.CampaignIds +} + +// SetCampaignIds sets field value +func (o *GetIntegrationCouponRequest) SetCampaignIds(v []int32) { + o.CampaignIds = v +} + +// GetLimit returns the Limit field value +func (o *GetIntegrationCouponRequest) GetLimit() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Limit +} + +// SetLimit sets field value +func (o *GetIntegrationCouponRequest) SetLimit(v int32) { + o.Limit = v +} + +type NullableGetIntegrationCouponRequest struct { + Value GetIntegrationCouponRequest + ExplicitNull bool +} + +func (v NullableGetIntegrationCouponRequest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableGetIntegrationCouponRequest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_increase_achievement_progress_effect_props.go b/model_increase_achievement_progress_effect_props.go new file mode 100644 index 00000000..58825f6e --- /dev/null +++ b/model_increase_achievement_progress_effect_props.go @@ -0,0 +1,179 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// IncreaseAchievementProgressEffectProps The properties specific to the \"increaseAchievementProgress\" effect. This gets triggered whenever a validated rule contained an \"increase customer progress\" effect. +type IncreaseAchievementProgressEffectProps struct { + // The internal ID of the achievement. + AchievementId int32 `json:"achievementId"` + // The name of the achievement. + AchievementName string `json:"achievementName"` + // The internal ID of the achievement progress tracker. + ProgressTrackerId *int32 `json:"progressTrackerId,omitempty"` + // The value by which the customer's current progress in the achievement is increased. + Delta float32 `json:"delta"` + // The current progress of the customer in the achievement. + Value float32 `json:"value"` + // The required number of actions or the transactional milestone to complete the achievement. + Target float32 `json:"target"` + // Indicates if the customer has completed the achievement in the current session. + IsJustCompleted bool `json:"isJustCompleted"` +} + +// GetAchievementId returns the AchievementId field value +func (o *IncreaseAchievementProgressEffectProps) GetAchievementId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.AchievementId +} + +// SetAchievementId sets field value +func (o *IncreaseAchievementProgressEffectProps) SetAchievementId(v int32) { + o.AchievementId = v +} + +// GetAchievementName returns the AchievementName field value +func (o *IncreaseAchievementProgressEffectProps) GetAchievementName() string { + if o == nil { + var ret string + return ret + } + + return o.AchievementName +} + +// SetAchievementName sets field value +func (o *IncreaseAchievementProgressEffectProps) SetAchievementName(v string) { + o.AchievementName = v +} + +// GetProgressTrackerId returns the ProgressTrackerId field value if set, zero value otherwise. +func (o *IncreaseAchievementProgressEffectProps) GetProgressTrackerId() int32 { + if o == nil || o.ProgressTrackerId == nil { + var ret int32 + return ret + } + return *o.ProgressTrackerId +} + +// GetProgressTrackerIdOk returns a tuple with the ProgressTrackerId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *IncreaseAchievementProgressEffectProps) GetProgressTrackerIdOk() (int32, bool) { + if o == nil || o.ProgressTrackerId == nil { + var ret int32 + return ret, false + } + return *o.ProgressTrackerId, true +} + +// HasProgressTrackerId returns a boolean if a field has been set. +func (o *IncreaseAchievementProgressEffectProps) HasProgressTrackerId() bool { + if o != nil && o.ProgressTrackerId != nil { + return true + } + + return false +} + +// SetProgressTrackerId gets a reference to the given int32 and assigns it to the ProgressTrackerId field. +func (o *IncreaseAchievementProgressEffectProps) SetProgressTrackerId(v int32) { + o.ProgressTrackerId = &v +} + +// GetDelta returns the Delta field value +func (o *IncreaseAchievementProgressEffectProps) GetDelta() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Delta +} + +// SetDelta sets field value +func (o *IncreaseAchievementProgressEffectProps) SetDelta(v float32) { + o.Delta = v +} + +// GetValue returns the Value field value +func (o *IncreaseAchievementProgressEffectProps) GetValue() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Value +} + +// SetValue sets field value +func (o *IncreaseAchievementProgressEffectProps) SetValue(v float32) { + o.Value = v +} + +// GetTarget returns the Target field value +func (o *IncreaseAchievementProgressEffectProps) GetTarget() float32 { + if o == nil { + var ret float32 + return ret + } + + return o.Target +} + +// SetTarget sets field value +func (o *IncreaseAchievementProgressEffectProps) SetTarget(v float32) { + o.Target = v +} + +// GetIsJustCompleted returns the IsJustCompleted field value +func (o *IncreaseAchievementProgressEffectProps) GetIsJustCompleted() bool { + if o == nil { + var ret bool + return ret + } + + return o.IsJustCompleted +} + +// SetIsJustCompleted sets field value +func (o *IncreaseAchievementProgressEffectProps) SetIsJustCompleted(v bool) { + o.IsJustCompleted = v +} + +type NullableIncreaseAchievementProgressEffectProps struct { + Value IncreaseAchievementProgressEffectProps + ExplicitNull bool +} + +func (v NullableIncreaseAchievementProgressEffectProps) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableIncreaseAchievementProgressEffectProps) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_inline_response_200_11.go b/model_inline_response_200_11.go index 719a181d..bd22f503 100644 --- a/model_inline_response_200_11.go +++ b/model_inline_response_200_11.go @@ -16,29 +16,29 @@ import ( // InlineResponse20011 struct for InlineResponse20011 type InlineResponse20011 struct { - HasMore bool `json:"hasMore"` - Data []CampaignTemplate `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []CampaignGroup `json:"data"` } -// GetHasMore returns the HasMore field value -func (o *InlineResponse20011) GetHasMore() bool { +// GetTotalResultSize returns the TotalResultSize field value +func (o *InlineResponse20011) GetTotalResultSize() int32 { if o == nil { - var ret bool + var ret int32 return ret } - return o.HasMore + return o.TotalResultSize } -// SetHasMore sets field value -func (o *InlineResponse20011) SetHasMore(v bool) { - o.HasMore = v +// SetTotalResultSize sets field value +func (o *InlineResponse20011) SetTotalResultSize(v int32) { + o.TotalResultSize = v } // GetData returns the Data field value -func (o *InlineResponse20011) GetData() []CampaignTemplate { +func (o *InlineResponse20011) GetData() []CampaignGroup { if o == nil { - var ret []CampaignTemplate + var ret []CampaignGroup return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20011) GetData() []CampaignTemplate { } // SetData sets field value -func (o *InlineResponse20011) SetData(v []CampaignTemplate) { +func (o *InlineResponse20011) SetData(v []CampaignGroup) { o.Data = v } diff --git a/model_inline_response_200_12.go b/model_inline_response_200_12.go index 00234ded..013bf078 100644 --- a/model_inline_response_200_12.go +++ b/model_inline_response_200_12.go @@ -16,29 +16,29 @@ import ( // InlineResponse20012 struct for InlineResponse20012 type InlineResponse20012 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []LoyaltyProgram `json:"data"` + HasMore bool `json:"hasMore"` + Data []CampaignTemplate `json:"data"` } -// GetTotalResultSize returns the TotalResultSize field value -func (o *InlineResponse20012) GetTotalResultSize() int32 { +// GetHasMore returns the HasMore field value +func (o *InlineResponse20012) GetHasMore() bool { if o == nil { - var ret int32 + var ret bool return ret } - return o.TotalResultSize + return o.HasMore } -// SetTotalResultSize sets field value -func (o *InlineResponse20012) SetTotalResultSize(v int32) { - o.TotalResultSize = v +// SetHasMore sets field value +func (o *InlineResponse20012) SetHasMore(v bool) { + o.HasMore = v } // GetData returns the Data field value -func (o *InlineResponse20012) GetData() []LoyaltyProgram { +func (o *InlineResponse20012) GetData() []CampaignTemplate { if o == nil { - var ret []LoyaltyProgram + var ret []CampaignTemplate return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20012) GetData() []LoyaltyProgram { } // SetData sets field value -func (o *InlineResponse20012) SetData(v []LoyaltyProgram) { +func (o *InlineResponse20012) SetData(v []CampaignTemplate) { o.Data = v } diff --git a/model_inline_response_200_13.go b/model_inline_response_200_13.go index 01ac8f56..e2249b46 100644 --- a/model_inline_response_200_13.go +++ b/model_inline_response_200_13.go @@ -16,29 +16,29 @@ import ( // InlineResponse20013 struct for InlineResponse20013 type InlineResponse20013 struct { - HasMore bool `json:"hasMore"` - Data []LoyaltyProgramTransaction `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []LoyaltyProgram `json:"data"` } -// GetHasMore returns the HasMore field value -func (o *InlineResponse20013) GetHasMore() bool { +// GetTotalResultSize returns the TotalResultSize field value +func (o *InlineResponse20013) GetTotalResultSize() int32 { if o == nil { - var ret bool + var ret int32 return ret } - return o.HasMore + return o.TotalResultSize } -// SetHasMore sets field value -func (o *InlineResponse20013) SetHasMore(v bool) { - o.HasMore = v +// SetTotalResultSize sets field value +func (o *InlineResponse20013) SetTotalResultSize(v int32) { + o.TotalResultSize = v } // GetData returns the Data field value -func (o *InlineResponse20013) GetData() []LoyaltyProgramTransaction { +func (o *InlineResponse20013) GetData() []LoyaltyProgram { if o == nil { - var ret []LoyaltyProgramTransaction + var ret []LoyaltyProgram return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20013) GetData() []LoyaltyProgramTransaction { } // SetData sets field value -func (o *InlineResponse20013) SetData(v []LoyaltyProgramTransaction) { +func (o *InlineResponse20013) SetData(v []LoyaltyProgram) { o.Data = v } diff --git a/model_inline_response_200_14.go b/model_inline_response_200_14.go index 99f907e6..e6010ed8 100644 --- a/model_inline_response_200_14.go +++ b/model_inline_response_200_14.go @@ -16,8 +16,8 @@ import ( // InlineResponse20014 struct for InlineResponse20014 type InlineResponse20014 struct { - HasMore bool `json:"hasMore"` - Data []LoyaltyCard `json:"data"` + HasMore bool `json:"hasMore"` + Data []LoyaltyProgramTransaction `json:"data"` } // GetHasMore returns the HasMore field value @@ -36,9 +36,9 @@ func (o *InlineResponse20014) SetHasMore(v bool) { } // GetData returns the Data field value -func (o *InlineResponse20014) GetData() []LoyaltyCard { +func (o *InlineResponse20014) GetData() []LoyaltyProgramTransaction { if o == nil { - var ret []LoyaltyCard + var ret []LoyaltyProgramTransaction return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20014) GetData() []LoyaltyCard { } // SetData sets field value -func (o *InlineResponse20014) SetData(v []LoyaltyCard) { +func (o *InlineResponse20014) SetData(v []LoyaltyProgramTransaction) { o.Data = v } diff --git a/model_inline_response_200_15.go b/model_inline_response_200_15.go index 78e7a222..cc77bbbf 100644 --- a/model_inline_response_200_15.go +++ b/model_inline_response_200_15.go @@ -16,10 +16,8 @@ import ( // InlineResponse20015 struct for InlineResponse20015 type InlineResponse20015 struct { - // true means there is more data in the source collection to request.. - HasMore bool `json:"hasMore"` - // List of loyalty card transaction logs. - Data []CardLedgerTransactionLogEntry `json:"data"` + HasMore bool `json:"hasMore"` + Data []LoyaltyCard `json:"data"` } // GetHasMore returns the HasMore field value @@ -38,9 +36,9 @@ func (o *InlineResponse20015) SetHasMore(v bool) { } // GetData returns the Data field value -func (o *InlineResponse20015) GetData() []CardLedgerTransactionLogEntry { +func (o *InlineResponse20015) GetData() []LoyaltyCard { if o == nil { - var ret []CardLedgerTransactionLogEntry + var ret []LoyaltyCard return ret } @@ -48,7 +46,7 @@ func (o *InlineResponse20015) GetData() []CardLedgerTransactionLogEntry { } // SetData sets field value -func (o *InlineResponse20015) SetData(v []CardLedgerTransactionLogEntry) { +func (o *InlineResponse20015) SetData(v []LoyaltyCard) { o.Data = v } diff --git a/model_inline_response_200_16.go b/model_inline_response_200_16.go index 301dcbd9..a63141a6 100644 --- a/model_inline_response_200_16.go +++ b/model_inline_response_200_16.go @@ -16,81 +16,31 @@ import ( // InlineResponse20016 struct for InlineResponse20016 type InlineResponse20016 struct { - HasMore *bool `json:"hasMore,omitempty"` - TotalResultSize *int32 `json:"totalResultSize,omitempty"` - Data []CollectionWithoutPayload `json:"data"` + // true means there is more data in the source collection to request.. + HasMore bool `json:"hasMore"` + // List of loyalty card transaction logs. + Data []CardLedgerTransactionLogEntry `json:"data"` } -// GetHasMore returns the HasMore field value if set, zero value otherwise. +// GetHasMore returns the HasMore field value func (o *InlineResponse20016) GetHasMore() bool { - if o == nil || o.HasMore == nil { + if o == nil { var ret bool return ret } - return *o.HasMore -} -// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20016) GetHasMoreOk() (bool, bool) { - if o == nil || o.HasMore == nil { - var ret bool - return ret, false - } - return *o.HasMore, true + return o.HasMore } -// HasHasMore returns a boolean if a field has been set. -func (o *InlineResponse20016) HasHasMore() bool { - if o != nil && o.HasMore != nil { - return true - } - - return false -} - -// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +// SetHasMore sets field value func (o *InlineResponse20016) SetHasMore(v bool) { - o.HasMore = &v -} - -// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. -func (o *InlineResponse20016) GetTotalResultSize() int32 { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret - } - return *o.TotalResultSize -} - -// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20016) GetTotalResultSizeOk() (int32, bool) { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret, false - } - return *o.TotalResultSize, true -} - -// HasTotalResultSize returns a boolean if a field has been set. -func (o *InlineResponse20016) HasTotalResultSize() bool { - if o != nil && o.TotalResultSize != nil { - return true - } - - return false -} - -// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. -func (o *InlineResponse20016) SetTotalResultSize(v int32) { - o.TotalResultSize = &v + o.HasMore = v } // GetData returns the Data field value -func (o *InlineResponse20016) GetData() []CollectionWithoutPayload { +func (o *InlineResponse20016) GetData() []CardLedgerTransactionLogEntry { if o == nil { - var ret []CollectionWithoutPayload + var ret []CardLedgerTransactionLogEntry return ret } @@ -98,7 +48,7 @@ func (o *InlineResponse20016) GetData() []CollectionWithoutPayload { } // SetData sets field value -func (o *InlineResponse20016) SetData(v []CollectionWithoutPayload) { +func (o *InlineResponse20016) SetData(v []CardLedgerTransactionLogEntry) { o.Data = v } diff --git a/model_inline_response_200_17.go b/model_inline_response_200_17.go index c4bb8035..b4f8f21f 100644 --- a/model_inline_response_200_17.go +++ b/model_inline_response_200_17.go @@ -16,29 +16,81 @@ import ( // InlineResponse20017 struct for InlineResponse20017 type InlineResponse20017 struct { - HasMore bool `json:"hasMore"` - Data []CollectionItem `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + TotalResultSize *int32 `json:"totalResultSize,omitempty"` + Data []CollectionWithoutPayload `json:"data"` } -// GetHasMore returns the HasMore field value +// GetHasMore returns the HasMore field value if set, zero value otherwise. func (o *InlineResponse20017) GetHasMore() bool { - if o == nil { + if o == nil || o.HasMore == nil { var ret bool return ret } + return *o.HasMore +} - return o.HasMore +// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20017) GetHasMoreOk() (bool, bool) { + if o == nil || o.HasMore == nil { + var ret bool + return ret, false + } + return *o.HasMore, true } -// SetHasMore sets field value +// HasHasMore returns a boolean if a field has been set. +func (o *InlineResponse20017) HasHasMore() bool { + if o != nil && o.HasMore != nil { + return true + } + + return false +} + +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. func (o *InlineResponse20017) SetHasMore(v bool) { - o.HasMore = v + o.HasMore = &v +} + +// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. +func (o *InlineResponse20017) GetTotalResultSize() int32 { + if o == nil || o.TotalResultSize == nil { + var ret int32 + return ret + } + return *o.TotalResultSize +} + +// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20017) GetTotalResultSizeOk() (int32, bool) { + if o == nil || o.TotalResultSize == nil { + var ret int32 + return ret, false + } + return *o.TotalResultSize, true +} + +// HasTotalResultSize returns a boolean if a field has been set. +func (o *InlineResponse20017) HasTotalResultSize() bool { + if o != nil && o.TotalResultSize != nil { + return true + } + + return false +} + +// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +func (o *InlineResponse20017) SetTotalResultSize(v int32) { + o.TotalResultSize = &v } // GetData returns the Data field value -func (o *InlineResponse20017) GetData() []CollectionItem { +func (o *InlineResponse20017) GetData() []CollectionWithoutPayload { if o == nil { - var ret []CollectionItem + var ret []CollectionWithoutPayload return ret } @@ -46,7 +98,7 @@ func (o *InlineResponse20017) GetData() []CollectionItem { } // SetData sets field value -func (o *InlineResponse20017) SetData(v []CollectionItem) { +func (o *InlineResponse20017) SetData(v []CollectionWithoutPayload) { o.Data = v } diff --git a/model_inline_response_200_18.go b/model_inline_response_200_18.go index e5a9efb2..70c502f8 100644 --- a/model_inline_response_200_18.go +++ b/model_inline_response_200_18.go @@ -16,81 +16,29 @@ import ( // InlineResponse20018 struct for InlineResponse20018 type InlineResponse20018 struct { - HasMore *bool `json:"hasMore,omitempty"` - TotalResultSize *int32 `json:"totalResultSize,omitempty"` - Data []Collection `json:"data"` + HasMore bool `json:"hasMore"` + Data []CollectionItem `json:"data"` } -// GetHasMore returns the HasMore field value if set, zero value otherwise. +// GetHasMore returns the HasMore field value func (o *InlineResponse20018) GetHasMore() bool { - if o == nil || o.HasMore == nil { + if o == nil { var ret bool return ret } - return *o.HasMore -} -// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20018) GetHasMoreOk() (bool, bool) { - if o == nil || o.HasMore == nil { - var ret bool - return ret, false - } - return *o.HasMore, true + return o.HasMore } -// HasHasMore returns a boolean if a field has been set. -func (o *InlineResponse20018) HasHasMore() bool { - if o != nil && o.HasMore != nil { - return true - } - - return false -} - -// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +// SetHasMore sets field value func (o *InlineResponse20018) SetHasMore(v bool) { - o.HasMore = &v -} - -// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. -func (o *InlineResponse20018) GetTotalResultSize() int32 { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret - } - return *o.TotalResultSize -} - -// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20018) GetTotalResultSizeOk() (int32, bool) { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret, false - } - return *o.TotalResultSize, true -} - -// HasTotalResultSize returns a boolean if a field has been set. -func (o *InlineResponse20018) HasTotalResultSize() bool { - if o != nil && o.TotalResultSize != nil { - return true - } - - return false -} - -// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. -func (o *InlineResponse20018) SetTotalResultSize(v int32) { - o.TotalResultSize = &v + o.HasMore = v } // GetData returns the Data field value -func (o *InlineResponse20018) GetData() []Collection { +func (o *InlineResponse20018) GetData() []CollectionItem { if o == nil { - var ret []Collection + var ret []CollectionItem return ret } @@ -98,7 +46,7 @@ func (o *InlineResponse20018) GetData() []Collection { } // SetData sets field value -func (o *InlineResponse20018) SetData(v []Collection) { +func (o *InlineResponse20018) SetData(v []CollectionItem) { o.Data = v } diff --git a/model_inline_response_200_31.go b/model_inline_response_200_31.go index bd1a9363..27aae598 100644 --- a/model_inline_response_200_31.go +++ b/model_inline_response_200_31.go @@ -16,9 +16,8 @@ import ( // InlineResponse20031 struct for InlineResponse20031 type InlineResponse20031 struct { - HasMore *bool `json:"hasMore,omitempty"` - TotalResultSize *int32 `json:"totalResultSize,omitempty"` - Data []ApplicationReferee `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + Data []AudienceAnalytics `json:"data"` } // GetHasMore returns the HasMore field value if set, zero value otherwise. @@ -54,43 +53,10 @@ func (o *InlineResponse20031) SetHasMore(v bool) { o.HasMore = &v } -// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. -func (o *InlineResponse20031) GetTotalResultSize() int32 { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret - } - return *o.TotalResultSize -} - -// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20031) GetTotalResultSizeOk() (int32, bool) { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret, false - } - return *o.TotalResultSize, true -} - -// HasTotalResultSize returns a boolean if a field has been set. -func (o *InlineResponse20031) HasTotalResultSize() bool { - if o != nil && o.TotalResultSize != nil { - return true - } - - return false -} - -// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. -func (o *InlineResponse20031) SetTotalResultSize(v int32) { - o.TotalResultSize = &v -} - // GetData returns the Data field value -func (o *InlineResponse20031) GetData() []ApplicationReferee { +func (o *InlineResponse20031) GetData() []AudienceAnalytics { if o == nil { - var ret []ApplicationReferee + var ret []AudienceAnalytics return ret } @@ -98,7 +64,7 @@ func (o *InlineResponse20031) GetData() []ApplicationReferee { } // SetData sets field value -func (o *InlineResponse20031) SetData(v []ApplicationReferee) { +func (o *InlineResponse20031) SetData(v []AudienceAnalytics) { o.Data = v } diff --git a/model_inline_response_200_32.go b/model_inline_response_200_32.go index aa955c1c..189aeff5 100644 --- a/model_inline_response_200_32.go +++ b/model_inline_response_200_32.go @@ -16,29 +16,47 @@ import ( // InlineResponse20032 struct for InlineResponse20032 type InlineResponse20032 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []Attribute `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + Data []CustomerProfile `json:"data"` } -// GetTotalResultSize returns the TotalResultSize field value -func (o *InlineResponse20032) GetTotalResultSize() int32 { - if o == nil { - var ret int32 +// GetHasMore returns the HasMore field value if set, zero value otherwise. +func (o *InlineResponse20032) GetHasMore() bool { + if o == nil || o.HasMore == nil { + var ret bool return ret } + return *o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20032) GetHasMoreOk() (bool, bool) { + if o == nil || o.HasMore == nil { + var ret bool + return ret, false + } + return *o.HasMore, true +} + +// HasHasMore returns a boolean if a field has been set. +func (o *InlineResponse20032) HasHasMore() bool { + if o != nil && o.HasMore != nil { + return true + } - return o.TotalResultSize + return false } -// SetTotalResultSize sets field value -func (o *InlineResponse20032) SetTotalResultSize(v int32) { - o.TotalResultSize = v +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +func (o *InlineResponse20032) SetHasMore(v bool) { + o.HasMore = &v } // GetData returns the Data field value -func (o *InlineResponse20032) GetData() []Attribute { +func (o *InlineResponse20032) GetData() []CustomerProfile { if o == nil { - var ret []Attribute + var ret []CustomerProfile return ret } @@ -46,7 +64,7 @@ func (o *InlineResponse20032) GetData() []Attribute { } // SetData sets field value -func (o *InlineResponse20032) SetData(v []Attribute) { +func (o *InlineResponse20032) SetData(v []CustomerProfile) { o.Data = v } diff --git a/model_inline_response_200_33.go b/model_inline_response_200_33.go index 30219597..ce6ecb4b 100644 --- a/model_inline_response_200_33.go +++ b/model_inline_response_200_33.go @@ -16,9 +16,9 @@ import ( // InlineResponse20033 struct for InlineResponse20033 type InlineResponse20033 struct { - HasMore *bool `json:"hasMore,omitempty"` - TotalResultSize *int32 `json:"totalResultSize,omitempty"` - Data []CatalogItem `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + TotalResultSize *int32 `json:"totalResultSize,omitempty"` + Data []ApplicationReferee `json:"data"` } // GetHasMore returns the HasMore field value if set, zero value otherwise. @@ -88,9 +88,9 @@ func (o *InlineResponse20033) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20033) GetData() []CatalogItem { +func (o *InlineResponse20033) GetData() []ApplicationReferee { if o == nil { - var ret []CatalogItem + var ret []ApplicationReferee return ret } @@ -98,7 +98,7 @@ func (o *InlineResponse20033) GetData() []CatalogItem { } // SetData sets field value -func (o *InlineResponse20033) SetData(v []CatalogItem) { +func (o *InlineResponse20033) SetData(v []ApplicationReferee) { o.Data = v } diff --git a/model_inline_response_200_34.go b/model_inline_response_200_34.go index 80b2cb8b..50d4efea 100644 --- a/model_inline_response_200_34.go +++ b/model_inline_response_200_34.go @@ -16,8 +16,8 @@ import ( // InlineResponse20034 struct for InlineResponse20034 type InlineResponse20034 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []AccountAdditionalCost `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []Attribute `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20034) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20034) GetData() []AccountAdditionalCost { +func (o *InlineResponse20034) GetData() []Attribute { if o == nil { - var ret []AccountAdditionalCost + var ret []Attribute return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20034) GetData() []AccountAdditionalCost { } // SetData sets field value -func (o *InlineResponse20034) SetData(v []AccountAdditionalCost) { +func (o *InlineResponse20034) SetData(v []Attribute) { o.Data = v } diff --git a/model_inline_response_200_35.go b/model_inline_response_200_35.go index bb24c30b..5422c082 100644 --- a/model_inline_response_200_35.go +++ b/model_inline_response_200_35.go @@ -16,29 +16,81 @@ import ( // InlineResponse20035 struct for InlineResponse20035 type InlineResponse20035 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []WebhookWithOutgoingIntegrationDetails `json:"data"` + HasMore *bool `json:"hasMore,omitempty"` + TotalResultSize *int32 `json:"totalResultSize,omitempty"` + Data []CatalogItem `json:"data"` } -// GetTotalResultSize returns the TotalResultSize field value +// GetHasMore returns the HasMore field value if set, zero value otherwise. +func (o *InlineResponse20035) GetHasMore() bool { + if o == nil || o.HasMore == nil { + var ret bool + return ret + } + return *o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20035) GetHasMoreOk() (bool, bool) { + if o == nil || o.HasMore == nil { + var ret bool + return ret, false + } + return *o.HasMore, true +} + +// HasHasMore returns a boolean if a field has been set. +func (o *InlineResponse20035) HasHasMore() bool { + if o != nil && o.HasMore != nil { + return true + } + + return false +} + +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +func (o *InlineResponse20035) SetHasMore(v bool) { + o.HasMore = &v +} + +// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. func (o *InlineResponse20035) GetTotalResultSize() int32 { - if o == nil { + if o == nil || o.TotalResultSize == nil { var ret int32 return ret } + return *o.TotalResultSize +} + +// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20035) GetTotalResultSizeOk() (int32, bool) { + if o == nil || o.TotalResultSize == nil { + var ret int32 + return ret, false + } + return *o.TotalResultSize, true +} + +// HasTotalResultSize returns a boolean if a field has been set. +func (o *InlineResponse20035) HasTotalResultSize() bool { + if o != nil && o.TotalResultSize != nil { + return true + } - return o.TotalResultSize + return false } -// SetTotalResultSize sets field value +// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. func (o *InlineResponse20035) SetTotalResultSize(v int32) { - o.TotalResultSize = v + o.TotalResultSize = &v } // GetData returns the Data field value -func (o *InlineResponse20035) GetData() []WebhookWithOutgoingIntegrationDetails { +func (o *InlineResponse20035) GetData() []CatalogItem { if o == nil { - var ret []WebhookWithOutgoingIntegrationDetails + var ret []CatalogItem return ret } @@ -46,7 +98,7 @@ func (o *InlineResponse20035) GetData() []WebhookWithOutgoingIntegrationDetails } // SetData sets field value -func (o *InlineResponse20035) SetData(v []WebhookWithOutgoingIntegrationDetails) { +func (o *InlineResponse20035) SetData(v []CatalogItem) { o.Data = v } diff --git a/model_inline_response_200_36.go b/model_inline_response_200_36.go index ce77a0f6..ff55e428 100644 --- a/model_inline_response_200_36.go +++ b/model_inline_response_200_36.go @@ -16,8 +16,8 @@ import ( // InlineResponse20036 struct for InlineResponse20036 type InlineResponse20036 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []WebhookActivationLogEntry `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []AccountAdditionalCost `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20036) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20036) GetData() []WebhookActivationLogEntry { +func (o *InlineResponse20036) GetData() []AccountAdditionalCost { if o == nil { - var ret []WebhookActivationLogEntry + var ret []AccountAdditionalCost return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20036) GetData() []WebhookActivationLogEntry { } // SetData sets field value -func (o *InlineResponse20036) SetData(v []WebhookActivationLogEntry) { +func (o *InlineResponse20036) SetData(v []AccountAdditionalCost) { o.Data = v } diff --git a/model_inline_response_200_37.go b/model_inline_response_200_37.go index ccb409c2..849e5886 100644 --- a/model_inline_response_200_37.go +++ b/model_inline_response_200_37.go @@ -16,8 +16,8 @@ import ( // InlineResponse20037 struct for InlineResponse20037 type InlineResponse20037 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []WebhookLogEntry `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []WebhookWithOutgoingIntegrationDetails `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20037) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20037) GetData() []WebhookLogEntry { +func (o *InlineResponse20037) GetData() []WebhookWithOutgoingIntegrationDetails { if o == nil { - var ret []WebhookLogEntry + var ret []WebhookWithOutgoingIntegrationDetails return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20037) GetData() []WebhookLogEntry { } // SetData sets field value -func (o *InlineResponse20037) SetData(v []WebhookLogEntry) { +func (o *InlineResponse20037) SetData(v []WebhookWithOutgoingIntegrationDetails) { o.Data = v } diff --git a/model_inline_response_200_38.go b/model_inline_response_200_38.go index 2c950576..e1a5f12c 100644 --- a/model_inline_response_200_38.go +++ b/model_inline_response_200_38.go @@ -16,8 +16,8 @@ import ( // InlineResponse20038 struct for InlineResponse20038 type InlineResponse20038 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []EventType `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []WebhookActivationLogEntry `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20038) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20038) GetData() []EventType { +func (o *InlineResponse20038) GetData() []WebhookActivationLogEntry { if o == nil { - var ret []EventType + var ret []WebhookActivationLogEntry return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20038) GetData() []EventType { } // SetData sets field value -func (o *InlineResponse20038) SetData(v []EventType) { +func (o *InlineResponse20038) SetData(v []WebhookActivationLogEntry) { o.Data = v } diff --git a/model_inline_response_200_39.go b/model_inline_response_200_39.go index 6b4d3a50..00861163 100644 --- a/model_inline_response_200_39.go +++ b/model_inline_response_200_39.go @@ -16,8 +16,8 @@ import ( // InlineResponse20039 struct for InlineResponse20039 type InlineResponse20039 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []User `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []WebhookLogEntry `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20039) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20039) GetData() []User { +func (o *InlineResponse20039) GetData() []WebhookLogEntry { if o == nil { - var ret []User + var ret []WebhookLogEntry return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20039) GetData() []User { } // SetData sets field value -func (o *InlineResponse20039) SetData(v []User) { +func (o *InlineResponse20039) SetData(v []WebhookLogEntry) { o.Data = v } diff --git a/model_inline_response_200_40.go b/model_inline_response_200_40.go index c7fe0ccf..90d96933 100644 --- a/model_inline_response_200_40.go +++ b/model_inline_response_200_40.go @@ -16,81 +16,29 @@ import ( // InlineResponse20040 struct for InlineResponse20040 type InlineResponse20040 struct { - TotalResultSize *int32 `json:"totalResultSize,omitempty"` - HasMore *bool `json:"hasMore,omitempty"` - Data []Change `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []EventType `json:"data"` } -// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. +// GetTotalResultSize returns the TotalResultSize field value func (o *InlineResponse20040) GetTotalResultSize() int32 { - if o == nil || o.TotalResultSize == nil { + if o == nil { var ret int32 return ret } - return *o.TotalResultSize -} -// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20040) GetTotalResultSizeOk() (int32, bool) { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret, false - } - return *o.TotalResultSize, true + return o.TotalResultSize } -// HasTotalResultSize returns a boolean if a field has been set. -func (o *InlineResponse20040) HasTotalResultSize() bool { - if o != nil && o.TotalResultSize != nil { - return true - } - - return false -} - -// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +// SetTotalResultSize sets field value func (o *InlineResponse20040) SetTotalResultSize(v int32) { - o.TotalResultSize = &v -} - -// GetHasMore returns the HasMore field value if set, zero value otherwise. -func (o *InlineResponse20040) GetHasMore() bool { - if o == nil || o.HasMore == nil { - var ret bool - return ret - } - return *o.HasMore -} - -// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20040) GetHasMoreOk() (bool, bool) { - if o == nil || o.HasMore == nil { - var ret bool - return ret, false - } - return *o.HasMore, true -} - -// HasHasMore returns a boolean if a field has been set. -func (o *InlineResponse20040) HasHasMore() bool { - if o != nil && o.HasMore != nil { - return true - } - - return false -} - -// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. -func (o *InlineResponse20040) SetHasMore(v bool) { - o.HasMore = &v + o.TotalResultSize = v } // GetData returns the Data field value -func (o *InlineResponse20040) GetData() []Change { +func (o *InlineResponse20040) GetData() []EventType { if o == nil { - var ret []Change + var ret []EventType return ret } @@ -98,7 +46,7 @@ func (o *InlineResponse20040) GetData() []Change { } // SetData sets field value -func (o *InlineResponse20040) SetData(v []Change) { +func (o *InlineResponse20040) SetData(v []EventType) { o.Data = v } diff --git a/model_inline_response_200_41.go b/model_inline_response_200_41.go index 10257a70..bef1d4ae 100644 --- a/model_inline_response_200_41.go +++ b/model_inline_response_200_41.go @@ -16,8 +16,8 @@ import ( // InlineResponse20041 struct for InlineResponse20041 type InlineResponse20041 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []Export `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []User `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20041) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20041) GetData() []Export { +func (o *InlineResponse20041) GetData() []User { if o == nil { - var ret []Export + var ret []User return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20041) GetData() []Export { } // SetData sets field value -func (o *InlineResponse20041) SetData(v []Export) { +func (o *InlineResponse20041) SetData(v []User) { o.Data = v } diff --git a/model_inline_response_200_42.go b/model_inline_response_200_42.go index e9f48b31..aa9895c7 100644 --- a/model_inline_response_200_42.go +++ b/model_inline_response_200_42.go @@ -16,29 +16,81 @@ import ( // InlineResponse20042 struct for InlineResponse20042 type InlineResponse20042 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []Role `json:"data"` + TotalResultSize *int32 `json:"totalResultSize,omitempty"` + HasMore *bool `json:"hasMore,omitempty"` + Data []Change `json:"data"` } -// GetTotalResultSize returns the TotalResultSize field value +// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. func (o *InlineResponse20042) GetTotalResultSize() int32 { - if o == nil { + if o == nil || o.TotalResultSize == nil { var ret int32 return ret } + return *o.TotalResultSize +} - return o.TotalResultSize +// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20042) GetTotalResultSizeOk() (int32, bool) { + if o == nil || o.TotalResultSize == nil { + var ret int32 + return ret, false + } + return *o.TotalResultSize, true } -// SetTotalResultSize sets field value +// HasTotalResultSize returns a boolean if a field has been set. +func (o *InlineResponse20042) HasTotalResultSize() bool { + if o != nil && o.TotalResultSize != nil { + return true + } + + return false +} + +// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. func (o *InlineResponse20042) SetTotalResultSize(v int32) { - o.TotalResultSize = v + o.TotalResultSize = &v +} + +// GetHasMore returns the HasMore field value if set, zero value otherwise. +func (o *InlineResponse20042) GetHasMore() bool { + if o == nil || o.HasMore == nil { + var ret bool + return ret + } + return *o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20042) GetHasMoreOk() (bool, bool) { + if o == nil || o.HasMore == nil { + var ret bool + return ret, false + } + return *o.HasMore, true +} + +// HasHasMore returns a boolean if a field has been set. +func (o *InlineResponse20042) HasHasMore() bool { + if o != nil && o.HasMore != nil { + return true + } + + return false +} + +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +func (o *InlineResponse20042) SetHasMore(v bool) { + o.HasMore = &v } // GetData returns the Data field value -func (o *InlineResponse20042) GetData() []Role { +func (o *InlineResponse20042) GetData() []Change { if o == nil { - var ret []Role + var ret []Change return ret } @@ -46,7 +98,7 @@ func (o *InlineResponse20042) GetData() []Role { } // SetData sets field value -func (o *InlineResponse20042) SetData(v []Role) { +func (o *InlineResponse20042) SetData(v []Change) { o.Data = v } diff --git a/model_inline_response_200_43.go b/model_inline_response_200_43.go index 8eb06949..4e9be7c8 100644 --- a/model_inline_response_200_43.go +++ b/model_inline_response_200_43.go @@ -16,81 +16,29 @@ import ( // InlineResponse20043 struct for InlineResponse20043 type InlineResponse20043 struct { - HasMore *bool `json:"hasMore,omitempty"` - TotalResultSize *int32 `json:"totalResultSize,omitempty"` - Data []Store `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []Export `json:"data"` } -// GetHasMore returns the HasMore field value if set, zero value otherwise. -func (o *InlineResponse20043) GetHasMore() bool { - if o == nil || o.HasMore == nil { - var ret bool - return ret - } - return *o.HasMore -} - -// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20043) GetHasMoreOk() (bool, bool) { - if o == nil || o.HasMore == nil { - var ret bool - return ret, false - } - return *o.HasMore, true -} - -// HasHasMore returns a boolean if a field has been set. -func (o *InlineResponse20043) HasHasMore() bool { - if o != nil && o.HasMore != nil { - return true - } - - return false -} - -// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. -func (o *InlineResponse20043) SetHasMore(v bool) { - o.HasMore = &v -} - -// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. +// GetTotalResultSize returns the TotalResultSize field value func (o *InlineResponse20043) GetTotalResultSize() int32 { - if o == nil || o.TotalResultSize == nil { + if o == nil { var ret int32 return ret } - return *o.TotalResultSize -} - -// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *InlineResponse20043) GetTotalResultSizeOk() (int32, bool) { - if o == nil || o.TotalResultSize == nil { - var ret int32 - return ret, false - } - return *o.TotalResultSize, true -} - -// HasTotalResultSize returns a boolean if a field has been set. -func (o *InlineResponse20043) HasTotalResultSize() bool { - if o != nil && o.TotalResultSize != nil { - return true - } - return false + return o.TotalResultSize } -// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +// SetTotalResultSize sets field value func (o *InlineResponse20043) SetTotalResultSize(v int32) { - o.TotalResultSize = &v + o.TotalResultSize = v } // GetData returns the Data field value -func (o *InlineResponse20043) GetData() []Store { +func (o *InlineResponse20043) GetData() []Export { if o == nil { - var ret []Store + var ret []Export return ret } @@ -98,7 +46,7 @@ func (o *InlineResponse20043) GetData() []Store { } // SetData sets field value -func (o *InlineResponse20043) SetData(v []Store) { +func (o *InlineResponse20043) SetData(v []Export) { o.Data = v } diff --git a/model_inline_response_200_44.go b/model_inline_response_200_44.go new file mode 100644 index 00000000..f279af7d --- /dev/null +++ b/model_inline_response_200_44.go @@ -0,0 +1,74 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// InlineResponse20044 struct for InlineResponse20044 +type InlineResponse20044 struct { + TotalResultSize int32 `json:"totalResultSize"` + Data []Role `json:"data"` +} + +// GetTotalResultSize returns the TotalResultSize field value +func (o *InlineResponse20044) GetTotalResultSize() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TotalResultSize +} + +// SetTotalResultSize sets field value +func (o *InlineResponse20044) SetTotalResultSize(v int32) { + o.TotalResultSize = v +} + +// GetData returns the Data field value +func (o *InlineResponse20044) GetData() []Role { + if o == nil { + var ret []Role + return ret + } + + return o.Data +} + +// SetData sets field value +func (o *InlineResponse20044) SetData(v []Role) { + o.Data = v +} + +type NullableInlineResponse20044 struct { + Value InlineResponse20044 + ExplicitNull bool +} + +func (v NullableInlineResponse20044) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInlineResponse20044) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_inline_response_200_45.go b/model_inline_response_200_45.go new file mode 100644 index 00000000..b157b056 --- /dev/null +++ b/model_inline_response_200_45.go @@ -0,0 +1,126 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// InlineResponse20045 struct for InlineResponse20045 +type InlineResponse20045 struct { + HasMore *bool `json:"hasMore,omitempty"` + TotalResultSize *int32 `json:"totalResultSize,omitempty"` + Data []Store `json:"data"` +} + +// GetHasMore returns the HasMore field value if set, zero value otherwise. +func (o *InlineResponse20045) GetHasMore() bool { + if o == nil || o.HasMore == nil { + var ret bool + return ret + } + return *o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20045) GetHasMoreOk() (bool, bool) { + if o == nil || o.HasMore == nil { + var ret bool + return ret, false + } + return *o.HasMore, true +} + +// HasHasMore returns a boolean if a field has been set. +func (o *InlineResponse20045) HasHasMore() bool { + if o != nil && o.HasMore != nil { + return true + } + + return false +} + +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +func (o *InlineResponse20045) SetHasMore(v bool) { + o.HasMore = &v +} + +// GetTotalResultSize returns the TotalResultSize field value if set, zero value otherwise. +func (o *InlineResponse20045) GetTotalResultSize() int32 { + if o == nil || o.TotalResultSize == nil { + var ret int32 + return ret + } + return *o.TotalResultSize +} + +// GetTotalResultSizeOk returns a tuple with the TotalResultSize field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20045) GetTotalResultSizeOk() (int32, bool) { + if o == nil || o.TotalResultSize == nil { + var ret int32 + return ret, false + } + return *o.TotalResultSize, true +} + +// HasTotalResultSize returns a boolean if a field has been set. +func (o *InlineResponse20045) HasTotalResultSize() bool { + if o != nil && o.TotalResultSize != nil { + return true + } + + return false +} + +// SetTotalResultSize gets a reference to the given int32 and assigns it to the TotalResultSize field. +func (o *InlineResponse20045) SetTotalResultSize(v int32) { + o.TotalResultSize = &v +} + +// GetData returns the Data field value +func (o *InlineResponse20045) GetData() []Store { + if o == nil { + var ret []Store + return ret + } + + return o.Data +} + +// SetData sets field value +func (o *InlineResponse20045) SetData(v []Store) { + o.Data = v +} + +type NullableInlineResponse20045 struct { + Value InlineResponse20045 + ExplicitNull bool +} + +func (v NullableInlineResponse20045) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInlineResponse20045) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_inline_response_200_46.go b/model_inline_response_200_46.go new file mode 100644 index 00000000..3ab88457 --- /dev/null +++ b/model_inline_response_200_46.go @@ -0,0 +1,92 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// InlineResponse20046 struct for InlineResponse20046 +type InlineResponse20046 struct { + HasMore *bool `json:"hasMore,omitempty"` + Data []Achievement `json:"data"` +} + +// GetHasMore returns the HasMore field value if set, zero value otherwise. +func (o *InlineResponse20046) GetHasMore() bool { + if o == nil || o.HasMore == nil { + var ret bool + return ret + } + return *o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *InlineResponse20046) GetHasMoreOk() (bool, bool) { + if o == nil || o.HasMore == nil { + var ret bool + return ret, false + } + return *o.HasMore, true +} + +// HasHasMore returns a boolean if a field has been set. +func (o *InlineResponse20046) HasHasMore() bool { + if o != nil && o.HasMore != nil { + return true + } + + return false +} + +// SetHasMore gets a reference to the given bool and assigns it to the HasMore field. +func (o *InlineResponse20046) SetHasMore(v bool) { + o.HasMore = &v +} + +// GetData returns the Data field value +func (o *InlineResponse20046) GetData() []Achievement { + if o == nil { + var ret []Achievement + return ret + } + + return o.Data +} + +// SetData sets field value +func (o *InlineResponse20046) SetData(v []Achievement) { + o.Data = v +} + +type NullableInlineResponse20046 struct { + Value InlineResponse20046 + ExplicitNull bool +} + +func (v NullableInlineResponse20046) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInlineResponse20046) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_inline_response_200_47.go b/model_inline_response_200_47.go new file mode 100644 index 00000000..0a84501b --- /dev/null +++ b/model_inline_response_200_47.go @@ -0,0 +1,74 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// InlineResponse20047 struct for InlineResponse20047 +type InlineResponse20047 struct { + HasMore bool `json:"hasMore"` + Data []AchievementProgress `json:"data"` +} + +// GetHasMore returns the HasMore field value +func (o *InlineResponse20047) GetHasMore() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasMore +} + +// SetHasMore sets field value +func (o *InlineResponse20047) SetHasMore(v bool) { + o.HasMore = v +} + +// GetData returns the Data field value +func (o *InlineResponse20047) GetData() []AchievementProgress { + if o == nil { + var ret []AchievementProgress + return ret + } + + return o.Data +} + +// SetData sets field value +func (o *InlineResponse20047) SetData(v []AchievementProgress) { + o.Data = v +} + +type NullableInlineResponse20047 struct { + Value InlineResponse20047 + ExplicitNull bool +} + +func (v NullableInlineResponse20047) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableInlineResponse20047) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_inventory_coupon.go b/model_inventory_coupon.go index 41ef02a7..6474e873 100644 --- a/model_inventory_coupon.go +++ b/model_inventory_coupon.go @@ -63,7 +63,7 @@ type InventoryCoupon struct { ImplicitlyReserved *bool `json:"implicitlyReserved,omitempty"` // The number of times the coupon was redeemed by the profile. ProfileRedemptionCount int32 `json:"profileRedemptionCount"` - // 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. + // Can be: - `active`: The coupon can be used. It is a reserved coupon that is not pending, used, or expired, and it has a non-exhausted limit counter. **Note:** This coupon state is returned for [scheduled campaigns](https://docs.talon.one/docs/product/campaigns/settings/managing-campaign-schedule), but the coupon cannot be used until the campaign is **running**. - `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. State string `json:"state"` } diff --git a/model_login_params.go b/model_login_params.go index f7c0138a..0a105016 100644 --- a/model_login_params.go +++ b/model_login_params.go @@ -16,7 +16,7 @@ import ( // LoginParams type LoginParams struct { - // The email address associated with your account. + // The email address associated with the user profile. Email string `json:"email"` // The password for your account. Password string `json:"password"` diff --git a/model_loyalty_ledger_transactions.go b/model_loyalty_ledger_transactions.go index d786e852..987c4f25 100644 --- a/model_loyalty_ledger_transactions.go +++ b/model_loyalty_ledger_transactions.go @@ -16,7 +16,7 @@ import ( // LoyaltyLedgerTransactions List of loyalty ledger transactions. type LoyaltyLedgerTransactions struct { - // true means there is more data in the source collection to request. + // If `true`, it means that there is more data to request in the source collection. HasMore *bool `json:"hasMore,omitempty"` // List of transaction entries from a loyalty ledger. Data *[]LoyaltyLedgerEntry `json:"data,omitempty"` diff --git a/model_loyalty_program.go b/model_loyalty_program.go index 47d95a4f..bfe7d6c2 100644 --- a/model_loyalty_program.go +++ b/model_loyalty_program.go @@ -37,10 +37,14 @@ type LoyaltyProgram struct { UsersPerCardLimit *int32 `json:"usersPerCardLimit,omitempty"` // 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. Sandbox bool `json:"sandbox"` - // The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + // The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + TiersExpirationPolicy *string `json:"tiersExpirationPolicy,omitempty"` + // The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. TiersExpireIn *string `json:"tiersExpireIn,omitempty"` // Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"` + // The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + ProgramJoinPolicy *string `json:"programJoinPolicy,omitempty"` // The ID of the Talon.One account that owns this program. AccountID int32 `json:"accountID"` // The internal name for the Loyalty Program. This is an immutable value. @@ -53,6 +57,8 @@ type LoyaltyProgram struct { CardBased bool `json:"cardBased"` // `True` if the tier definitions can be updated. CanUpdateTiers *bool `json:"canUpdateTiers,omitempty"` + // Indicates whether the program join policy can be updated. The join policy can be updated when this value is set to `true`. + CanUpdateJoinPolicy *bool `json:"canUpdateJoinPolicy,omitempty"` // `True` if the program can be upgraded to use the `tiersExpireIn` and `tiersDowngradePolicy` properties. CanUpgradeToAdvancedTiers *bool `json:"canUpgradeToAdvancedTiers,omitempty"` } @@ -225,6 +231,39 @@ func (o *LoyaltyProgram) SetSandbox(v bool) { o.Sandbox = v } +// GetTiersExpirationPolicy returns the TiersExpirationPolicy field value if set, zero value otherwise. +func (o *LoyaltyProgram) GetTiersExpirationPolicy() string { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret + } + return *o.TiersExpirationPolicy +} + +// GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool) { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret, false + } + return *o.TiersExpirationPolicy, true +} + +// HasTiersExpirationPolicy returns a boolean if a field has been set. +func (o *LoyaltyProgram) HasTiersExpirationPolicy() bool { + if o != nil && o.TiersExpirationPolicy != nil { + return true + } + + return false +} + +// SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. +func (o *LoyaltyProgram) SetTiersExpirationPolicy(v string) { + o.TiersExpirationPolicy = &v +} + // GetTiersExpireIn returns the TiersExpireIn field value if set, zero value otherwise. func (o *LoyaltyProgram) GetTiersExpireIn() string { if o == nil || o.TiersExpireIn == nil { @@ -291,6 +330,39 @@ func (o *LoyaltyProgram) SetTiersDowngradePolicy(v string) { o.TiersDowngradePolicy = &v } +// GetProgramJoinPolicy returns the ProgramJoinPolicy field value if set, zero value otherwise. +func (o *LoyaltyProgram) GetProgramJoinPolicy() string { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret + } + return *o.ProgramJoinPolicy +} + +// GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyProgram) GetProgramJoinPolicyOk() (string, bool) { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret, false + } + return *o.ProgramJoinPolicy, true +} + +// HasProgramJoinPolicy returns a boolean if a field has been set. +func (o *LoyaltyProgram) HasProgramJoinPolicy() bool { + if o != nil && o.ProgramJoinPolicy != nil { + return true + } + + return false +} + +// SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. +func (o *LoyaltyProgram) SetProgramJoinPolicy(v string) { + o.ProgramJoinPolicy = &v +} + // GetAccountID returns the AccountID field value func (o *LoyaltyProgram) GetAccountID() int32 { if o == nil { @@ -417,6 +489,39 @@ func (o *LoyaltyProgram) SetCanUpdateTiers(v bool) { o.CanUpdateTiers = &v } +// GetCanUpdateJoinPolicy returns the CanUpdateJoinPolicy field value if set, zero value otherwise. +func (o *LoyaltyProgram) GetCanUpdateJoinPolicy() bool { + if o == nil || o.CanUpdateJoinPolicy == nil { + var ret bool + return ret + } + return *o.CanUpdateJoinPolicy +} + +// GetCanUpdateJoinPolicyOk returns a tuple with the CanUpdateJoinPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyProgram) GetCanUpdateJoinPolicyOk() (bool, bool) { + if o == nil || o.CanUpdateJoinPolicy == nil { + var ret bool + return ret, false + } + return *o.CanUpdateJoinPolicy, true +} + +// HasCanUpdateJoinPolicy returns a boolean if a field has been set. +func (o *LoyaltyProgram) HasCanUpdateJoinPolicy() bool { + if o != nil && o.CanUpdateJoinPolicy != nil { + return true + } + + return false +} + +// SetCanUpdateJoinPolicy gets a reference to the given bool and assigns it to the CanUpdateJoinPolicy field. +func (o *LoyaltyProgram) SetCanUpdateJoinPolicy(v bool) { + o.CanUpdateJoinPolicy = &v +} + // GetCanUpgradeToAdvancedTiers returns the CanUpgradeToAdvancedTiers field value if set, zero value otherwise. func (o *LoyaltyProgram) GetCanUpgradeToAdvancedTiers() bool { if o == nil || o.CanUpgradeToAdvancedTiers == nil { diff --git a/model_loyalty_program_ledgers.go b/model_loyalty_program_ledgers.go index 35f67df3..f3325e54 100644 --- a/model_loyalty_program_ledgers.go +++ b/model_loyalty_program_ledgers.go @@ -12,6 +12,7 @@ package talon import ( "bytes" "encoding/json" + "time" ) // LoyaltyProgramLedgers Customer-specific information about loyalty points. @@ -21,8 +22,10 @@ type LoyaltyProgramLedgers struct { // Visible name of loyalty program. Title string `json:"title"` // Internal name of loyalty program. - Name string `json:"name"` - Ledger LedgerInfo `json:"ledger"` + Name string `json:"name"` + // The date on which the customer joined the loyalty program in RFC3339. **Note**: This is in the loyalty program's time zone. + JoinDate *time.Time `json:"joinDate,omitempty"` + Ledger LedgerInfo `json:"ledger"` // A map containing information about each loyalty subledger. SubLedgers *map[string]LedgerInfo `json:"subLedgers,omitempty"` } @@ -72,6 +75,39 @@ func (o *LoyaltyProgramLedgers) SetName(v string) { o.Name = v } +// GetJoinDate returns the JoinDate field value if set, zero value otherwise. +func (o *LoyaltyProgramLedgers) GetJoinDate() time.Time { + if o == nil || o.JoinDate == nil { + var ret time.Time + return ret + } + return *o.JoinDate +} + +// GetJoinDateOk returns a tuple with the JoinDate field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyProgramLedgers) GetJoinDateOk() (time.Time, bool) { + if o == nil || o.JoinDate == nil { + var ret time.Time + return ret, false + } + return *o.JoinDate, true +} + +// HasJoinDate returns a boolean if a field has been set. +func (o *LoyaltyProgramLedgers) HasJoinDate() bool { + if o != nil && o.JoinDate != nil { + return true + } + + return false +} + +// SetJoinDate gets a reference to the given time.Time and assigns it to the JoinDate field. +func (o *LoyaltyProgramLedgers) SetJoinDate(v time.Time) { + o.JoinDate = &v +} + // GetLedger returns the Ledger field value func (o *LoyaltyProgramLedgers) GetLedger() LedgerInfo { if o == nil { diff --git a/model_loyalty_program_transaction.go b/model_loyalty_program_transaction.go index 1f75bcc2..65d3d304 100644 --- a/model_loyalty_program_transaction.go +++ b/model_loyalty_program_transaction.go @@ -21,6 +21,8 @@ type LoyaltyProgramTransaction struct { Id int32 `json:"id"` // ID of the loyalty program. ProgramId int32 `json:"programId"` + // ID of the campaign. + CampaignId *int32 `json:"campaignId,omitempty"` // Date and time the loyalty transaction occurred. Created time.Time `json:"created"` // Type of transaction. Possible values: - `addition`: Signifies added points. - `subtraction`: Signifies deducted points. @@ -83,6 +85,39 @@ func (o *LoyaltyProgramTransaction) SetProgramId(v int32) { o.ProgramId = v } +// GetCampaignId returns the CampaignId field value if set, zero value otherwise. +func (o *LoyaltyProgramTransaction) GetCampaignId() int32 { + if o == nil || o.CampaignId == nil { + var ret int32 + return ret + } + return *o.CampaignId +} + +// GetCampaignIdOk returns a tuple with the CampaignId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyProgramTransaction) GetCampaignIdOk() (int32, bool) { + if o == nil || o.CampaignId == nil { + var ret int32 + return ret, false + } + return *o.CampaignId, true +} + +// HasCampaignId returns a boolean if a field has been set. +func (o *LoyaltyProgramTransaction) HasCampaignId() bool { + if o != nil && o.CampaignId != nil { + return true + } + + return false +} + +// SetCampaignId gets a reference to the given int32 and assigns it to the CampaignId field. +func (o *LoyaltyProgramTransaction) SetCampaignId(v int32) { + o.CampaignId = &v +} + // GetCreated returns the Created field value func (o *LoyaltyProgramTransaction) GetCreated() time.Time { if o == nil { diff --git a/model_message_log_entries.go b/model_message_log_entries.go new file mode 100644 index 00000000..b96df594 --- /dev/null +++ b/model_message_log_entries.go @@ -0,0 +1,94 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// MessageLogEntries struct for MessageLogEntries +type MessageLogEntries struct { + // The next value in the database. **Note:** If this value is not present, it means that there are no more values in the database for this combination of request parameters. + NextCursor *string `json:"nextCursor,omitempty"` + // List of message logs. + Data []MessageLogEntry `json:"data"` +} + +// GetNextCursor returns the NextCursor field value if set, zero value otherwise. +func (o *MessageLogEntries) GetNextCursor() string { + if o == nil || o.NextCursor == nil { + var ret string + return ret + } + return *o.NextCursor +} + +// GetNextCursorOk returns a tuple with the NextCursor field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntries) GetNextCursorOk() (string, bool) { + if o == nil || o.NextCursor == nil { + var ret string + return ret, false + } + return *o.NextCursor, true +} + +// HasNextCursor returns a boolean if a field has been set. +func (o *MessageLogEntries) HasNextCursor() bool { + if o != nil && o.NextCursor != nil { + return true + } + + return false +} + +// SetNextCursor gets a reference to the given string and assigns it to the NextCursor field. +func (o *MessageLogEntries) SetNextCursor(v string) { + o.NextCursor = &v +} + +// GetData returns the Data field value +func (o *MessageLogEntries) GetData() []MessageLogEntry { + if o == nil { + var ret []MessageLogEntry + return ret + } + + return o.Data +} + +// SetData sets field value +func (o *MessageLogEntries) SetData(v []MessageLogEntry) { + o.Data = v +} + +type NullableMessageLogEntries struct { + Value MessageLogEntries + ExplicitNull bool +} + +func (v NullableMessageLogEntries) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableMessageLogEntries) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_message_log_entry.go b/model_message_log_entry.go new file mode 100644 index 00000000..6e3426d2 --- /dev/null +++ b/model_message_log_entry.go @@ -0,0 +1,407 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// MessageLogEntry Message Log. +type MessageLogEntry struct { + // Unique identifier of the message. + Id string `json:"id"` + // Name of the service that generated the log entry. + Service string `json:"service"` + // Type of change that triggered the notification. + ChangeType *string `json:"changeType,omitempty"` + // ID of the notification. + NotificationId *int32 `json:"notificationId,omitempty"` + // The name of the notification. + NotificationName *string `json:"notificationName,omitempty"` + Request *MessageLogRequest `json:"request,omitempty"` + Response *MessageLogResponse `json:"response,omitempty"` + // Timestamp when the log entry was created. + CreatedAt time.Time `json:"createdAt"` + // The entity type the log is related to. + EntityType *string `json:"entityType,omitempty"` + // The target URL of the request. + Url *string `json:"url,omitempty"` + // Identifier of the Application. + ApplicationId *int32 `json:"applicationId,omitempty"` + // Identifier of the loyalty program. + LoyaltyProgramId *int32 `json:"loyaltyProgramId,omitempty"` +} + +// GetId returns the Id field value +func (o *MessageLogEntry) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// SetId sets field value +func (o *MessageLogEntry) SetId(v string) { + o.Id = v +} + +// GetService returns the Service field value +func (o *MessageLogEntry) GetService() string { + if o == nil { + var ret string + return ret + } + + return o.Service +} + +// SetService sets field value +func (o *MessageLogEntry) SetService(v string) { + o.Service = v +} + +// GetChangeType returns the ChangeType field value if set, zero value otherwise. +func (o *MessageLogEntry) GetChangeType() string { + if o == nil || o.ChangeType == nil { + var ret string + return ret + } + return *o.ChangeType +} + +// GetChangeTypeOk returns a tuple with the ChangeType field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetChangeTypeOk() (string, bool) { + if o == nil || o.ChangeType == nil { + var ret string + return ret, false + } + return *o.ChangeType, true +} + +// HasChangeType returns a boolean if a field has been set. +func (o *MessageLogEntry) HasChangeType() bool { + if o != nil && o.ChangeType != nil { + return true + } + + return false +} + +// SetChangeType gets a reference to the given string and assigns it to the ChangeType field. +func (o *MessageLogEntry) SetChangeType(v string) { + o.ChangeType = &v +} + +// GetNotificationId returns the NotificationId field value if set, zero value otherwise. +func (o *MessageLogEntry) GetNotificationId() int32 { + if o == nil || o.NotificationId == nil { + var ret int32 + return ret + } + return *o.NotificationId +} + +// GetNotificationIdOk returns a tuple with the NotificationId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetNotificationIdOk() (int32, bool) { + if o == nil || o.NotificationId == nil { + var ret int32 + return ret, false + } + return *o.NotificationId, true +} + +// HasNotificationId returns a boolean if a field has been set. +func (o *MessageLogEntry) HasNotificationId() bool { + if o != nil && o.NotificationId != nil { + return true + } + + return false +} + +// SetNotificationId gets a reference to the given int32 and assigns it to the NotificationId field. +func (o *MessageLogEntry) SetNotificationId(v int32) { + o.NotificationId = &v +} + +// GetNotificationName returns the NotificationName field value if set, zero value otherwise. +func (o *MessageLogEntry) GetNotificationName() string { + if o == nil || o.NotificationName == nil { + var ret string + return ret + } + return *o.NotificationName +} + +// GetNotificationNameOk returns a tuple with the NotificationName field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetNotificationNameOk() (string, bool) { + if o == nil || o.NotificationName == nil { + var ret string + return ret, false + } + return *o.NotificationName, true +} + +// HasNotificationName returns a boolean if a field has been set. +func (o *MessageLogEntry) HasNotificationName() bool { + if o != nil && o.NotificationName != nil { + return true + } + + return false +} + +// SetNotificationName gets a reference to the given string and assigns it to the NotificationName field. +func (o *MessageLogEntry) SetNotificationName(v string) { + o.NotificationName = &v +} + +// GetRequest returns the Request field value if set, zero value otherwise. +func (o *MessageLogEntry) GetRequest() MessageLogRequest { + if o == nil || o.Request == nil { + var ret MessageLogRequest + return ret + } + return *o.Request +} + +// GetRequestOk returns a tuple with the Request field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetRequestOk() (MessageLogRequest, bool) { + if o == nil || o.Request == nil { + var ret MessageLogRequest + return ret, false + } + return *o.Request, true +} + +// HasRequest returns a boolean if a field has been set. +func (o *MessageLogEntry) HasRequest() bool { + if o != nil && o.Request != nil { + return true + } + + return false +} + +// SetRequest gets a reference to the given MessageLogRequest and assigns it to the Request field. +func (o *MessageLogEntry) SetRequest(v MessageLogRequest) { + o.Request = &v +} + +// GetResponse returns the Response field value if set, zero value otherwise. +func (o *MessageLogEntry) GetResponse() MessageLogResponse { + if o == nil || o.Response == nil { + var ret MessageLogResponse + return ret + } + return *o.Response +} + +// GetResponseOk returns a tuple with the Response field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetResponseOk() (MessageLogResponse, bool) { + if o == nil || o.Response == nil { + var ret MessageLogResponse + return ret, false + } + return *o.Response, true +} + +// HasResponse returns a boolean if a field has been set. +func (o *MessageLogEntry) HasResponse() bool { + if o != nil && o.Response != nil { + return true + } + + return false +} + +// SetResponse gets a reference to the given MessageLogResponse and assigns it to the Response field. +func (o *MessageLogEntry) SetResponse(v MessageLogResponse) { + o.Response = &v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *MessageLogEntry) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// SetCreatedAt sets field value +func (o *MessageLogEntry) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetEntityType returns the EntityType field value if set, zero value otherwise. +func (o *MessageLogEntry) GetEntityType() string { + if o == nil || o.EntityType == nil { + var ret string + return ret + } + return *o.EntityType +} + +// GetEntityTypeOk returns a tuple with the EntityType field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetEntityTypeOk() (string, bool) { + if o == nil || o.EntityType == nil { + var ret string + return ret, false + } + return *o.EntityType, true +} + +// HasEntityType returns a boolean if a field has been set. +func (o *MessageLogEntry) HasEntityType() bool { + if o != nil && o.EntityType != nil { + return true + } + + return false +} + +// SetEntityType gets a reference to the given string and assigns it to the EntityType field. +func (o *MessageLogEntry) SetEntityType(v string) { + o.EntityType = &v +} + +// GetUrl returns the Url field value if set, zero value otherwise. +func (o *MessageLogEntry) GetUrl() string { + if o == nil || o.Url == nil { + var ret string + return ret + } + return *o.Url +} + +// GetUrlOk returns a tuple with the Url field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetUrlOk() (string, bool) { + if o == nil || o.Url == nil { + var ret string + return ret, false + } + return *o.Url, true +} + +// HasUrl returns a boolean if a field has been set. +func (o *MessageLogEntry) HasUrl() bool { + if o != nil && o.Url != nil { + return true + } + + return false +} + +// SetUrl gets a reference to the given string and assigns it to the Url field. +func (o *MessageLogEntry) SetUrl(v string) { + o.Url = &v +} + +// GetApplicationId returns the ApplicationId field value if set, zero value otherwise. +func (o *MessageLogEntry) GetApplicationId() int32 { + if o == nil || o.ApplicationId == nil { + var ret int32 + return ret + } + return *o.ApplicationId +} + +// GetApplicationIdOk returns a tuple with the ApplicationId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetApplicationIdOk() (int32, bool) { + if o == nil || o.ApplicationId == nil { + var ret int32 + return ret, false + } + return *o.ApplicationId, true +} + +// HasApplicationId returns a boolean if a field has been set. +func (o *MessageLogEntry) HasApplicationId() bool { + if o != nil && o.ApplicationId != nil { + return true + } + + return false +} + +// SetApplicationId gets a reference to the given int32 and assigns it to the ApplicationId field. +func (o *MessageLogEntry) SetApplicationId(v int32) { + o.ApplicationId = &v +} + +// GetLoyaltyProgramId returns the LoyaltyProgramId field value if set, zero value otherwise. +func (o *MessageLogEntry) GetLoyaltyProgramId() int32 { + if o == nil || o.LoyaltyProgramId == nil { + var ret int32 + return ret + } + return *o.LoyaltyProgramId +} + +// GetLoyaltyProgramIdOk returns a tuple with the LoyaltyProgramId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *MessageLogEntry) GetLoyaltyProgramIdOk() (int32, bool) { + if o == nil || o.LoyaltyProgramId == nil { + var ret int32 + return ret, false + } + return *o.LoyaltyProgramId, true +} + +// HasLoyaltyProgramId returns a boolean if a field has been set. +func (o *MessageLogEntry) HasLoyaltyProgramId() bool { + if o != nil && o.LoyaltyProgramId != nil { + return true + } + + return false +} + +// SetLoyaltyProgramId gets a reference to the given int32 and assigns it to the LoyaltyProgramId field. +func (o *MessageLogEntry) SetLoyaltyProgramId(v int32) { + o.LoyaltyProgramId = &v +} + +type NullableMessageLogEntry struct { + Value MessageLogEntry + ExplicitNull bool +} + +func (v NullableMessageLogEntry) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableMessageLogEntry) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_message_log_request.go b/model_message_log_request.go new file mode 100644 index 00000000..a9a4d32b --- /dev/null +++ b/model_message_log_request.go @@ -0,0 +1,77 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// MessageLogRequest Details of the request. +type MessageLogRequest struct { + // Timestamp when the request was made. + CreatedAt time.Time `json:"createdAt"` + // Raw request data. + Request string `json:"request"` +} + +// GetCreatedAt returns the CreatedAt field value +func (o *MessageLogRequest) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// SetCreatedAt sets field value +func (o *MessageLogRequest) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetRequest returns the Request field value +func (o *MessageLogRequest) GetRequest() string { + if o == nil { + var ret string + return ret + } + + return o.Request +} + +// SetRequest sets field value +func (o *MessageLogRequest) SetRequest(v string) { + o.Request = v +} + +type NullableMessageLogRequest struct { + Value MessageLogRequest + ExplicitNull bool +} + +func (v NullableMessageLogRequest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableMessageLogRequest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_message_log_response.go b/model_message_log_response.go new file mode 100644 index 00000000..b1e206a7 --- /dev/null +++ b/model_message_log_response.go @@ -0,0 +1,94 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" + "time" +) + +// MessageLogResponse Details of the response. +type MessageLogResponse struct { + // Timestamp when the response was received. + CreatedAt time.Time `json:"createdAt"` + // Raw response data. + Response string `json:"response"` + // HTTP status code of the response. + Status int32 `json:"status"` +} + +// GetCreatedAt returns the CreatedAt field value +func (o *MessageLogResponse) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// SetCreatedAt sets field value +func (o *MessageLogResponse) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetResponse returns the Response field value +func (o *MessageLogResponse) GetResponse() string { + if o == nil { + var ret string + return ret + } + + return o.Response +} + +// SetResponse sets field value +func (o *MessageLogResponse) SetResponse(v string) { + o.Response = v +} + +// GetStatus returns the Status field value +func (o *MessageLogResponse) GetStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Status +} + +// SetStatus sets field value +func (o *MessageLogResponse) SetStatus(v int32) { + o.Status = v +} + +type NullableMessageLogResponse struct { + Value MessageLogResponse + ExplicitNull bool +} + +func (v NullableMessageLogResponse) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableMessageLogResponse) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_new_account_sign_up.go b/model_new_account_sign_up.go index 155de05c..2de01d88 100644 --- a/model_new_account_sign_up.go +++ b/model_new_account_sign_up.go @@ -16,7 +16,7 @@ import ( // NewAccountSignUp type NewAccountSignUp struct { - // The email address associated with your account. + // The email address associated with the user profile. Email string `json:"email"` // The password for your account. Password string `json:"password"` diff --git a/model_new_application_api_key.go b/model_new_application_api_key.go index 36690a38..bedc8402 100644 --- a/model_new_application_api_key.go +++ b/model_new_application_api_key.go @@ -17,12 +17,16 @@ import ( // NewApplicationApiKey type NewApplicationApiKey struct { - // Title for API Key. + // Title of the API key. Title string `json:"title"` - // The date the API key expired. + // The date the API key expires. Expires time.Time `json:"expires"` // The third-party platform the API key is valid for. Use `none` for a generic API key to be used from your own integration layer. Platform *string `json:"platform,omitempty"` + // The API key type. Can be empty or `staging`. Staging API keys can only be used for dry requests with the [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) endpoint, [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint, and [Track event](https://docs.talon.one/integration-api#tag/Events/operation/trackEventV2) endpoint. When using the _Update customer profile_ endpoint with a staging API key, the query parameter `runRuleEngine` must be `true`. + Type *string `json:"type,omitempty"` + // A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + TimeOffset *int32 `json:"timeOffset,omitempty"` // ID of the API Key. Id int32 `json:"id"` // ID of user who created. @@ -100,6 +104,72 @@ func (o *NewApplicationApiKey) SetPlatform(v string) { o.Platform = &v } +// GetType returns the Type field value if set, zero value otherwise. +func (o *NewApplicationApiKey) GetType() string { + if o == nil || o.Type == nil { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewApplicationApiKey) GetTypeOk() (string, bool) { + if o == nil || o.Type == nil { + var ret string + return ret, false + } + return *o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *NewApplicationApiKey) HasType() bool { + if o != nil && o.Type != nil { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *NewApplicationApiKey) SetType(v string) { + o.Type = &v +} + +// GetTimeOffset returns the TimeOffset field value if set, zero value otherwise. +func (o *NewApplicationApiKey) GetTimeOffset() int32 { + if o == nil || o.TimeOffset == nil { + var ret int32 + return ret + } + return *o.TimeOffset +} + +// GetTimeOffsetOk returns a tuple with the TimeOffset field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewApplicationApiKey) GetTimeOffsetOk() (int32, bool) { + if o == nil || o.TimeOffset == nil { + var ret int32 + return ret, false + } + return *o.TimeOffset, true +} + +// HasTimeOffset returns a boolean if a field has been set. +func (o *NewApplicationApiKey) HasTimeOffset() bool { + if o != nil && o.TimeOffset != nil { + return true + } + + return false +} + +// SetTimeOffset gets a reference to the given int32 and assigns it to the TimeOffset field. +func (o *NewApplicationApiKey) SetTimeOffset(v int32) { + o.TimeOffset = &v +} + // GetId returns the Id field value func (o *NewApplicationApiKey) GetId() int32 { if o == nil { diff --git a/model_new_campaign.go b/model_new_campaign.go index d24d19c4..f803e7fc 100644 --- a/model_new_campaign.go +++ b/model_new_campaign.go @@ -41,12 +41,12 @@ type NewCampaign struct { Limits []LimitConfig `json:"limits"` // The IDs of the [campaign groups](https://docs.talon.one/docs/product/account/managing-campaign-groups) this campaign belongs to. CampaignGroups *[]int32 `json:"campaignGroups,omitempty"` - // The ID of the campaign evaluation group the campaign belongs to. - EvaluationGroupId *int32 `json:"evaluationGroupId,omitempty"` // The campaign type. Possible type values: - `cartItem`: Type of campaign that can apply effects only to cart items. - `advanced`: Type of campaign that can apply effects to customer sessions and cart items. Type *string `json:"type,omitempty"` // A list of store IDs that you want to link to the campaign. **Note:** Campaigns with linked store IDs will only be evaluated when there is a [customer session update](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2) that references a linked store. LinkedStoreIds *[]int32 `json:"linkedStoreIds,omitempty"` + // The ID of the campaign evaluation group the campaign belongs to. + EvaluationGroupId *int32 `json:"evaluationGroupId,omitempty"` } // GetName returns the Name field value @@ -388,39 +388,6 @@ func (o *NewCampaign) SetCampaignGroups(v []int32) { o.CampaignGroups = &v } -// GetEvaluationGroupId returns the EvaluationGroupId field value if set, zero value otherwise. -func (o *NewCampaign) GetEvaluationGroupId() int32 { - if o == nil || o.EvaluationGroupId == nil { - var ret int32 - return ret - } - return *o.EvaluationGroupId -} - -// GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *NewCampaign) GetEvaluationGroupIdOk() (int32, bool) { - if o == nil || o.EvaluationGroupId == nil { - var ret int32 - return ret, false - } - return *o.EvaluationGroupId, true -} - -// HasEvaluationGroupId returns a boolean if a field has been set. -func (o *NewCampaign) HasEvaluationGroupId() bool { - if o != nil && o.EvaluationGroupId != nil { - return true - } - - return false -} - -// SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. -func (o *NewCampaign) SetEvaluationGroupId(v int32) { - o.EvaluationGroupId = &v -} - // GetType returns the Type field value if set, zero value otherwise. func (o *NewCampaign) GetType() string { if o == nil || o.Type == nil { @@ -487,6 +454,39 @@ func (o *NewCampaign) SetLinkedStoreIds(v []int32) { o.LinkedStoreIds = &v } +// GetEvaluationGroupId returns the EvaluationGroupId field value if set, zero value otherwise. +func (o *NewCampaign) GetEvaluationGroupId() int32 { + if o == nil || o.EvaluationGroupId == nil { + var ret int32 + return ret + } + return *o.EvaluationGroupId +} + +// GetEvaluationGroupIdOk returns a tuple with the EvaluationGroupId field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewCampaign) GetEvaluationGroupIdOk() (int32, bool) { + if o == nil || o.EvaluationGroupId == nil { + var ret int32 + return ret, false + } + return *o.EvaluationGroupId, true +} + +// HasEvaluationGroupId returns a boolean if a field has been set. +func (o *NewCampaign) HasEvaluationGroupId() bool { + if o != nil && o.EvaluationGroupId != nil { + return true + } + + return false +} + +// SetEvaluationGroupId gets a reference to the given int32 and assigns it to the EvaluationGroupId field. +func (o *NewCampaign) SetEvaluationGroupId(v int32) { + o.EvaluationGroupId = &v +} + type NullableNewCampaign struct { Value NewCampaign ExplicitNull bool diff --git a/model_new_campaign_group.go b/model_new_campaign_group.go index 14dca9df..d9c364e0 100644 --- a/model_new_campaign_group.go +++ b/model_new_campaign_group.go @@ -16,7 +16,7 @@ import ( // NewCampaignGroup struct for NewCampaignGroup type NewCampaignGroup struct { - // The name of this campaign access group. + // The name of the campaign access group. Name string `json:"name"` // A longer description of the campaign access group. Description *string `json:"description,omitempty"` diff --git a/model_new_customer_session_v2.go b/model_new_customer_session_v2.go index 2b23f651..3a917bc8 100644 --- a/model_new_customer_session_v2.go +++ b/model_new_customer_session_v2.go @@ -26,7 +26,7 @@ type NewCustomerSessionV2 struct { CouponCodes *[]string `json:"couponCodes,omitempty"` // 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. ReferralCode *string `json:"referralCode,omitempty"` - // Any loyalty cards used. + // Identifier of a loyalty card. LoyaltyCards *[]string `json:"loyaltyCards,omitempty"` // Indicates the current state of the session. Sessions can be created as `open` or `closed`. The state transitions are: 1. `open` → `closed` 2. `open` → `cancelled` 3. Either: - `closed` → `cancelled` (**only** via [Update customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/updateCustomerSessionV2)) or - `closed` → `partially_returned` (**only** via [Return cart items](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/returnCartItems)) - `closed` → `open` (**only** via [Reopen customer session](https://docs.talon.one/integration-api#tag/Customer-sessions/operation/reopenCustomerSession)) 4. `partially_returned` → `cancelled` For more information, see [Customer session states](https://docs.talon.one/docs/dev/concepts/entities/customer-sessions). State *string `json:"state,omitempty"` diff --git a/model_new_invitation.go b/model_new_invitation.go index 57756795..dd272229 100644 --- a/model_new_invitation.go +++ b/model_new_invitation.go @@ -16,15 +16,16 @@ import ( // NewInvitation Parameters for inviting a new user. type NewInvitation struct { - // Name of the user being invited. - Name *string `json:"name,omitempty"` - Email string `json:"email"` - // 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}` - Acl *string `json:"acl,omitempty"` - // An indication of whether the user has admin permissions. We recommend using this flag over using the `acl` with value `{\"Role\": 127}`. + // Name of the user. + Name *string `json:"name,omitempty"` + // Email address of the user. + Email string `json:"email"` + // Indicates whether the user is an `admin`. IsAdmin *bool `json:"isAdmin,omitempty"` - // An array of role IDs to assign to the new user. + // A list of the IDs of the roles assigned to the user. Roles *[]int32 `json:"roles,omitempty"` + // Indicates the access level of the user. + Acl *string `json:"acl,omitempty"` } // GetName returns the Name field value if set, zero value otherwise. @@ -75,39 +76,6 @@ func (o *NewInvitation) SetEmail(v string) { o.Email = v } -// GetAcl returns the Acl field value if set, zero value otherwise. -func (o *NewInvitation) GetAcl() string { - if o == nil || o.Acl == nil { - var ret string - return ret - } - return *o.Acl -} - -// GetAclOk returns a tuple with the Acl field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *NewInvitation) GetAclOk() (string, bool) { - if o == nil || o.Acl == nil { - var ret string - return ret, false - } - return *o.Acl, true -} - -// HasAcl returns a boolean if a field has been set. -func (o *NewInvitation) HasAcl() bool { - if o != nil && o.Acl != nil { - return true - } - - return false -} - -// SetAcl gets a reference to the given string and assigns it to the Acl field. -func (o *NewInvitation) SetAcl(v string) { - o.Acl = &v -} - // GetIsAdmin returns the IsAdmin field value if set, zero value otherwise. func (o *NewInvitation) GetIsAdmin() bool { if o == nil || o.IsAdmin == nil { @@ -174,6 +142,39 @@ func (o *NewInvitation) SetRoles(v []int32) { o.Roles = &v } +// GetAcl returns the Acl field value if set, zero value otherwise. +func (o *NewInvitation) GetAcl() string { + if o == nil || o.Acl == nil { + var ret string + return ret + } + return *o.Acl +} + +// GetAclOk returns a tuple with the Acl field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewInvitation) GetAclOk() (string, bool) { + if o == nil || o.Acl == nil { + var ret string + return ret, false + } + return *o.Acl, true +} + +// HasAcl returns a boolean if a field has been set. +func (o *NewInvitation) HasAcl() bool { + if o != nil && o.Acl != nil { + return true + } + + return false +} + +// SetAcl gets a reference to the given string and assigns it to the Acl field. +func (o *NewInvitation) SetAcl(v string) { + o.Acl = &v +} + type NullableNewInvitation struct { Value NewInvitation ExplicitNull bool diff --git a/model_new_invite_email.go b/model_new_invite_email.go index 6c9142dc..618cf3bf 100644 --- a/model_new_invite_email.go +++ b/model_new_invite_email.go @@ -16,7 +16,9 @@ import ( // NewInviteEmail struct for NewInviteEmail type NewInviteEmail struct { + // Email address of the user. Email string `json:"email"` + // Invitation token of the user. Token string `json:"token"` } diff --git a/model_new_loyalty_program.go b/model_new_loyalty_program.go index d3e67b67..619a1e90 100644 --- a/model_new_loyalty_program.go +++ b/model_new_loyalty_program.go @@ -32,10 +32,14 @@ type NewLoyaltyProgram struct { UsersPerCardLimit *int32 `json:"usersPerCardLimit,omitempty"` // 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. Sandbox bool `json:"sandbox"` - // The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + // The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + TiersExpirationPolicy *string `json:"tiersExpirationPolicy,omitempty"` + // The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. TiersExpireIn *string `json:"tiersExpireIn,omitempty"` // Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"` + // The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + ProgramJoinPolicy *string `json:"programJoinPolicy,omitempty"` // The internal name for the Loyalty Program. This is an immutable value. Name string `json:"name"` // The tiers in this loyalty program. @@ -220,6 +224,39 @@ func (o *NewLoyaltyProgram) SetSandbox(v bool) { o.Sandbox = v } +// GetTiersExpirationPolicy returns the TiersExpirationPolicy field value if set, zero value otherwise. +func (o *NewLoyaltyProgram) GetTiersExpirationPolicy() string { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret + } + return *o.TiersExpirationPolicy +} + +// GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewLoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool) { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret, false + } + return *o.TiersExpirationPolicy, true +} + +// HasTiersExpirationPolicy returns a boolean if a field has been set. +func (o *NewLoyaltyProgram) HasTiersExpirationPolicy() bool { + if o != nil && o.TiersExpirationPolicy != nil { + return true + } + + return false +} + +// SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. +func (o *NewLoyaltyProgram) SetTiersExpirationPolicy(v string) { + o.TiersExpirationPolicy = &v +} + // GetTiersExpireIn returns the TiersExpireIn field value if set, zero value otherwise. func (o *NewLoyaltyProgram) GetTiersExpireIn() string { if o == nil || o.TiersExpireIn == nil { @@ -286,6 +323,39 @@ func (o *NewLoyaltyProgram) SetTiersDowngradePolicy(v string) { o.TiersDowngradePolicy = &v } +// GetProgramJoinPolicy returns the ProgramJoinPolicy field value if set, zero value otherwise. +func (o *NewLoyaltyProgram) GetProgramJoinPolicy() string { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret + } + return *o.ProgramJoinPolicy +} + +// GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewLoyaltyProgram) GetProgramJoinPolicyOk() (string, bool) { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret, false + } + return *o.ProgramJoinPolicy, true +} + +// HasProgramJoinPolicy returns a boolean if a field has been set. +func (o *NewLoyaltyProgram) HasProgramJoinPolicy() bool { + if o != nil && o.ProgramJoinPolicy != nil { + return true + } + + return false +} + +// SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. +func (o *NewLoyaltyProgram) SetProgramJoinPolicy(v string) { + o.ProgramJoinPolicy = &v +} + // GetName returns the Name field value func (o *NewLoyaltyProgram) GetName() string { if o == nil { diff --git a/model_new_notification_test_.go b/model_new_notification_test_.go new file mode 100644 index 00000000..0d7c512c --- /dev/null +++ b/model_new_notification_test_.go @@ -0,0 +1,180 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// NewNotificationTest struct for NewNotificationTest +type NewNotificationTest struct { + // The notification type. + Type string `json:"type"` + // Array of query parameters. + QueryParams *map[string]string `json:"queryParams,omitempty"` + // List of API HTTP headers for the given webhook-based notification. + Headers *map[string]string `json:"headers,omitempty"` + // API method for this notification. + Verb string `json:"verb"` + // API URL for the given notification. + Url string `json:"url"` + // API payload of this notification. + Payload string `json:"payload"` +} + +// GetType returns the Type field value +func (o *NewNotificationTest) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// SetType sets field value +func (o *NewNotificationTest) SetType(v string) { + o.Type = v +} + +// GetQueryParams returns the QueryParams field value if set, zero value otherwise. +func (o *NewNotificationTest) GetQueryParams() map[string]string { + if o == nil || o.QueryParams == nil { + var ret map[string]string + return ret + } + return *o.QueryParams +} + +// GetQueryParamsOk returns a tuple with the QueryParams field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewNotificationTest) GetQueryParamsOk() (map[string]string, bool) { + if o == nil || o.QueryParams == nil { + var ret map[string]string + return ret, false + } + return *o.QueryParams, true +} + +// HasQueryParams returns a boolean if a field has been set. +func (o *NewNotificationTest) HasQueryParams() bool { + if o != nil && o.QueryParams != nil { + return true + } + + return false +} + +// SetQueryParams gets a reference to the given map[string]string and assigns it to the QueryParams field. +func (o *NewNotificationTest) SetQueryParams(v map[string]string) { + o.QueryParams = &v +} + +// GetHeaders returns the Headers field value if set, zero value otherwise. +func (o *NewNotificationTest) GetHeaders() map[string]string { + if o == nil || o.Headers == nil { + var ret map[string]string + return ret + } + return *o.Headers +} + +// GetHeadersOk returns a tuple with the Headers field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewNotificationTest) GetHeadersOk() (map[string]string, bool) { + if o == nil || o.Headers == nil { + var ret map[string]string + return ret, false + } + return *o.Headers, true +} + +// HasHeaders returns a boolean if a field has been set. +func (o *NewNotificationTest) HasHeaders() bool { + if o != nil && o.Headers != nil { + return true + } + + return false +} + +// SetHeaders gets a reference to the given map[string]string and assigns it to the Headers field. +func (o *NewNotificationTest) SetHeaders(v map[string]string) { + o.Headers = &v +} + +// GetVerb returns the Verb field value +func (o *NewNotificationTest) GetVerb() string { + if o == nil { + var ret string + return ret + } + + return o.Verb +} + +// SetVerb sets field value +func (o *NewNotificationTest) SetVerb(v string) { + o.Verb = v +} + +// GetUrl returns the Url field value +func (o *NewNotificationTest) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// SetUrl sets field value +func (o *NewNotificationTest) SetUrl(v string) { + o.Url = v +} + +// GetPayload returns the Payload field value +func (o *NewNotificationTest) GetPayload() string { + if o == nil { + var ret string + return ret + } + + return o.Payload +} + +// SetPayload sets field value +func (o *NewNotificationTest) SetPayload(v string) { + o.Payload = v +} + +type NullableNewNotificationTest struct { + Value NewNotificationTest + ExplicitNull bool +} + +func (v NullableNewNotificationTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableNewNotificationTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_new_picklist.go b/model_new_picklist.go index 35ab059c..b9370c26 100644 --- a/model_new_picklist.go +++ b/model_new_picklist.go @@ -16,7 +16,7 @@ import ( // NewPicklist struct for NewPicklist type NewPicklist struct { - // The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. + // The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string. Type string `json:"type"` // The list of allowed values provided by this picklist. Values []string `json:"values"` diff --git a/model_new_role_v2.go b/model_new_role_v2.go index 9e01285a..329387e0 100644 --- a/model_new_role_v2.go +++ b/model_new_role_v2.go @@ -21,7 +21,7 @@ type NewRoleV2 struct { // Description of the role. Description string `json:"description"` Permissions *RoleV2Permissions `json:"permissions,omitempty"` - // A list of user identifiers the role is assigned to. + // A list of user IDs the role is assigned to. Members *[]int32 `json:"members,omitempty"` } diff --git a/model_new_store.go b/model_new_store.go index adc3790b..475b8113 100644 --- a/model_new_store.go +++ b/model_new_store.go @@ -22,7 +22,7 @@ type NewStore struct { Description string `json:"description"` // The attributes of the store. Attributes *map[string]interface{} `json:"attributes,omitempty"` - // The integration ID of the store. You choose this ID when you create a store. + // The integration ID of the store. You choose this ID when you create a store. **Note**: You cannot edit the `integrationId` after the store has been created. IntegrationId string `json:"integrationId"` } diff --git a/model_new_user.go b/model_new_user.go index 0832cebc..b408b0a4 100644 --- a/model_new_user.go +++ b/model_new_user.go @@ -16,7 +16,7 @@ import ( // NewUser type NewUser struct { - // The email address associated with your account. + // The email address associated with the user profile. Email string `json:"email"` // The password for your account. Password string `json:"password"` diff --git a/model_notification_list_item.go b/model_notification_list_item.go new file mode 100644 index 00000000..fecf093b --- /dev/null +++ b/model_notification_list_item.go @@ -0,0 +1,110 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// NotificationListItem struct for NotificationListItem +type NotificationListItem struct { + // The ID of the notification. + NotificationId int32 `json:"notificationId"` + // The name of the notification. + NotificationName string `json:"notificationName"` + // The ID of the entity to which this notification belongs. For example, in case of a loyalty notification, this value is the ID of the loyalty program. + EntityId int32 `json:"entityId"` + // Indicates whether the notification is activated. + Enabled bool `json:"enabled"` +} + +// GetNotificationId returns the NotificationId field value +func (o *NotificationListItem) GetNotificationId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.NotificationId +} + +// SetNotificationId sets field value +func (o *NotificationListItem) SetNotificationId(v int32) { + o.NotificationId = v +} + +// GetNotificationName returns the NotificationName field value +func (o *NotificationListItem) GetNotificationName() string { + if o == nil { + var ret string + return ret + } + + return o.NotificationName +} + +// SetNotificationName sets field value +func (o *NotificationListItem) SetNotificationName(v string) { + o.NotificationName = v +} + +// GetEntityId returns the EntityId field value +func (o *NotificationListItem) GetEntityId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.EntityId +} + +// SetEntityId sets field value +func (o *NotificationListItem) SetEntityId(v int32) { + o.EntityId = v +} + +// GetEnabled returns the Enabled field value +func (o *NotificationListItem) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// SetEnabled sets field value +func (o *NotificationListItem) SetEnabled(v bool) { + o.Enabled = v +} + +type NullableNotificationListItem struct { + Value NotificationListItem + ExplicitNull bool +} + +func (v NullableNotificationListItem) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableNotificationListItem) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_notification_test_.go b/model_notification_test_.go new file mode 100644 index 00000000..cfe8449c --- /dev/null +++ b/model_notification_test_.go @@ -0,0 +1,76 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// NotificationTest struct for NotificationTest +type NotificationTest struct { + // The returned http response. + HttpResponse string `json:"httpResponse"` + // The returned http status code. + HttpStatus int32 `json:"httpStatus"` +} + +// GetHttpResponse returns the HttpResponse field value +func (o *NotificationTest) GetHttpResponse() string { + if o == nil { + var ret string + return ret + } + + return o.HttpResponse +} + +// SetHttpResponse sets field value +func (o *NotificationTest) SetHttpResponse(v string) { + o.HttpResponse = v +} + +// GetHttpStatus returns the HttpStatus field value +func (o *NotificationTest) GetHttpStatus() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.HttpStatus +} + +// SetHttpStatus sets field value +func (o *NotificationTest) SetHttpStatus(v int32) { + o.HttpStatus = v +} + +type NullableNotificationTest struct { + Value NotificationTest + ExplicitNull bool +} + +func (v NullableNotificationTest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableNotificationTest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_patch_item_catalog_action.go b/model_patch_item_catalog_action.go index 76329a36..581a7018 100644 --- a/model_patch_item_catalog_action.go +++ b/model_patch_item_catalog_action.go @@ -14,7 +14,7 @@ import ( "encoding/json" ) -// PatchItemCatalogAction The specific properties of the \"PATCH\" catalog sync action. +// PatchItemCatalogAction The specific properties of the \"PATCH\" catalog sync action. **Note:** - If you do not provide a new `price` value, the existing `price` value is retained. - If you do not provide a new `product` value, the `product` value is set to `null`. type PatchItemCatalogAction struct { // The unique SKU of the item to patch. Sku string `json:"sku"` @@ -22,6 +22,7 @@ type PatchItemCatalogAction struct { Price *float32 `json:"price,omitempty"` // The attributes of the item to patch. Attributes *map[string]interface{} `json:"attributes,omitempty"` + Product *Product `json:"product,omitempty"` // Indicates whether to create an item if the SKU does not exist. CreateIfNotExists *bool `json:"createIfNotExists,omitempty"` } @@ -107,6 +108,39 @@ func (o *PatchItemCatalogAction) SetAttributes(v map[string]interface{}) { o.Attributes = &v } +// GetProduct returns the Product field value if set, zero value otherwise. +func (o *PatchItemCatalogAction) GetProduct() Product { + if o == nil || o.Product == nil { + var ret Product + return ret + } + return *o.Product +} + +// GetProductOk returns a tuple with the Product field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *PatchItemCatalogAction) GetProductOk() (Product, bool) { + if o == nil || o.Product == nil { + var ret Product + return ret, false + } + return *o.Product, true +} + +// HasProduct returns a boolean if a field has been set. +func (o *PatchItemCatalogAction) HasProduct() bool { + if o != nil && o.Product != nil { + return true + } + + return false +} + +// SetProduct gets a reference to the given Product and assigns it to the Product field. +func (o *PatchItemCatalogAction) SetProduct(v Product) { + o.Product = &v +} + // GetCreateIfNotExists returns the CreateIfNotExists field value if set, zero value otherwise. func (o *PatchItemCatalogAction) GetCreateIfNotExists() bool { if o == nil || o.CreateIfNotExists == nil { diff --git a/model_pending_points_notification_policy.go b/model_pending_points_notification_policy.go index df8f0cef..52caf60c 100644 --- a/model_pending_points_notification_policy.go +++ b/model_pending_points_notification_policy.go @@ -18,6 +18,8 @@ import ( type PendingPointsNotificationPolicy struct { // Notification name. Name string `json:"name"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` } // GetName returns the Name field value @@ -35,6 +37,39 @@ func (o *PendingPointsNotificationPolicy) SetName(v string) { o.Name = v } +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *PendingPointsNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *PendingPointsNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *PendingPointsNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *PendingPointsNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + type NullablePendingPointsNotificationPolicy struct { Value PendingPointsNotificationPolicy ExplicitNull bool diff --git a/model_picklist.go b/model_picklist.go index 1ec3cd5b..630f4f2e 100644 --- a/model_picklist.go +++ b/model_picklist.go @@ -21,7 +21,7 @@ type Picklist struct { Id int32 `json:"id"` // The time this entity was created. Created time.Time `json:"created"` - // The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. + // The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string. Type string `json:"type"` // The list of allowed values provided by this picklist. Values []string `json:"values"` diff --git a/model_product.go b/model_product.go new file mode 100644 index 00000000..a6c22244 --- /dev/null +++ b/model_product.go @@ -0,0 +1,59 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// Product The specific properties of the product this item belongs to, if available. +type Product struct { + // The name of the product. + Name string `json:"name"` +} + +// GetName returns the Name field value +func (o *Product) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *Product) SetName(v string) { + o.Name = v +} + +type NullableProduct struct { + Value Product + ExplicitNull bool +} + +func (v NullableProduct) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableProduct) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_role_v2.go b/model_role_v2.go index 0d2b348c..ab1b7cf1 100644 --- a/model_role_v2.go +++ b/model_role_v2.go @@ -30,7 +30,7 @@ type RoleV2 struct { // Description of the role. Description *string `json:"description,omitempty"` Permissions *RoleV2Permissions `json:"permissions,omitempty"` - // A list of user identifiers the role is assigned to. + // A list of user IDs the role is assigned to. Members *[]int32 `json:"members,omitempty"` } diff --git a/model_role_v2_base.go b/model_role_v2_base.go index 8ad8293d..db46578b 100644 --- a/model_role_v2_base.go +++ b/model_role_v2_base.go @@ -21,7 +21,7 @@ type RoleV2Base struct { // Description of the role. Description *string `json:"description,omitempty"` Permissions *RoleV2Permissions `json:"permissions,omitempty"` - // A list of user identifiers the role is assigned to. + // A list of user IDs the role is assigned to. Members *[]int32 `json:"members,omitempty"` } diff --git a/model_role_v2_permissions.go b/model_role_v2_permissions.go index defb6cf4..8b4ecaa4 100644 --- a/model_role_v2_permissions.go +++ b/model_role_v2_permissions.go @@ -16,7 +16,7 @@ import ( // RoleV2Permissions struct for RoleV2Permissions type RoleV2Permissions struct { - // List of grouped logical operations to use as a reference in the roles section. Each group of logical operations has a name. + // List of grouped logical operations referenced by roles. PermissionSets *[]RoleV2PermissionSet `json:"permissionSets,omitempty"` Roles *RoleV2RolesGroup `json:"roles,omitempty"` } diff --git a/model_saml_connection_internal.go b/model_saml_connection_internal.go new file mode 100644 index 00000000..5d2c2760 --- /dev/null +++ b/model_saml_connection_internal.go @@ -0,0 +1,76 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// SamlConnectionInternal struct for SamlConnectionInternal +type SamlConnectionInternal struct { + // ID of the SAML service. + Name string `json:"name"` + // Identity Provider metadata XML document. + MetadataDocument string `json:"metadataDocument"` +} + +// GetName returns the Name field value +func (o *SamlConnectionInternal) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// SetName sets field value +func (o *SamlConnectionInternal) SetName(v string) { + o.Name = v +} + +// GetMetadataDocument returns the MetadataDocument field value +func (o *SamlConnectionInternal) GetMetadataDocument() string { + if o == nil { + var ret string + return ret + } + + return o.MetadataDocument +} + +// SetMetadataDocument sets field value +func (o *SamlConnectionInternal) SetMetadataDocument(v string) { + o.MetadataDocument = v +} + +type NullableSamlConnectionInternal struct { + Value SamlConnectionInternal + ExplicitNull bool +} + +func (v NullableSamlConnectionInternal) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableSamlConnectionInternal) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_saml_login_endpoint.go b/model_saml_login_endpoint.go index c656ffdc..ebe730d5 100644 --- a/model_saml_login_endpoint.go +++ b/model_saml_login_endpoint.go @@ -16,12 +16,29 @@ import ( // SamlLoginEndpoint struct for SamlLoginEndpoint type SamlLoginEndpoint struct { + // ID of the SAML login endpoint. + Id int32 `json:"id"` // ID of the SAML service. Name string `json:"name"` - // Single Sign-On URL. + // The single sign-on URL. LoginURL string `json:"loginURL"` } +// GetId returns the Id field value +func (o *SamlLoginEndpoint) GetId() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Id +} + +// SetId sets field value +func (o *SamlLoginEndpoint) SetId(v int32) { + o.Id = v +} + // GetName returns the Name field value func (o *SamlLoginEndpoint) GetName() string { if o == nil { diff --git a/model_store.go b/model_store.go index 158aa2b1..c2df17cf 100644 --- a/model_store.go +++ b/model_store.go @@ -27,7 +27,7 @@ type Store struct { Description string `json:"description"` // The attributes of the store. Attributes *map[string]interface{} `json:"attributes,omitempty"` - // The integration ID of the store. You choose this ID when you create a store. + // The integration ID of the store. You choose this ID when you create a store. **Note**: You cannot edit the `integrationId` after the store has been created. IntegrationId string `json:"integrationId"` // The ID of the application that owns this entity. ApplicationId int32 `json:"applicationId"` diff --git a/model_template_arg_def.go b/model_template_arg_def.go index 4cb40726..404d29ea 100644 --- a/model_template_arg_def.go +++ b/model_template_arg_def.go @@ -19,7 +19,7 @@ type TemplateArgDef struct { // The type of value this argument expects. Type string `json:"type"` // A campaigner-friendly description of the argument, this will also be shown in the rule editor. - Description string `json:"description"` + Description *string `json:"description,omitempty"` // A campaigner friendly name for the argument, this will be shown in the rule editor. Title string `json:"title"` // Arbitrary metadata that may be used to render an input for this argument. @@ -45,19 +45,37 @@ func (o *TemplateArgDef) SetType(v string) { o.Type = v } -// GetDescription returns the Description field value +// GetDescription returns the Description field value if set, zero value otherwise. func (o *TemplateArgDef) GetDescription() string { - if o == nil { + if o == nil || o.Description == nil { var ret string return ret } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TemplateArgDef) GetDescriptionOk() (string, bool) { + if o == nil || o.Description == nil { + var ret string + return ret, false + } + return *o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *TemplateArgDef) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } - return o.Description + return false } -// SetDescription sets field value +// SetDescription gets a reference to the given string and assigns it to the Description field. func (o *TemplateArgDef) SetDescription(v string) { - o.Description = v + o.Description = &v } // GetTitle returns the Title field value diff --git a/model_tier_downgrade_notification_policy.go b/model_tier_downgrade_notification_policy.go index fae244ff..d60acea7 100644 --- a/model_tier_downgrade_notification_policy.go +++ b/model_tier_downgrade_notification_policy.go @@ -18,6 +18,8 @@ import ( type TierDowngradeNotificationPolicy struct { // The name of the notification. Name string `json:"name"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` } // GetName returns the Name field value @@ -35,6 +37,39 @@ func (o *TierDowngradeNotificationPolicy) SetName(v string) { o.Name = v } +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *TierDowngradeNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TierDowngradeNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *TierDowngradeNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *TierDowngradeNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + type NullableTierDowngradeNotificationPolicy struct { Value TierDowngradeNotificationPolicy ExplicitNull bool diff --git a/model_tier_upgrade_notification_policy.go b/model_tier_upgrade_notification_policy.go index 05f5d7ee..dc8af2c7 100644 --- a/model_tier_upgrade_notification_policy.go +++ b/model_tier_upgrade_notification_policy.go @@ -18,6 +18,8 @@ import ( type TierUpgradeNotificationPolicy struct { // Notification name. Name string `json:"name"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` } // GetName returns the Name field value @@ -35,6 +37,39 @@ func (o *TierUpgradeNotificationPolicy) SetName(v string) { o.Name = v } +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *TierUpgradeNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TierUpgradeNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *TierUpgradeNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *TierUpgradeNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + type NullableTierUpgradeNotificationPolicy struct { Value TierUpgradeNotificationPolicy ExplicitNull bool diff --git a/model_tier_will_downgrade_notification_policy.go b/model_tier_will_downgrade_notification_policy.go index 213d13fb..96941e19 100644 --- a/model_tier_will_downgrade_notification_policy.go +++ b/model_tier_will_downgrade_notification_policy.go @@ -17,8 +17,10 @@ import ( // TierWillDowngradeNotificationPolicy struct for TierWillDowngradeNotificationPolicy type TierWillDowngradeNotificationPolicy struct { // The name of the notification. - Name string `json:"name"` - Triggers []TierWillDowngradeNotificationTrigger `json:"triggers"` + Name string `json:"name"` + // Indicates whether batching is activated. + BatchingEnabled *bool `json:"batchingEnabled,omitempty"` + Triggers []TierWillDowngradeNotificationTrigger `json:"triggers"` } // GetName returns the Name field value @@ -36,6 +38,39 @@ func (o *TierWillDowngradeNotificationPolicy) SetName(v string) { o.Name = v } +// GetBatchingEnabled returns the BatchingEnabled field value if set, zero value otherwise. +func (o *TierWillDowngradeNotificationPolicy) GetBatchingEnabled() bool { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret + } + return *o.BatchingEnabled +} + +// GetBatchingEnabledOk returns a tuple with the BatchingEnabled field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TierWillDowngradeNotificationPolicy) GetBatchingEnabledOk() (bool, bool) { + if o == nil || o.BatchingEnabled == nil { + var ret bool + return ret, false + } + return *o.BatchingEnabled, true +} + +// HasBatchingEnabled returns a boolean if a field has been set. +func (o *TierWillDowngradeNotificationPolicy) HasBatchingEnabled() bool { + if o != nil && o.BatchingEnabled != nil { + return true + } + + return false +} + +// SetBatchingEnabled gets a reference to the given bool and assigns it to the BatchingEnabled field. +func (o *TierWillDowngradeNotificationPolicy) SetBatchingEnabled(v bool) { + o.BatchingEnabled = &v +} + // GetTriggers returns the Triggers field value func (o *TierWillDowngradeNotificationPolicy) GetTriggers() []TierWillDowngradeNotificationTrigger { if o == nil { diff --git a/model_time_point.go b/model_time_point.go new file mode 100644 index 00000000..b6a15011 --- /dev/null +++ b/model_time_point.go @@ -0,0 +1,198 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// TimePoint The absolute duration after which the achievement ends and resets for a particular customer profile. **Note**: The duration follows the time zone of the Application this achievement belongs to. +type TimePoint struct { + // The achievement ends and resets in this month. **Note**: Only applicable if the period is set to `Y`. + Month *int32 `json:"month,omitempty"` + // The achievement ends and resets on this day of the month. **Note**: Only applicable if the period is set to `Y` or `M`. + DayOfMonth *int32 `json:"dayOfMonth,omitempty"` + // The achievement ends and resets on this day of the week. `1` represents `Monday` and `7` represents `Sunday`. **Note**: Only applicable if the period is set to `W`. + DayOfWeek *int32 `json:"dayOfWeek,omitempty"` + // The achievement ends and resets at this hour. + Hour int32 `json:"hour"` + // The achievement ends and resets at this minute. + Minute int32 `json:"minute"` + // The achievement ends and resets at this second. + Second int32 `json:"second"` +} + +// GetMonth returns the Month field value if set, zero value otherwise. +func (o *TimePoint) GetMonth() int32 { + if o == nil || o.Month == nil { + var ret int32 + return ret + } + return *o.Month +} + +// GetMonthOk returns a tuple with the Month field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TimePoint) GetMonthOk() (int32, bool) { + if o == nil || o.Month == nil { + var ret int32 + return ret, false + } + return *o.Month, true +} + +// HasMonth returns a boolean if a field has been set. +func (o *TimePoint) HasMonth() bool { + if o != nil && o.Month != nil { + return true + } + + return false +} + +// SetMonth gets a reference to the given int32 and assigns it to the Month field. +func (o *TimePoint) SetMonth(v int32) { + o.Month = &v +} + +// GetDayOfMonth returns the DayOfMonth field value if set, zero value otherwise. +func (o *TimePoint) GetDayOfMonth() int32 { + if o == nil || o.DayOfMonth == nil { + var ret int32 + return ret + } + return *o.DayOfMonth +} + +// GetDayOfMonthOk returns a tuple with the DayOfMonth field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TimePoint) GetDayOfMonthOk() (int32, bool) { + if o == nil || o.DayOfMonth == nil { + var ret int32 + return ret, false + } + return *o.DayOfMonth, true +} + +// HasDayOfMonth returns a boolean if a field has been set. +func (o *TimePoint) HasDayOfMonth() bool { + if o != nil && o.DayOfMonth != nil { + return true + } + + return false +} + +// SetDayOfMonth gets a reference to the given int32 and assigns it to the DayOfMonth field. +func (o *TimePoint) SetDayOfMonth(v int32) { + o.DayOfMonth = &v +} + +// GetDayOfWeek returns the DayOfWeek field value if set, zero value otherwise. +func (o *TimePoint) GetDayOfWeek() int32 { + if o == nil || o.DayOfWeek == nil { + var ret int32 + return ret + } + return *o.DayOfWeek +} + +// GetDayOfWeekOk returns a tuple with the DayOfWeek field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *TimePoint) GetDayOfWeekOk() (int32, bool) { + if o == nil || o.DayOfWeek == nil { + var ret int32 + return ret, false + } + return *o.DayOfWeek, true +} + +// HasDayOfWeek returns a boolean if a field has been set. +func (o *TimePoint) HasDayOfWeek() bool { + if o != nil && o.DayOfWeek != nil { + return true + } + + return false +} + +// SetDayOfWeek gets a reference to the given int32 and assigns it to the DayOfWeek field. +func (o *TimePoint) SetDayOfWeek(v int32) { + o.DayOfWeek = &v +} + +// GetHour returns the Hour field value +func (o *TimePoint) GetHour() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Hour +} + +// SetHour sets field value +func (o *TimePoint) SetHour(v int32) { + o.Hour = v +} + +// GetMinute returns the Minute field value +func (o *TimePoint) GetMinute() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Minute +} + +// SetMinute sets field value +func (o *TimePoint) SetMinute(v int32) { + o.Minute = v +} + +// GetSecond returns the Second field value +func (o *TimePoint) GetSecond() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.Second +} + +// SetSecond sets field value +func (o *TimePoint) SetSecond(v int32) { + o.Second = v +} + +type NullableTimePoint struct { + Value TimePoint + ExplicitNull bool +} + +func (v NullableTimePoint) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableTimePoint) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_update_achievement.go b/model_update_achievement.go new file mode 100644 index 00000000..a014b17f --- /dev/null +++ b/model_update_achievement.go @@ -0,0 +1,251 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// UpdateAchievement struct for UpdateAchievement +type UpdateAchievement struct { + // The internal name of the achievement used in API requests. + Name *string `json:"name,omitempty"` + // The display name for the achievement in the Campaign Manager. + Title *string `json:"title,omitempty"` + // A description of the achievement. + Description *string `json:"description,omitempty"` + // The required number of actions or the transactional milestone to complete the achievement. + Target *float32 `json:"target,omitempty"` + // The relative duration after which the achievement ends and resets for a particular customer profile. + Period *string `json:"period,omitempty"` + PeriodEndOverride *TimePoint `json:"periodEndOverride,omitempty"` +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateAchievement) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAchievement) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateAchievement) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateAchievement) SetName(v string) { + o.Name = &v +} + +// GetTitle returns the Title field value if set, zero value otherwise. +func (o *UpdateAchievement) GetTitle() string { + if o == nil || o.Title == nil { + var ret string + return ret + } + return *o.Title +} + +// GetTitleOk returns a tuple with the Title field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAchievement) GetTitleOk() (string, bool) { + if o == nil || o.Title == nil { + var ret string + return ret, false + } + return *o.Title, true +} + +// HasTitle returns a boolean if a field has been set. +func (o *UpdateAchievement) HasTitle() bool { + if o != nil && o.Title != nil { + return true + } + + return false +} + +// SetTitle gets a reference to the given string and assigns it to the Title field. +func (o *UpdateAchievement) SetTitle(v string) { + o.Title = &v +} + +// GetDescription returns the Description field value if set, zero value otherwise. +func (o *UpdateAchievement) GetDescription() string { + if o == nil || o.Description == nil { + var ret string + return ret + } + return *o.Description +} + +// GetDescriptionOk returns a tuple with the Description field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAchievement) GetDescriptionOk() (string, bool) { + if o == nil || o.Description == nil { + var ret string + return ret, false + } + return *o.Description, true +} + +// HasDescription returns a boolean if a field has been set. +func (o *UpdateAchievement) HasDescription() bool { + if o != nil && o.Description != nil { + return true + } + + return false +} + +// SetDescription gets a reference to the given string and assigns it to the Description field. +func (o *UpdateAchievement) SetDescription(v string) { + o.Description = &v +} + +// GetTarget returns the Target field value if set, zero value otherwise. +func (o *UpdateAchievement) GetTarget() float32 { + if o == nil || o.Target == nil { + var ret float32 + return ret + } + return *o.Target +} + +// GetTargetOk returns a tuple with the Target field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAchievement) GetTargetOk() (float32, bool) { + if o == nil || o.Target == nil { + var ret float32 + return ret, false + } + return *o.Target, true +} + +// HasTarget returns a boolean if a field has been set. +func (o *UpdateAchievement) HasTarget() bool { + if o != nil && o.Target != nil { + return true + } + + return false +} + +// SetTarget gets a reference to the given float32 and assigns it to the Target field. +func (o *UpdateAchievement) SetTarget(v float32) { + o.Target = &v +} + +// GetPeriod returns the Period field value if set, zero value otherwise. +func (o *UpdateAchievement) GetPeriod() string { + if o == nil || o.Period == nil { + var ret string + return ret + } + return *o.Period +} + +// GetPeriodOk returns a tuple with the Period field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAchievement) GetPeriodOk() (string, bool) { + if o == nil || o.Period == nil { + var ret string + return ret, false + } + return *o.Period, true +} + +// HasPeriod returns a boolean if a field has been set. +func (o *UpdateAchievement) HasPeriod() bool { + if o != nil && o.Period != nil { + return true + } + + return false +} + +// SetPeriod gets a reference to the given string and assigns it to the Period field. +func (o *UpdateAchievement) SetPeriod(v string) { + o.Period = &v +} + +// GetPeriodEndOverride returns the PeriodEndOverride field value if set, zero value otherwise. +func (o *UpdateAchievement) GetPeriodEndOverride() TimePoint { + if o == nil || o.PeriodEndOverride == nil { + var ret TimePoint + return ret + } + return *o.PeriodEndOverride +} + +// GetPeriodEndOverrideOk returns a tuple with the PeriodEndOverride field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateAchievement) GetPeriodEndOverrideOk() (TimePoint, bool) { + if o == nil || o.PeriodEndOverride == nil { + var ret TimePoint + return ret, false + } + return *o.PeriodEndOverride, true +} + +// HasPeriodEndOverride returns a boolean if a field has been set. +func (o *UpdateAchievement) HasPeriodEndOverride() bool { + if o != nil && o.PeriodEndOverride != nil { + return true + } + + return false +} + +// SetPeriodEndOverride gets a reference to the given TimePoint and assigns it to the PeriodEndOverride field. +func (o *UpdateAchievement) SetPeriodEndOverride(v TimePoint) { + o.PeriodEndOverride = &v +} + +type NullableUpdateAchievement struct { + Value UpdateAchievement + ExplicitNull bool +} + +func (v NullableUpdateAchievement) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableUpdateAchievement) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_update_application_api_key.go b/model_update_application_api_key.go new file mode 100644 index 00000000..9a9dd6dd --- /dev/null +++ b/model_update_application_api_key.go @@ -0,0 +1,59 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// UpdateApplicationApiKey struct for UpdateApplicationApiKey +type UpdateApplicationApiKey struct { + // A time offset in nanoseconds associated with the API key. When making a request using the API key, rule evaluation is based on a date that is calculated by adding the offset to the current date. + TimeOffset int32 `json:"timeOffset"` +} + +// GetTimeOffset returns the TimeOffset field value +func (o *UpdateApplicationApiKey) GetTimeOffset() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.TimeOffset +} + +// SetTimeOffset sets field value +func (o *UpdateApplicationApiKey) SetTimeOffset(v int32) { + o.TimeOffset = v +} + +type NullableUpdateApplicationApiKey struct { + Value UpdateApplicationApiKey + ExplicitNull bool +} + +func (v NullableUpdateApplicationApiKey) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableUpdateApplicationApiKey) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_update_campaign_group.go b/model_update_campaign_group.go index 3459d7da..fea08478 100644 --- a/model_update_campaign_group.go +++ b/model_update_campaign_group.go @@ -16,7 +16,7 @@ import ( // UpdateCampaignGroup type UpdateCampaignGroup struct { - // The name of this campaign access group. + // The name of the campaign access group. Name string `json:"name"` // A longer description of the campaign access group. Description *string `json:"description,omitempty"` diff --git a/model_update_loyalty_program.go b/model_update_loyalty_program.go index 4a306301..7e6aeafe 100644 --- a/model_update_loyalty_program.go +++ b/model_update_loyalty_program.go @@ -32,10 +32,14 @@ type UpdateLoyaltyProgram struct { UsersPerCardLimit *int32 `json:"usersPerCardLimit,omitempty"` // 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. Sandbox *bool `json:"sandbox,omitempty"` - // The amount of time until the expiration of every tier, starting from the date when the customer joined the considered tier for the first time. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. + // The policy that defines which date is used to calculate the expiration date of a customer's current tier. - `tier_start_date`: The tier expiration date is calculated based on when the customer joined the current tier. - `program_join_date`: The tier expiration date is calculated based on when the customer joined the loyalty program. + TiersExpirationPolicy *string `json:"tiersExpirationPolicy,omitempty"` + // The amount of time after which the tier expires. The time format is an **integer** followed by one letter indicating the time unit. Examples: `30s`, `40m`, `1h`, `5D`, `7W`, `10M`, `15Y`. Available units: - `s`: seconds - `m`: minutes - `h`: hours - `D`: days - `W`: weeks - `M`: months - `Y`: years You can round certain units up or down: - `_D` for rounding down days only. Signifies the start of the day. - `_U` for rounding up days, weeks, months and years. Signifies the end of the day, week, month or year. TiersExpireIn *string `json:"tiersExpireIn,omitempty"` // Customers's tier downgrade policy. - `one_down`: Once the tier expires and if the user doesn't have enough points to stay in the tier, the user is downgraded one tier down. - `balance_based`: Once the tier expires, the user's tier is evaluated based on the amount of active points the user has at this instant. TiersDowngradePolicy *string `json:"tiersDowngradePolicy,omitempty"` + // The policy that defines when the customer joins the loyalty program. - `not_join`: The customer does not join the loyalty program but can still earn and spend loyalty points. **Note**: The customer does not have a program join date. - `points_activated`: The customer joins the loyalty program only when their earned loyalty points become active for the first time. - `points_earned`: The customer joins the loyalty program when they earn loyalty points for the first time. + ProgramJoinPolicy *string `json:"programJoinPolicy,omitempty"` // The tiers in this loyalty program. Tiers *[]NewLoyaltyTier `json:"tiers,omitempty"` } @@ -304,6 +308,39 @@ func (o *UpdateLoyaltyProgram) SetSandbox(v bool) { o.Sandbox = &v } +// GetTiersExpirationPolicy returns the TiersExpirationPolicy field value if set, zero value otherwise. +func (o *UpdateLoyaltyProgram) GetTiersExpirationPolicy() string { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret + } + return *o.TiersExpirationPolicy +} + +// GetTiersExpirationPolicyOk returns a tuple with the TiersExpirationPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoyaltyProgram) GetTiersExpirationPolicyOk() (string, bool) { + if o == nil || o.TiersExpirationPolicy == nil { + var ret string + return ret, false + } + return *o.TiersExpirationPolicy, true +} + +// HasTiersExpirationPolicy returns a boolean if a field has been set. +func (o *UpdateLoyaltyProgram) HasTiersExpirationPolicy() bool { + if o != nil && o.TiersExpirationPolicy != nil { + return true + } + + return false +} + +// SetTiersExpirationPolicy gets a reference to the given string and assigns it to the TiersExpirationPolicy field. +func (o *UpdateLoyaltyProgram) SetTiersExpirationPolicy(v string) { + o.TiersExpirationPolicy = &v +} + // GetTiersExpireIn returns the TiersExpireIn field value if set, zero value otherwise. func (o *UpdateLoyaltyProgram) GetTiersExpireIn() string { if o == nil || o.TiersExpireIn == nil { @@ -370,6 +407,39 @@ func (o *UpdateLoyaltyProgram) SetTiersDowngradePolicy(v string) { o.TiersDowngradePolicy = &v } +// GetProgramJoinPolicy returns the ProgramJoinPolicy field value if set, zero value otherwise. +func (o *UpdateLoyaltyProgram) GetProgramJoinPolicy() string { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret + } + return *o.ProgramJoinPolicy +} + +// GetProgramJoinPolicyOk returns a tuple with the ProgramJoinPolicy field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateLoyaltyProgram) GetProgramJoinPolicyOk() (string, bool) { + if o == nil || o.ProgramJoinPolicy == nil { + var ret string + return ret, false + } + return *o.ProgramJoinPolicy, true +} + +// HasProgramJoinPolicy returns a boolean if a field has been set. +func (o *UpdateLoyaltyProgram) HasProgramJoinPolicy() bool { + if o != nil && o.ProgramJoinPolicy != nil { + return true + } + + return false +} + +// SetProgramJoinPolicy gets a reference to the given string and assigns it to the ProgramJoinPolicy field. +func (o *UpdateLoyaltyProgram) SetProgramJoinPolicy(v string) { + o.ProgramJoinPolicy = &v +} + // GetTiers returns the Tiers field value if set, zero value otherwise. func (o *UpdateLoyaltyProgram) GetTiers() []NewLoyaltyTier { if o == nil || o.Tiers == nil { diff --git a/model_update_picklist.go b/model_update_picklist.go index d08ece90..4e8e7c6c 100644 --- a/model_update_picklist.go +++ b/model_update_picklist.go @@ -16,7 +16,7 @@ import ( // UpdatePicklist type UpdatePicklist struct { - // The type of allowed values in the picklist. If type time is chosen, it must be an RFC3339 timestamp string. + // The type of allowed values in the picklist. If the type `time` is chosen, it must be an RFC3339 timestamp string. Type string `json:"type"` // The list of allowed values provided by this picklist. Values []string `json:"values"` diff --git a/model_update_user.go b/model_update_user.go index 253239eb..d4a6c9d1 100644 --- a/model_update_user.go +++ b/model_update_user.go @@ -16,17 +16,18 @@ import ( // UpdateUser struct for UpdateUser type UpdateUser struct { - // The user name. + // Name of the user. Name *string `json:"name,omitempty"` - // The `Access Control List` json defining the role of the user. This represents the access control on the user level. - Policy *string `json:"policy,omitempty"` - // New state (\"deactivated\" or \"active\") for the user. Only usable by admins for the user. + // The state of the user. - `deactivated`: The user has been deactivated. - `active`: The user is active. **Note**: Only `admin` users can update the state of another user. State *string `json:"state,omitempty"` - // List of roles to assign to the user. - Roles *[]int32 `json:"roles,omitempty"` - ApplicationNotificationSubscriptions *map[string]interface{} `json:"applicationNotificationSubscriptions,omitempty"` - // An indication of whether the user has admin permissions. + // Indicates whether the user is an `admin`. IsAdmin *bool `json:"isAdmin,omitempty"` + // Indicates the access level of the user. + Policy *string `json:"policy,omitempty"` + // A list of the IDs of the roles assigned to the user. **Note**: Use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint to find the ID of a role. + Roles *[]int32 `json:"roles,omitempty"` + // Application notifications that the user is subscribed to. + ApplicationNotificationSubscriptions *map[string]interface{} `json:"applicationNotificationSubscriptions,omitempty"` } // GetName returns the Name field value if set, zero value otherwise. @@ -62,70 +63,103 @@ func (o *UpdateUser) SetName(v string) { o.Name = &v } -// GetPolicy returns the Policy field value if set, zero value otherwise. -func (o *UpdateUser) GetPolicy() string { - if o == nil || o.Policy == nil { +// GetState returns the State field value if set, zero value otherwise. +func (o *UpdateUser) GetState() string { + if o == nil || o.State == nil { var ret string return ret } - return *o.Policy + return *o.State } -// GetPolicyOk returns a tuple with the Policy field value if set, zero value otherwise +// GetStateOk returns a tuple with the State field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *UpdateUser) GetPolicyOk() (string, bool) { - if o == nil || o.Policy == nil { +func (o *UpdateUser) GetStateOk() (string, bool) { + if o == nil || o.State == nil { var ret string return ret, false } - return *o.Policy, true + return *o.State, true } -// HasPolicy returns a boolean if a field has been set. -func (o *UpdateUser) HasPolicy() bool { - if o != nil && o.Policy != nil { +// HasState returns a boolean if a field has been set. +func (o *UpdateUser) HasState() bool { + if o != nil && o.State != nil { return true } return false } -// SetPolicy gets a reference to the given string and assigns it to the Policy field. -func (o *UpdateUser) SetPolicy(v string) { - o.Policy = &v +// SetState gets a reference to the given string and assigns it to the State field. +func (o *UpdateUser) SetState(v string) { + o.State = &v } -// GetState returns the State field value if set, zero value otherwise. -func (o *UpdateUser) GetState() string { - if o == nil || o.State == nil { +// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise. +func (o *UpdateUser) GetIsAdmin() bool { + if o == nil || o.IsAdmin == nil { + var ret bool + return ret + } + return *o.IsAdmin +} + +// GetIsAdminOk returns a tuple with the IsAdmin field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *UpdateUser) GetIsAdminOk() (bool, bool) { + if o == nil || o.IsAdmin == nil { + var ret bool + return ret, false + } + return *o.IsAdmin, true +} + +// HasIsAdmin returns a boolean if a field has been set. +func (o *UpdateUser) HasIsAdmin() bool { + if o != nil && o.IsAdmin != nil { + return true + } + + return false +} + +// SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. +func (o *UpdateUser) SetIsAdmin(v bool) { + o.IsAdmin = &v +} + +// GetPolicy returns the Policy field value if set, zero value otherwise. +func (o *UpdateUser) GetPolicy() string { + if o == nil || o.Policy == nil { var ret string return ret } - return *o.State + return *o.Policy } -// GetStateOk returns a tuple with the State field value if set, zero value otherwise +// GetPolicyOk returns a tuple with the Policy field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *UpdateUser) GetStateOk() (string, bool) { - if o == nil || o.State == nil { +func (o *UpdateUser) GetPolicyOk() (string, bool) { + if o == nil || o.Policy == nil { var ret string return ret, false } - return *o.State, true + return *o.Policy, true } -// HasState returns a boolean if a field has been set. -func (o *UpdateUser) HasState() bool { - if o != nil && o.State != nil { +// HasPolicy returns a boolean if a field has been set. +func (o *UpdateUser) HasPolicy() bool { + if o != nil && o.Policy != nil { return true } return false } -// SetState gets a reference to the given string and assigns it to the State field. -func (o *UpdateUser) SetState(v string) { - o.State = &v +// SetPolicy gets a reference to the given string and assigns it to the Policy field. +func (o *UpdateUser) SetPolicy(v string) { + o.Policy = &v } // GetRoles returns the Roles field value if set, zero value otherwise. @@ -194,39 +228,6 @@ func (o *UpdateUser) SetApplicationNotificationSubscriptions(v map[string]interf o.ApplicationNotificationSubscriptions = &v } -// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise. -func (o *UpdateUser) GetIsAdmin() bool { - if o == nil || o.IsAdmin == nil { - var ret bool - return ret - } - return *o.IsAdmin -} - -// GetIsAdminOk returns a tuple with the IsAdmin field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *UpdateUser) GetIsAdminOk() (bool, bool) { - if o == nil || o.IsAdmin == nil { - var ret bool - return ret, false - } - return *o.IsAdmin, true -} - -// HasIsAdmin returns a boolean if a field has been set. -func (o *UpdateUser) HasIsAdmin() bool { - if o != nil && o.IsAdmin != nil { - return true - } - - return false -} - -// SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. -func (o *UpdateUser) SetIsAdmin(v bool) { - o.IsAdmin = &v -} - type NullableUpdateUser struct { Value UpdateUser ExplicitNull bool diff --git a/model_user.go b/model_user.go index 1e8d078a..fcaee37c 100644 --- a/model_user.go +++ b/model_user.go @@ -23,31 +23,32 @@ type User struct { Created time.Time `json:"created"` // The time this entity was last modified. Modified time.Time `json:"modified"` - // The email address associated with your account. + // The email address associated with the user profile. Email string `json:"email"` // The ID of the account that owns this entity. AccountId int32 `json:"accountId"` - // Invite token, empty if the user as already accepted their invite. - InviteToken string `json:"inviteToken"` - // Current user state. - State string `json:"state"` - // Full name + // Name of the user. Name string `json:"name"` - // User ACL Policy + // State of the user. + State string `json:"state"` + // Invitation token of the user. **Note**: If the user has already accepted their invitation, this is `null`. + InviteToken string `json:"inviteToken"` + // Indicates whether the user is an `admin`. + IsAdmin *bool `json:"isAdmin,omitempty"` + // Access level of the user. Policy map[string]interface{} `json:"policy"` - // Latest timestamp the user has been notified for feed. - LatestFeedTimestamp *time.Time `json:"latestFeedTimestamp,omitempty"` - // Contains a list of all roles the user is a member of. - Roles *[]int32 `json:"roles,omitempty"` - ApplicationNotificationSubscriptions *map[string]interface{} `json:"applicationNotificationSubscriptions,omitempty"` - // The Authentication method for this user. + // A list of the IDs of the roles assigned to the user. + Roles *[]int32 `json:"roles,omitempty"` + // Authentication method for this user. AuthMethod *string `json:"authMethod,omitempty"` - // An indication of whether the user has admin permissions. - IsAdmin *bool `json:"isAdmin,omitempty"` - // Date and time when the user last signed in to Talon.One. + // Application notifications that the user is subscribed to. + ApplicationNotificationSubscriptions *map[string]interface{} `json:"applicationNotificationSubscriptions,omitempty"` + // Timestamp when the user last signed in to Talon.One. LastSignedIn *time.Time `json:"lastSignedIn,omitempty"` - // Date and time of the user's last activity after signing in to Talon.One. + // Timestamp of the user's last activity after signing in to Talon.One. LastAccessed *time.Time `json:"lastAccessed,omitempty"` + // Timestamp when the user was notified for feed. + LatestFeedTimestamp *time.Time `json:"latestFeedTimestamp,omitempty"` } // GetId returns the Id field value @@ -125,19 +126,19 @@ func (o *User) SetAccountId(v int32) { o.AccountId = v } -// GetInviteToken returns the InviteToken field value -func (o *User) GetInviteToken() string { +// GetName returns the Name field value +func (o *User) GetName() string { if o == nil { var ret string return ret } - return o.InviteToken + return o.Name } -// SetInviteToken sets field value -func (o *User) SetInviteToken(v string) { - o.InviteToken = v +// SetName sets field value +func (o *User) SetName(v string) { + o.Name = v } // GetState returns the State field value @@ -155,67 +156,67 @@ func (o *User) SetState(v string) { o.State = v } -// GetName returns the Name field value -func (o *User) GetName() string { +// GetInviteToken returns the InviteToken field value +func (o *User) GetInviteToken() string { if o == nil { var ret string return ret } - return o.Name -} - -// SetName sets field value -func (o *User) SetName(v string) { - o.Name = v -} - -// GetPolicy returns the Policy field value -func (o *User) GetPolicy() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - - return o.Policy + return o.InviteToken } -// SetPolicy sets field value -func (o *User) SetPolicy(v map[string]interface{}) { - o.Policy = v +// SetInviteToken sets field value +func (o *User) SetInviteToken(v string) { + o.InviteToken = v } -// GetLatestFeedTimestamp returns the LatestFeedTimestamp field value if set, zero value otherwise. -func (o *User) GetLatestFeedTimestamp() time.Time { - if o == nil || o.LatestFeedTimestamp == nil { - var ret time.Time +// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise. +func (o *User) GetIsAdmin() bool { + if o == nil || o.IsAdmin == nil { + var ret bool return ret } - return *o.LatestFeedTimestamp + return *o.IsAdmin } -// GetLatestFeedTimestampOk returns a tuple with the LatestFeedTimestamp field value if set, zero value otherwise +// GetIsAdminOk returns a tuple with the IsAdmin field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *User) GetLatestFeedTimestampOk() (time.Time, bool) { - if o == nil || o.LatestFeedTimestamp == nil { - var ret time.Time +func (o *User) GetIsAdminOk() (bool, bool) { + if o == nil || o.IsAdmin == nil { + var ret bool return ret, false } - return *o.LatestFeedTimestamp, true + return *o.IsAdmin, true } -// HasLatestFeedTimestamp returns a boolean if a field has been set. -func (o *User) HasLatestFeedTimestamp() bool { - if o != nil && o.LatestFeedTimestamp != nil { +// HasIsAdmin returns a boolean if a field has been set. +func (o *User) HasIsAdmin() bool { + if o != nil && o.IsAdmin != nil { return true } return false } -// SetLatestFeedTimestamp gets a reference to the given time.Time and assigns it to the LatestFeedTimestamp field. -func (o *User) SetLatestFeedTimestamp(v time.Time) { - o.LatestFeedTimestamp = &v +// SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. +func (o *User) SetIsAdmin(v bool) { + o.IsAdmin = &v +} + +// GetPolicy returns the Policy field value +func (o *User) GetPolicy() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Policy +} + +// SetPolicy sets field value +func (o *User) SetPolicy(v map[string]interface{}) { + o.Policy = v } // GetRoles returns the Roles field value if set, zero value otherwise. @@ -251,39 +252,6 @@ func (o *User) SetRoles(v []int32) { o.Roles = &v } -// GetApplicationNotificationSubscriptions returns the ApplicationNotificationSubscriptions field value if set, zero value otherwise. -func (o *User) GetApplicationNotificationSubscriptions() map[string]interface{} { - if o == nil || o.ApplicationNotificationSubscriptions == nil { - var ret map[string]interface{} - return ret - } - return *o.ApplicationNotificationSubscriptions -} - -// GetApplicationNotificationSubscriptionsOk returns a tuple with the ApplicationNotificationSubscriptions field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *User) GetApplicationNotificationSubscriptionsOk() (map[string]interface{}, bool) { - if o == nil || o.ApplicationNotificationSubscriptions == nil { - var ret map[string]interface{} - return ret, false - } - return *o.ApplicationNotificationSubscriptions, true -} - -// HasApplicationNotificationSubscriptions returns a boolean if a field has been set. -func (o *User) HasApplicationNotificationSubscriptions() bool { - if o != nil && o.ApplicationNotificationSubscriptions != nil { - return true - } - - return false -} - -// SetApplicationNotificationSubscriptions gets a reference to the given map[string]interface{} and assigns it to the ApplicationNotificationSubscriptions field. -func (o *User) SetApplicationNotificationSubscriptions(v map[string]interface{}) { - o.ApplicationNotificationSubscriptions = &v -} - // GetAuthMethod returns the AuthMethod field value if set, zero value otherwise. func (o *User) GetAuthMethod() string { if o == nil || o.AuthMethod == nil { @@ -317,37 +285,37 @@ func (o *User) SetAuthMethod(v string) { o.AuthMethod = &v } -// GetIsAdmin returns the IsAdmin field value if set, zero value otherwise. -func (o *User) GetIsAdmin() bool { - if o == nil || o.IsAdmin == nil { - var ret bool +// GetApplicationNotificationSubscriptions returns the ApplicationNotificationSubscriptions field value if set, zero value otherwise. +func (o *User) GetApplicationNotificationSubscriptions() map[string]interface{} { + if o == nil || o.ApplicationNotificationSubscriptions == nil { + var ret map[string]interface{} return ret } - return *o.IsAdmin + return *o.ApplicationNotificationSubscriptions } -// GetIsAdminOk returns a tuple with the IsAdmin field value if set, zero value otherwise +// GetApplicationNotificationSubscriptionsOk returns a tuple with the ApplicationNotificationSubscriptions field value if set, zero value otherwise // and a boolean to check if the value has been set. -func (o *User) GetIsAdminOk() (bool, bool) { - if o == nil || o.IsAdmin == nil { - var ret bool +func (o *User) GetApplicationNotificationSubscriptionsOk() (map[string]interface{}, bool) { + if o == nil || o.ApplicationNotificationSubscriptions == nil { + var ret map[string]interface{} return ret, false } - return *o.IsAdmin, true + return *o.ApplicationNotificationSubscriptions, true } -// HasIsAdmin returns a boolean if a field has been set. -func (o *User) HasIsAdmin() bool { - if o != nil && o.IsAdmin != nil { +// HasApplicationNotificationSubscriptions returns a boolean if a field has been set. +func (o *User) HasApplicationNotificationSubscriptions() bool { + if o != nil && o.ApplicationNotificationSubscriptions != nil { return true } return false } -// SetIsAdmin gets a reference to the given bool and assigns it to the IsAdmin field. -func (o *User) SetIsAdmin(v bool) { - o.IsAdmin = &v +// SetApplicationNotificationSubscriptions gets a reference to the given map[string]interface{} and assigns it to the ApplicationNotificationSubscriptions field. +func (o *User) SetApplicationNotificationSubscriptions(v map[string]interface{}) { + o.ApplicationNotificationSubscriptions = &v } // GetLastSignedIn returns the LastSignedIn field value if set, zero value otherwise. @@ -416,6 +384,39 @@ func (o *User) SetLastAccessed(v time.Time) { o.LastAccessed = &v } +// GetLatestFeedTimestamp returns the LatestFeedTimestamp field value if set, zero value otherwise. +func (o *User) GetLatestFeedTimestamp() time.Time { + if o == nil || o.LatestFeedTimestamp == nil { + var ret time.Time + return ret + } + return *o.LatestFeedTimestamp +} + +// GetLatestFeedTimestampOk returns a tuple with the LatestFeedTimestamp field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *User) GetLatestFeedTimestampOk() (time.Time, bool) { + if o == nil || o.LatestFeedTimestamp == nil { + var ret time.Time + return ret, false + } + return *o.LatestFeedTimestamp, true +} + +// HasLatestFeedTimestamp returns a boolean if a field has been set. +func (o *User) HasLatestFeedTimestamp() bool { + if o != nil && o.LatestFeedTimestamp != nil { + return true + } + + return false +} + +// SetLatestFeedTimestamp gets a reference to the given time.Time and assigns it to the LatestFeedTimestamp field. +func (o *User) SetLatestFeedTimestamp(v time.Time) { + o.LatestFeedTimestamp = &v +} + type NullableUser struct { Value User ExplicitNull bool