diff --git a/.gitignore b/.gitignore index 17302c9..7e47a61 100644 --- a/.gitignore +++ b/.gitignore @@ -184,3 +184,5 @@ $RECYCLE.BIN/ # Visual Studio 2014 CTP **/*.sln.ide + +.idea diff --git a/README.md b/README.md index f34fec1..dc5c36f 100644 --- a/README.md +++ b/README.md @@ -250,6 +250,7 @@ Class | Method | HTTP request | Description *IntegrationApi* | [**UpdateCustomerProfileV2**](docs/IntegrationApi.md#updatecustomerprofilev2) | **PUT** /v2/customer_profiles/{integrationId} | Update customer profile *IntegrationApi* | [**UpdateCustomerProfilesV2**](docs/IntegrationApi.md#updatecustomerprofilesv2) | **PUT** /v2/customer_profiles | Update multiple customer profiles *IntegrationApi* | [**UpdateCustomerSessionV2**](docs/IntegrationApi.md#updatecustomersessionv2) | **PUT** /v2/customer_sessions/{customerSessionId} | Update customer session +*ManagementApi* | [**ActivateUserByEmail**](docs/ManagementApi.md#activateuserbyemail) | **POST** /v1/users/activate | Activate user by email address *ManagementApi* | [**AddLoyaltyCardPoints**](docs/ManagementApi.md#addloyaltycardpoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points | Add points to card *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 @@ -304,7 +305,6 @@ Class | Method | HTTP request | Description *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 -*ManagementApi* | [**GetAllRoles**](docs/ManagementApi.md#getallroles) | **GET** /v1/roles | List roles *ManagementApi* | [**GetApplication**](docs/ManagementApi.md#getapplication) | **GET** /v1/applications/{applicationId} | Get Application *ManagementApi* | [**GetApplicationApiHealth**](docs/ManagementApi.md#getapplicationapihealth) | **GET** /v1/applications/{applicationId}/health_report | Get Application health *ManagementApi* | [**GetApplicationCustomer**](docs/ManagementApi.md#getapplicationcustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer @@ -350,7 +350,7 @@ Class | Method | HTTP request | Description *ManagementApi* | [**GetLoyaltyPrograms**](docs/ManagementApi.md#getloyaltyprograms) | **GET** /v1/loyalty_programs | List loyalty programs *ManagementApi* | [**GetLoyaltyStatistics**](docs/ManagementApi.md#getloyaltystatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics *ManagementApi* | [**GetReferralsWithoutTotalCount**](docs/ManagementApi.md#getreferralswithouttotalcount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List referrals -*ManagementApi* | [**GetRole**](docs/ManagementApi.md#getrole) | **GET** /v1/roles/{roleId} | Get role +*ManagementApi* | [**GetRoleV2**](docs/ManagementApi.md#getrolev2) | **GET** /v2/roles/{roleId} | Get role *ManagementApi* | [**GetRuleset**](docs/ManagementApi.md#getruleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset *ManagementApi* | [**GetRulesets**](docs/ManagementApi.md#getrulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List campaign rulesets *ManagementApi* | [**GetStore**](docs/ManagementApi.md#getstore) | **GET** /v1/applications/{applicationId}/stores/{storeId} | Get store @@ -370,8 +370,10 @@ Class | Method | HTTP request | Description *ManagementApi* | [**ImportLoyaltyPoints**](docs/ManagementApi.md#importloyaltypoints) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_points | Import loyalty points *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* | [**InviteUserExternal**](docs/ManagementApi.md#inviteuserexternal) | **POST** /v1/users/invite | Invite user from identity provider *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* | [**ListAllRolesV2**](docs/ManagementApi.md#listallrolesv2) | **GET** /v2/roles | List roles *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 @@ -421,6 +423,7 @@ Class | Method | HTTP request | Description - [Model.Achievement](docs/Achievement.md) - [Model.AchievementAdditionalProperties](docs/AchievementAdditionalProperties.md) - [Model.AchievementProgress](docs/AchievementProgress.md) + - [Model.ActivateUserRequest](docs/ActivateUserRequest.md) - [Model.AddFreeItemEffectProps](docs/AddFreeItemEffectProps.md) - [Model.AddItemCatalogAction](docs/AddItemCatalogAction.md) - [Model.AddLoyaltyPoints](docs/AddLoyaltyPoints.md) @@ -660,6 +663,7 @@ Class | Method | HTTP request | Description - [Model.LoyaltyBalance](docs/LoyaltyBalance.md) - [Model.LoyaltyBalances](docs/LoyaltyBalances.md) - [Model.LoyaltyCard](docs/LoyaltyCard.md) + - [Model.LoyaltyCardBalances](docs/LoyaltyCardBalances.md) - [Model.LoyaltyCardProfileRegistration](docs/LoyaltyCardProfileRegistration.md) - [Model.LoyaltyCardRegistration](docs/LoyaltyCardRegistration.md) - [Model.LoyaltyDashboardData](docs/LoyaltyDashboardData.md) @@ -718,6 +722,7 @@ Class | Method | HTTP request | Description - [Model.NewCustomerSessionV2](docs/NewCustomerSessionV2.md) - [Model.NewEvent](docs/NewEvent.md) - [Model.NewEventType](docs/NewEventType.md) + - [Model.NewExternalInvitation](docs/NewExternalInvitation.md) - [Model.NewGiveawaysPool](docs/NewGiveawaysPool.md) - [Model.NewInternalAudience](docs/NewInternalAudience.md) - [Model.NewInvitation](docs/NewInvitation.md) diff --git a/docs/ActivateUserRequest.md b/docs/ActivateUserRequest.md new file mode 100644 index 0000000..be883d8 --- /dev/null +++ b/docs/ActivateUserRequest.md @@ -0,0 +1,9 @@ +# TalonOne.Model.ActivateUserRequest +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address associated with the user profile. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/Coupon.md b/docs/Coupon.md index 8b3b1f7..90a7a66 100644 --- a/docs/Coupon.md +++ b/docs/Coupon.md @@ -21,9 +21,9 @@ Name | Type | Description | Notes **ReferralId** | **int** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **RecipientIntegrationId** | **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **ImportId** | **int** | The ID of the Import which created this coupon. | [optional] -**Reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**Reservation** | **bool** | Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. | [optional] [default to true] **BatchId** | **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/CustomerInventory.md b/docs/CustomerInventory.md index e3add14..beddbd5 100644 --- a/docs/CustomerInventory.md +++ b/docs/CustomerInventory.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **Profile** | [**CustomerProfile**](CustomerProfile.md) | | [optional] **Loyalty** | [**Loyalty**](Loyalty.md) | | [optional] **Referrals** | [**List<InventoryReferral>**](InventoryReferral.md) | | [optional] -**Coupons** | [**List<InventoryCoupon>**](InventoryCoupon.md) | The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. | [optional] +**Coupons** | [**List<InventoryCoupon>**](InventoryCoupon.md) | The coupons reserved by this profile. This array includes hard and soft reservations. | [optional] **Giveaways** | [**List<Giveaway>**](Giveaway.md) | | [optional] **Achievements** | [**List<AchievementProgress>**](AchievementProgress.md) | | [optional] diff --git a/docs/InlineResponse20044.md b/docs/InlineResponse20044.md index a79db1d..d5104b4 100644 --- a/docs/InlineResponse20044.md +++ b/docs/InlineResponse20044.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | **int** | | -**Data** | [**List<Role>**](Role.md) | | +**Data** | [**List<RoleV2>**](RoleV2.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md index 183a6ff..6fabd5c 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -118,7 +118,7 @@ Name | Type | Description | Notes Create coupon reservation -Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint.

Important

This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation.
To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. +Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. ### Example ```csharp @@ -825,11 +825,11 @@ Name | Type | Description | Notes # **GetLoyaltyBalances** -> LoyaltyBalances GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = null, List subledgerId = null) +> LoyaltyBalances GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = null, string subledgerId = null) Get customer's loyalty points -Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) +Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) ### Example ```csharp @@ -856,7 +856,7 @@ namespace Example var loyaltyProgramId = 56; // int | Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. var integrationId = integrationId_example; // string | The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - 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. (optional) - var subledgerId = new List(); // List | Filter results by one or more subledger IDs. Must be exact match. (optional) + var subledgerId = subledgerId_example; // string | The ID of the subledger by which we filter the data. (optional) try { @@ -882,7 +882,7 @@ Name | Type | Description | Notes **loyaltyProgramId** | **int**| Identifier of the profile-based loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **integrationId** | **string**| The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. | **endDate** | **DateTime?**| Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - 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. | [optional] - **subledgerId** | [**List<string>**](string.md)| Filter results by one or more subledger IDs. Must be exact match. | [optional] + **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] ### Return type @@ -909,7 +909,7 @@ Name | Type | Description | Notes # **GetLoyaltyCardBalances** -> LoyaltyBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = null, List subledgerId = null) +> LoyaltyCardBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = null, List subledgerId = null) Get card's point balances @@ -945,7 +945,7 @@ namespace Example try { // Get card's point balances - LoyaltyBalances result = apiInstance.GetLoyaltyCardBalances(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); + LoyaltyCardBalances result = apiInstance.GetLoyaltyCardBalances(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); Debug.WriteLine(result); } catch (ApiException e) @@ -970,7 +970,7 @@ Name | Type | Description | Notes ### Return type -[**LoyaltyBalances**](LoyaltyBalances.md) +[**LoyaltyCardBalances**](LoyaltyCardBalances.md) ### Authorization @@ -993,7 +993,7 @@ Name | Type | Description | Notes # **GetLoyaltyCardPoints** -> InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = null, string subledgerId = null, int? pageSize = null, int? skip = null) +> InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = null, List subledgerId = null, int? pageSize = null, int? skip = null) List card's unused loyalty points @@ -1024,7 +1024,7 @@ namespace Example var loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. var loyaltyCardId = loyaltyCardId_example; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. var status = status_example; // string | Filter points based on their status. (optional) (default to active) - var subledgerId = subledgerId_example; // string | The ID of the subledger by which we filter the data. (optional) + var subledgerId = new List(); // List | Filter results by one or more subledger IDs. Must be exact match. (optional) var pageSize = 56; // int? | The number of items in the response. (optional) (default to 50) var skip = 56; // int? | The number of items to skip when paging through large result sets. (optional) @@ -1052,7 +1052,7 @@ Name | Type | Description | Notes **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | **status** | **string**| Filter points based on their status. | [optional] [default to active] - **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **subledgerId** | [**List<string>**](string.md)| Filter results by one or more subledger IDs. Must be exact match. | [optional] **pageSize** | **int?**| The number of items in the response. | [optional] [default to 50] **skip** | **int?**| The number of items to skip when paging through large result sets. | [optional] @@ -1081,7 +1081,7 @@ Name | Type | Description | Notes # **GetLoyaltyCardTransactions** -> InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, string subledgerId = null, string loyaltyTransactionType = null, DateTime? startDate = null, DateTime? endDate = null, int? pageSize = null, int? skip = null) +> InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, List subledgerId = null, string loyaltyTransactionType = null, DateTime? startDate = null, DateTime? endDate = null, int? pageSize = null, int? skip = null) List card's transactions @@ -1111,7 +1111,7 @@ namespace Example var apiInstance = new IntegrationApi(config); var loyaltyProgramId = 56; // int | Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. var loyaltyCardId = loyaltyCardId_example; // string | Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. - var subledgerId = subledgerId_example; // string | The ID of the subledger by which we filter the data. (optional) + var subledgerId = new List(); // List | Filter results by one or more subledger IDs. Must be exact match. (optional) var loyaltyTransactionType = loyaltyTransactionType_example; // string | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) var startDate = 2013-10-20T19:20:30+01:00; // DateTime? | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - 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. (optional) var endDate = 2013-10-20T19:20:30+01:00; // DateTime? | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - 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. (optional) @@ -1141,7 +1141,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **loyaltyProgramId** | **int**| Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. | **loyaltyCardId** | **string**| Identifier of the loyalty card. You can get the identifier with the [List loyalty cards](https://docs.talon.one/management-api#tag/Loyalty-cards/operation/getLoyaltyCards) endpoint. | - **subledgerId** | **string**| The ID of the subledger by which we filter the data. | [optional] + **subledgerId** | [**List<string>**](string.md)| Filter results by one or more subledger IDs. Must be exact match. | [optional] **loyaltyTransactionType** | **string**| Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. | [optional] **startDate** | **DateTime?**| Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - 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. | [optional] **endDate** | **DateTime?**| Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - 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. | [optional] @@ -1357,7 +1357,7 @@ Name | Type | Description | Notes List customers that have this coupon reserved -Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. +Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. ### Example ```csharp diff --git a/docs/IntegrationCoupon.md b/docs/IntegrationCoupon.md index aff3556..466e255 100644 --- a/docs/IntegrationCoupon.md +++ b/docs/IntegrationCoupon.md @@ -21,9 +21,9 @@ Name | Type | Description | Notes **ReferralId** | **int** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **RecipientIntegrationId** | **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **ImportId** | **int** | The ID of the Import which created this coupon. | [optional] -**Reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**Reservation** | **bool** | Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. | [optional] [default to true] **BatchId** | **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **ProfileRedemptionCount** | **int** | The number of times the coupon was redeemed by the profile. | diff --git a/docs/InventoryCoupon.md b/docs/InventoryCoupon.md index 1fd5ae6..c5b1391 100644 --- a/docs/InventoryCoupon.md +++ b/docs/InventoryCoupon.md @@ -21,9 +21,9 @@ Name | Type | Description | Notes **ReferralId** | **int** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **RecipientIntegrationId** | **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **ImportId** | **int** | The ID of the Import which created this coupon. | [optional] -**Reservation** | **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**Reservation** | **bool** | Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. | [optional] [default to true] **BatchId** | **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **ProfileRedemptionCount** | **int** | The number of times the coupon was redeemed by the profile. | **State** | **string** | Can be: - `active`: The coupon can be used. It is a reserved coupon that is 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. | diff --git a/docs/LoyaltyCardBalances.md b/docs/LoyaltyCardBalances.md new file mode 100644 index 0000000..9bf0e30 --- /dev/null +++ b/docs/LoyaltyCardBalances.md @@ -0,0 +1,11 @@ +# TalonOne.Model.LoyaltyCardBalances +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Balance** | [**LoyaltyBalance**](LoyaltyBalance.md) | | [optional] +**SubledgerBalances** | [**Dictionary<string, LoyaltyBalance>**](LoyaltyBalance.md) | Map of the loyalty balances of the subledgers of a ledger. | [optional] +**Profiles** | [**List<LoyaltyCardProfileRegistration>**](LoyaltyCardProfileRegistration.md) | Customer profiles linked to the loyalty card. | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/LoyaltyCardProfileRegistration.md b/docs/LoyaltyCardProfileRegistration.md index 3ddeda4..a6adfd0 100644 --- a/docs/LoyaltyCardProfileRegistration.md +++ b/docs/LoyaltyCardProfileRegistration.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IntegrationId** | **string** | Integration ID of the customer profile linked to the card. | -**Timestamp** | **DateTime** | Timestamp of the registration to the card. | +**Timestamp** | **DateTime** | Timestamp the customer profile was linked to the card. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index 0359718..7d41bfc 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://yourbaseurl.talon.one* Method | HTTP request | Description ------------- | ------------- | ------------- +[**ActivateUserByEmail**](ManagementApi.md#activateuserbyemail) | **POST** /v1/users/activate | Activate user by email address [**AddLoyaltyCardPoints**](ManagementApi.md#addloyaltycardpoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/add_points | Add points to card [**AddLoyaltyPoints**](ManagementApi.md#addloyaltypoints) | **PUT** /v1/loyalty_programs/{loyaltyProgramId}/profile/{integrationId}/add_points | Add points to customer profile [**CopyCampaignToApplications**](ManagementApi.md#copycampaigntoapplications) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/copy | Copy the campaign into the specified Application @@ -58,7 +59,6 @@ Method | HTTP request | Description [**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 -[**GetAllRoles**](ManagementApi.md#getallroles) | **GET** /v1/roles | List roles [**GetApplication**](ManagementApi.md#getapplication) | **GET** /v1/applications/{applicationId} | Get Application [**GetApplicationApiHealth**](ManagementApi.md#getapplicationapihealth) | **GET** /v1/applications/{applicationId}/health_report | Get Application health [**GetApplicationCustomer**](ManagementApi.md#getapplicationcustomer) | **GET** /v1/applications/{applicationId}/customers/{customerId} | Get application's customer @@ -104,7 +104,7 @@ Method | HTTP request | Description [**GetLoyaltyPrograms**](ManagementApi.md#getloyaltyprograms) | **GET** /v1/loyalty_programs | List loyalty programs [**GetLoyaltyStatistics**](ManagementApi.md#getloyaltystatistics) | **GET** /v1/loyalty_programs/{loyaltyProgramId}/statistics | Get loyalty program statistics [**GetReferralsWithoutTotalCount**](ManagementApi.md#getreferralswithouttotalcount) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/referrals/no_total | List referrals -[**GetRole**](ManagementApi.md#getrole) | **GET** /v1/roles/{roleId} | Get role +[**GetRoleV2**](ManagementApi.md#getrolev2) | **GET** /v2/roles/{roleId} | Get role [**GetRuleset**](ManagementApi.md#getruleset) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets/{rulesetId} | Get ruleset [**GetRulesets**](ManagementApi.md#getrulesets) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/rulesets | List campaign rulesets [**GetStore**](ManagementApi.md#getstore) | **GET** /v1/applications/{applicationId}/stores/{storeId} | Get store @@ -124,8 +124,10 @@ Method | HTTP request | Description [**ImportLoyaltyPoints**](ManagementApi.md#importloyaltypoints) | **POST** /v1/loyalty_programs/{loyaltyProgramId}/import_points | Import loyalty points [**ImportPoolGiveaways**](ManagementApi.md#importpoolgiveaways) | **POST** /v1/giveaways/pools/{poolId}/import | Import giveaway codes into a giveaway pool [**ImportReferrals**](ManagementApi.md#importreferrals) | **POST** /v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals | Import referrals +[**InviteUserExternal**](ManagementApi.md#inviteuserexternal) | **POST** /v1/users/invite | Invite user from identity provider [**ListAccountCollections**](ManagementApi.md#listaccountcollections) | **GET** /v1/collections | List collections in account [**ListAchievements**](ManagementApi.md#listachievements) | **GET** /v1/applications/{applicationId}/campaigns/{campaignId}/achievements | List achievements +[**ListAllRolesV2**](ManagementApi.md#listallrolesv2) | **GET** /v2/roles | List roles [**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 @@ -154,6 +156,84 @@ Method | HTTP request | Description [**UpdateUser**](ManagementApi.md#updateuser) | **PUT** /v1/users/{userId} | Update user + +# **ActivateUserByEmail** +> void ActivateUserByEmail (ActivateUserRequest body) + +Activate user by email address + +Activate a deactivated user by their email address. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using TalonOne.Api; +using TalonOne.Client; +using TalonOne.Model; + +namespace Example +{ + public class ActivateUserByEmailExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://yourbaseurl.talon.one"; + // Configure API key authorization: management_key + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + // Configure API key authorization: manager_auth + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new ManagementApi(config); + var body = new ActivateUserRequest(); // ActivateUserRequest | body + + try + { + // Activate user by email address + apiInstance.ActivateUserByEmail(body); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ManagementApi.ActivateUserByEmail: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ActivateUserRequest**](ActivateUserRequest.md)| body | + +### Return type + +void (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | No Content | - | + +[[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) + # **AddLoyaltyCardPoints** > void AddLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, AddLoyaltyPoints body) @@ -3043,7 +3123,7 @@ Name | Type | Description | Notes 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. +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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `reservation_counter`: How many times this coupon has been reserved. - `reservation_limitval`: The maximum of number of reservations this coupon can have. - `startdate`: The start date in RFC3339 of the code redemption period. - `value`: The coupon code. ### Example ```csharp @@ -4678,81 +4758,6 @@ Name | Type | Description | Notes [[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) - -# **GetAllRoles** -> InlineResponse20044 GetAllRoles () - -List roles - -List all roles. - -### Example -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using TalonOne.Api; -using TalonOne.Client; -using TalonOne.Model; - -namespace Example -{ - public class GetAllRolesExample - { - public static void Main() - { - Configuration config = new Configuration(); - config.BasePath = "https://yourbaseurl.talon.one"; - // Configure API key authorization: management_key - config.AddApiKey("Authorization", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("Authorization", "Bearer"); - // Configure API key authorization: manager_auth - config.AddApiKey("Authorization", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // config.AddApiKeyPrefix("Authorization", "Bearer"); - - var apiInstance = new ManagementApi(config); - - try - { - // List roles - InlineResponse20044 result = apiInstance.GetAllRoles(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling ManagementApi.GetAllRoles: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**InlineResponse20044**](InlineResponse20044.md) - -### Authorization - -[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | OK | - | - -[[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) - # **GetApplication** > Application GetApplication (int applicationId) @@ -8674,13 +8679,13 @@ Name | Type | Description | Notes [[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) - -# **GetRole** -> Role GetRole (int roleId) + +# **GetRoleV2** +> RoleV2 GetRoleV2 (int roleId) Get role -Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). +Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. ### Example ```csharp @@ -8692,7 +8697,7 @@ using TalonOne.Model; namespace Example { - public class GetRoleExample + public class GetRoleV2Example { public static void Main() { @@ -8708,17 +8713,17 @@ namespace Example // config.AddApiKeyPrefix("Authorization", "Bearer"); var apiInstance = new ManagementApi(config); - var roleId = 56; // int | 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. + var roleId = 56; // int | The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. try { // Get role - Role result = apiInstance.GetRole(roleId); + RoleV2 result = apiInstance.GetRoleV2(roleId); Debug.WriteLine(result); } catch (ApiException e) { - Debug.Print("Exception when calling ManagementApi.GetRole: " + e.Message ); + Debug.Print("Exception when calling ManagementApi.GetRoleV2: " + e.Message ); Debug.Print("Status Code: "+ e.ErrorCode); Debug.Print(e.StackTrace); } @@ -8731,11 +8736,11 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **roleId** | **int**| 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. | + **roleId** | **int**| The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. | ### Return type -[**Role**](Role.md) +[**RoleV2**](RoleV2.md) ### Authorization @@ -9874,7 +9879,7 @@ Name | Type | Description | Notes Import coupons -Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). +Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). ### Example ```csharp @@ -10365,6 +10370,84 @@ Name | Type | Description | Notes [[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) + +# **InviteUserExternal** +> void InviteUserExternal (NewExternalInvitation body) + +Invite user from identity provider + +Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using TalonOne.Api; +using TalonOne.Client; +using TalonOne.Model; + +namespace Example +{ + public class InviteUserExternalExample + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://yourbaseurl.talon.one"; + // Configure API key authorization: management_key + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + // Configure API key authorization: manager_auth + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new ManagementApi(config); + var body = new NewExternalInvitation(); // NewExternalInvitation | body + + try + { + // Invite user from identity provider + apiInstance.InviteUserExternal(body); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ManagementApi.InviteUserExternal: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewExternalInvitation**](NewExternalInvitation.md)| body | + +### Return type + +void (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: Not defined + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **204** | Invitation email sent | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **ListAccountCollections** > InlineResponse20017 ListAccountCollections (int? pageSize = null, int? skip = null, string sort = null, bool? withTotalResultSize = null, string name = null) @@ -10542,6 +10625,81 @@ Name | Type | Description | Notes [[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) + +# **ListAllRolesV2** +> InlineResponse20044 ListAllRolesV2 () + +List roles + +List all roles. + +### Example +```csharp +using System.Collections.Generic; +using System.Diagnostics; +using TalonOne.Api; +using TalonOne.Client; +using TalonOne.Model; + +namespace Example +{ + public class ListAllRolesV2Example + { + public static void Main() + { + Configuration config = new Configuration(); + config.BasePath = "https://yourbaseurl.talon.one"; + // Configure API key authorization: management_key + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + // Configure API key authorization: manager_auth + config.AddApiKey("Authorization", "YOUR_API_KEY"); + // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed + // config.AddApiKeyPrefix("Authorization", "Bearer"); + + var apiInstance = new ManagementApi(config); + + try + { + // List roles + InlineResponse20044 result = apiInstance.ListAllRolesV2(); + Debug.WriteLine(result); + } + catch (ApiException e) + { + Debug.Print("Exception when calling ManagementApi.ListAllRolesV2: " + e.Message ); + Debug.Print("Status Code: "+ e.ErrorCode); + Debug.Print(e.StackTrace); + } + } + } +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**InlineResponse20044**](InlineResponse20044.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | + +[[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) + # **ListCatalogItems** > InlineResponse20035 ListCatalogItems (int catalogId, int? pageSize = null, int? skip = null, bool? withTotalResultSize = null, List sku = null, List productNames = null) @@ -12578,7 +12736,7 @@ namespace Example // config.AddApiKeyPrefix("Authorization", "Bearer"); var apiInstance = new ManagementApi(config); - var roleId = 56; // int | The ID of role. + var roleId = 56; // int | The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. var body = ; // RoleV2Base | body try @@ -12602,7 +12760,7 @@ namespace Example Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **roleId** | **int**| The ID of role. | + **roleId** | **int**| The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. | **body** | **RoleV2Base**| body | ### Return type diff --git a/docs/MessageLogEntry.md b/docs/MessageLogEntry.md index 840d15f..cc65277 100644 --- a/docs/MessageLogEntry.md +++ b/docs/MessageLogEntry.md @@ -12,8 +12,7 @@ Name | Type | Description | Notes **Request** | [**MessageLogRequest**](MessageLogRequest.md) | | [optional] **Response** | [**MessageLogResponse**](MessageLogResponse.md) | | [optional] **CreatedAt** | **DateTime** | Timestamp when the log entry was created. | -**EntityType** | **string** | The entity type the log is related to. | [optional] -**Url** | **string** | The target URL of the request. | [optional] +**EntityType** | **string** | The entity type the notification is related to. | [optional] **ApplicationId** | **int** | Identifier of the Application. | [optional] **LoyaltyProgramId** | **int** | Identifier of the loyalty program. | [optional] diff --git a/docs/NewCoupons.md b/docs/NewCoupons.md index 600f9f2..153cd90 100644 --- a/docs/NewCoupons.md +++ b/docs/NewCoupons.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **RecipientIntegrationId** | **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **ValidCharacters** | **List<string>** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] **CouponPattern** | **string** | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [optional] -**IsReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NewExternalInvitation.md b/docs/NewExternalInvitation.md new file mode 100644 index 0000000..987ee45 --- /dev/null +++ b/docs/NewExternalInvitation.md @@ -0,0 +1,12 @@ +# TalonOne.Model.NewExternalInvitation +Parameters for inviting a new user from an external identity provider. +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the user. | [optional] +**UserGroups** | **List<string>** | List of user groups in the external identity provider. If there are roles in Talon.One whose names match these user groups, those roles will be automatically assigned to the user upon invitation. | [optional] +**Email** | **string** | Email address of the user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/docs/UpdateCoupon.md b/docs/UpdateCoupon.md index 201996f..db23959 100644 --- a/docs/UpdateCoupon.md +++ b/docs/UpdateCoupon.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **Limits** | [**List<LimitConfig>**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **RecipientIntegrationId** | **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **Attributes** | [**Object**](.md) | Arbitrary properties associated with this item. | [optional] -**IsReservationMandatory** | **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UpdateUser.md b/docs/UpdateUser.md index 13f09b0..d42808a 100644 --- a/docs/UpdateUser.md +++ b/docs/UpdateUser.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **State** | **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** | **bool** | Indicates whether the user is an `admin`. | [optional] **Policy** | **string** | Indicates the access level of the user. | [optional] -**Roles** | **List<int>** | 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] +**Roles** | **List<int>** | A list of the IDs of the roles assigned to the user. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. | [optional] **ApplicationNotificationSubscriptions** | [**Object**](.md) | Application notifications that the user is subscribed to. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/src/TalonOne.Test/Api/IntegrationApiTests.cs b/src/TalonOne.Test/Api/IntegrationApiTests.cs index f398b2a..bd295c4 100644 --- a/src/TalonOne.Test/Api/IntegrationApiTests.cs +++ b/src/TalonOne.Test/Api/IntegrationApiTests.cs @@ -194,7 +194,7 @@ public void GetLoyaltyBalancesTest() //int loyaltyProgramId = null; //string integrationId = null; //DateTime? endDate = null; - //List subledgerId = null; + //string subledgerId = null; //var response = instance.GetLoyaltyBalances(loyaltyProgramId, integrationId, endDate, subledgerId); //Assert.IsType (response, "response is LoyaltyBalances"); } @@ -211,7 +211,7 @@ public void GetLoyaltyCardBalancesTest() //DateTime? endDate = null; //List subledgerId = null; //var response = instance.GetLoyaltyCardBalances(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); - //Assert.IsType (response, "response is LoyaltyBalances"); + //Assert.IsType (response, "response is LoyaltyCardBalances"); } /// @@ -224,7 +224,7 @@ public void GetLoyaltyCardPointsTest() //int loyaltyProgramId = null; //string loyaltyCardId = null; //string status = null; - //string subledgerId = null; + //List subledgerId = null; //int? pageSize = null; //int? skip = null; //var response = instance.GetLoyaltyCardPoints(loyaltyProgramId, loyaltyCardId, status, subledgerId, pageSize, skip); @@ -240,7 +240,7 @@ public void GetLoyaltyCardTransactionsTest() // TODO uncomment below to test the method and replace null with proper value //int loyaltyProgramId = null; //string loyaltyCardId = null; - //string subledgerId = null; + //List subledgerId = null; //string loyaltyTransactionType = null; //DateTime? startDate = null; //DateTime? endDate = null; diff --git a/src/TalonOne.Test/Api/ManagementApiTests.cs b/src/TalonOne.Test/Api/ManagementApiTests.cs index 8a3e6cd..2fadc98 100644 --- a/src/TalonOne.Test/Api/ManagementApiTests.cs +++ b/src/TalonOne.Test/Api/ManagementApiTests.cs @@ -55,6 +55,18 @@ public void InstanceTest() } + /// + /// Test ActivateUserByEmail + /// + [Fact] + public void ActivateUserByEmailTest() + { + // TODO uncomment below to test the method and replace null with proper value + //ActivateUserRequest body = null; + //instance.ActivateUserByEmail(body); + + } + /// /// Test AddLoyaltyCardPoints /// @@ -817,17 +829,6 @@ public void GetAllAccessLogsTest() //Assert.IsType (response, "response is InlineResponse20020"); } - /// - /// Test GetAllRoles - /// - [Fact] - public void GetAllRolesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetAllRoles(); - //Assert.IsType (response, "response is InlineResponse20044"); - } - /// /// Test GetApplication /// @@ -1545,15 +1546,15 @@ public void GetReferralsWithoutTotalCountTest() } /// - /// Test GetRole + /// Test GetRoleV2 /// [Fact] - public void GetRoleTest() + public void GetRoleV2Test() { // TODO uncomment below to test the method and replace null with proper value //int roleId = null; - //var response = instance.GetRole(roleId); - //Assert.IsType (response, "response is Role"); + //var response = instance.GetRoleV2(roleId); + //Assert.IsType (response, "response is RoleV2"); } /// @@ -1832,6 +1833,18 @@ public void ImportReferralsTest() //Assert.IsType (response, "response is Import"); } + /// + /// Test InviteUserExternal + /// + [Fact] + public void InviteUserExternalTest() + { + // TODO uncomment below to test the method and replace null with proper value + //NewExternalInvitation body = null; + //instance.InviteUserExternal(body); + + } + /// /// Test ListAccountCollections /// @@ -1864,6 +1877,17 @@ public void ListAchievementsTest() //Assert.IsType (response, "response is InlineResponse20046"); } + /// + /// Test ListAllRolesV2 + /// + [Fact] + public void ListAllRolesV2Test() + { + // TODO uncomment below to test the method and replace null with proper value + //var response = instance.ListAllRolesV2(); + //Assert.IsType (response, "response is InlineResponse20044"); + } + /// /// Test ListCatalogItems /// diff --git a/src/TalonOne.Test/Model/ActivateUserRequestTests.cs b/src/TalonOne.Test/Model/ActivateUserRequestTests.cs new file mode 100644 index 0000000..8f58e00 --- /dev/null +++ b/src/TalonOne.Test/Model/ActivateUserRequestTests.cs @@ -0,0 +1,71 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * + * Contact: devs@talon.one + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using TalonOne.Api; +using TalonOne.Model; +using TalonOne.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace TalonOne.Test +{ + /// + /// Class for testing ActivateUserRequest + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class ActivateUserRequestTests : IDisposable + { + // TODO uncomment below to declare an instance variable for ActivateUserRequest + //private ActivateUserRequest instance; + + public ActivateUserRequestTests() + { + // TODO uncomment below to create an instance of ActivateUserRequest + //instance = new ActivateUserRequest(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of ActivateUserRequest + /// + [Fact] + public void ActivateUserRequestInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" ActivateUserRequest + //Assert.IsInstanceOfType (instance, "variable 'instance' is a ActivateUserRequest"); + } + + + /// + /// Test the property 'Email' + /// + [Fact] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/TalonOne.Test/Model/LoyaltyCardBalancesTests.cs b/src/TalonOne.Test/Model/LoyaltyCardBalancesTests.cs new file mode 100644 index 0000000..63abf86 --- /dev/null +++ b/src/TalonOne.Test/Model/LoyaltyCardBalancesTests.cs @@ -0,0 +1,87 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * + * Contact: devs@talon.one + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using TalonOne.Api; +using TalonOne.Model; +using TalonOne.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace TalonOne.Test +{ + /// + /// Class for testing LoyaltyCardBalances + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class LoyaltyCardBalancesTests : IDisposable + { + // TODO uncomment below to declare an instance variable for LoyaltyCardBalances + //private LoyaltyCardBalances instance; + + public LoyaltyCardBalancesTests() + { + // TODO uncomment below to create an instance of LoyaltyCardBalances + //instance = new LoyaltyCardBalances(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of LoyaltyCardBalances + /// + [Fact] + public void LoyaltyCardBalancesInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" LoyaltyCardBalances + //Assert.IsInstanceOfType (instance, "variable 'instance' is a LoyaltyCardBalances"); + } + + + /// + /// Test the property 'Balance' + /// + [Fact] + public void BalanceTest() + { + // TODO unit test for the property 'Balance' + } + /// + /// Test the property 'SubledgerBalances' + /// + [Fact] + public void SubledgerBalancesTest() + { + // TODO unit test for the property 'SubledgerBalances' + } + /// + /// Test the property 'Profiles' + /// + [Fact] + public void ProfilesTest() + { + // TODO unit test for the property 'Profiles' + } + + } + +} diff --git a/src/TalonOne.Test/Model/MessageLogEntryTests.cs b/src/TalonOne.Test/Model/MessageLogEntryTests.cs index 4920c8c..6884be5 100644 --- a/src/TalonOne.Test/Model/MessageLogEntryTests.cs +++ b/src/TalonOne.Test/Model/MessageLogEntryTests.cs @@ -130,14 +130,6 @@ public void EntityTypeTest() // TODO unit test for the property 'EntityType' } /// - /// Test the property 'Url' - /// - [Fact] - public void UrlTest() - { - // TODO unit test for the property 'Url' - } - /// /// Test the property 'ApplicationId' /// [Fact] diff --git a/src/TalonOne.Test/Model/NewExternalInvitationTests.cs b/src/TalonOne.Test/Model/NewExternalInvitationTests.cs new file mode 100644 index 0000000..ea80ec8 --- /dev/null +++ b/src/TalonOne.Test/Model/NewExternalInvitationTests.cs @@ -0,0 +1,87 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * + * Contact: devs@talon.one + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Xunit; + +using System; +using System.Linq; +using System.IO; +using System.Collections.Generic; +using TalonOne.Api; +using TalonOne.Model; +using TalonOne.Client; +using System.Reflection; +using Newtonsoft.Json; + +namespace TalonOne.Test +{ + /// + /// Class for testing NewExternalInvitation + /// + /// + /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). + /// Please update the test case below to test the model. + /// + public class NewExternalInvitationTests : IDisposable + { + // TODO uncomment below to declare an instance variable for NewExternalInvitation + //private NewExternalInvitation instance; + + public NewExternalInvitationTests() + { + // TODO uncomment below to create an instance of NewExternalInvitation + //instance = new NewExternalInvitation(); + } + + public void Dispose() + { + // Cleanup when everything is done. + } + + /// + /// Test an instance of NewExternalInvitation + /// + [Fact] + public void NewExternalInvitationInstanceTest() + { + // TODO uncomment below to test "IsInstanceOfType" NewExternalInvitation + //Assert.IsInstanceOfType (instance, "variable 'instance' is a NewExternalInvitation"); + } + + + /// + /// Test the property 'Name' + /// + [Fact] + public void NameTest() + { + // TODO unit test for the property 'Name' + } + /// + /// Test the property 'UserGroups' + /// + [Fact] + public void UserGroupsTest() + { + // TODO unit test for the property 'UserGroups' + } + /// + /// Test the property 'Email' + /// + [Fact] + public void EmailTest() + { + // TODO unit test for the property 'Email' + } + + } + +} diff --git a/src/TalonOne/Api/IntegrationApi.cs b/src/TalonOne/Api/IntegrationApi.cs index 41d299b..7554dfe 100644 --- a/src/TalonOne/Api/IntegrationApi.cs +++ b/src/TalonOne/Api/IntegrationApi.cs @@ -54,7 +54,7 @@ public interface IIntegrationApiSync : IApiAccessor /// Create coupon reservation /// /// - /// Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -66,7 +66,7 @@ public interface IIntegrationApiSync : IApiAccessor /// Create coupon reservation /// /// - /// Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -261,29 +261,29 @@ public interface IIntegrationApiSync : IApiAccessor /// Get customer's loyalty points /// /// - /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// LoyaltyBalances - LoyaltyBalances GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + LoyaltyBalances GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)); /// /// Get customer's loyalty points /// /// - /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// ApiResponse of LoyaltyBalances - ApiResponse GetLoyaltyBalancesWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + ApiResponse GetLoyaltyBalancesWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)); /// /// Get card's point balances /// @@ -295,8 +295,8 @@ public interface IIntegrationApiSync : IApiAccessor /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// LoyaltyBalances - LoyaltyBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + /// LoyaltyCardBalances + LoyaltyCardBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); /// /// Get card's point balances @@ -309,8 +309,8 @@ public interface IIntegrationApiSync : IApiAccessor /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// ApiResponse of LoyaltyBalances - ApiResponse GetLoyaltyCardBalancesWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + /// ApiResponse of LoyaltyCardBalances + ApiResponse GetLoyaltyCardBalancesWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); /// /// List card's unused loyalty points /// @@ -321,11 +321,11 @@ public interface IIntegrationApiSync : IApiAccessor /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// InlineResponse2003 - InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)); + InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)); /// /// List card's unused loyalty points @@ -337,11 +337,11 @@ public interface IIntegrationApiSync : IApiAccessor /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// ApiResponse of InlineResponse2003 - ApiResponse GetLoyaltyCardPointsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)); + ApiResponse GetLoyaltyCardPointsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)); /// /// List card's transactions /// @@ -351,14 +351,14 @@ public interface IIntegrationApiSync : IApiAccessor /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// InlineResponse2001 - InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); + InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); /// /// List card's transactions @@ -369,14 +369,14 @@ public interface IIntegrationApiSync : IApiAccessor /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// ApiResponse of InlineResponse2001 - ApiResponse GetLoyaltyCardTransactionsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); + ApiResponse GetLoyaltyCardTransactionsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); /// /// List customer's unused loyalty points /// @@ -447,7 +447,7 @@ public interface IIntegrationApiSync : IApiAccessor /// List customers that have this coupon reserved /// /// - /// Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -458,7 +458,7 @@ public interface IIntegrationApiSync : IApiAccessor /// List customers that have this coupon reserved /// /// - /// Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -761,7 +761,7 @@ public interface IIntegrationApiAsync : IApiAccessor /// Create coupon reservation /// /// - /// Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -773,7 +773,7 @@ public interface IIntegrationApiAsync : IApiAccessor /// Create coupon reservation /// /// - /// Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -968,29 +968,29 @@ public interface IIntegrationApiAsync : IApiAccessor /// Get customer's loyalty points /// /// - /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// Task of LoyaltyBalances - System.Threading.Tasks.Task GetLoyaltyBalancesAsync (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + System.Threading.Tasks.Task GetLoyaltyBalancesAsync (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)); /// /// Get customer's loyalty points /// /// - /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// Task of ApiResponse (LoyaltyBalances) - System.Threading.Tasks.Task> GetLoyaltyBalancesAsyncWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + System.Threading.Tasks.Task> GetLoyaltyBalancesAsyncWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)); /// /// Get card's point balances /// @@ -1002,8 +1002,8 @@ public interface IIntegrationApiAsync : IApiAccessor /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// Task of LoyaltyBalances - System.Threading.Tasks.Task GetLoyaltyCardBalancesAsync (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + /// Task of LoyaltyCardBalances + System.Threading.Tasks.Task GetLoyaltyCardBalancesAsync (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); /// /// Get card's point balances @@ -1016,8 +1016,8 @@ public interface IIntegrationApiAsync : IApiAccessor /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// Task of ApiResponse (LoyaltyBalances) - System.Threading.Tasks.Task> GetLoyaltyCardBalancesAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); + /// Task of ApiResponse (LoyaltyCardBalances) + System.Threading.Tasks.Task> GetLoyaltyCardBalancesAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)); /// /// List card's unused loyalty points /// @@ -1028,11 +1028,11 @@ public interface IIntegrationApiAsync : IApiAccessor /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// Task of InlineResponse2003 - System.Threading.Tasks.Task GetLoyaltyCardPointsAsync (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)); + System.Threading.Tasks.Task GetLoyaltyCardPointsAsync (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)); /// /// List card's unused loyalty points @@ -1044,11 +1044,11 @@ public interface IIntegrationApiAsync : IApiAccessor /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// Task of ApiResponse (InlineResponse2003) - System.Threading.Tasks.Task> GetLoyaltyCardPointsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)); + System.Threading.Tasks.Task> GetLoyaltyCardPointsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)); /// /// List card's transactions /// @@ -1058,14 +1058,14 @@ public interface IIntegrationApiAsync : IApiAccessor /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// Task of InlineResponse2001 - System.Threading.Tasks.Task GetLoyaltyCardTransactionsAsync (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); + System.Threading.Tasks.Task GetLoyaltyCardTransactionsAsync (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); /// /// List card's transactions @@ -1076,14 +1076,14 @@ public interface IIntegrationApiAsync : IApiAccessor /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// Task of ApiResponse (InlineResponse2001) - System.Threading.Tasks.Task> GetLoyaltyCardTransactionsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); + System.Threading.Tasks.Task> GetLoyaltyCardTransactionsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)); /// /// List customer's unused loyalty points /// @@ -1154,7 +1154,7 @@ public interface IIntegrationApiAsync : IApiAccessor /// List customers that have this coupon reserved /// /// - /// Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -1165,7 +1165,7 @@ public interface IIntegrationApiAsync : IApiAccessor /// List customers that have this coupon reserved /// /// - /// Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -1692,7 +1692,7 @@ public async System.Threading.Tasks.Task CreateAudienceV2Async (NewAud } /// - /// Create coupon reservation Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create coupon reservation Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -1705,7 +1705,7 @@ public Coupon CreateCouponReservation (string couponValue, CouponReservations bo } /// - /// Create coupon reservation Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create coupon reservation Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -1766,7 +1766,7 @@ public TalonOne.Client.ApiResponse< Coupon > CreateCouponReservationWithHttpInfo } /// - /// Create coupon reservation Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create coupon reservation Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -1780,7 +1780,7 @@ public async System.Threading.Tasks.Task CreateCouponReservationAsync (s } /// - /// Create coupon reservation Create a coupon reservation for specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). Reserving a coupon allows you to associate a coupon code to a given customer(s). You can then list the reserved coupons of a given customer with the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. If a coupon gets created for a specific user, it will automatically appear in their coupons. When a user redeems a coupon, a reservation is automatically created after the redemption and the used coupon will be returned in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. For example, you can use this endpoint and `List customer data` to create a _coupon wallet_ by reserving coupon codes for a customer, and then displaying their coupon wallet when they visit your store. If the **Coupon visibility** checkbox was selected when [creating a universal code](https://docs.talon.one/docs/product/campaigns/coupons/creating-coupons#generating-a-universal-code), the coupon code is implicitly reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. <div class=\"redoc-section\"> <p class=\"title\">Important</p> This endpoint creates a **soft** reservation. _Any_ customer can use a reserved coupon code and proceed to checkout. To create a hard reservation, you can: - use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or, - use the [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint setting the `recipientsIntegrationId` property or, - create a coupon code with the **Reservation mandatory** option then use the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). This endpoint overrides the reservation limit set for the coupon code during coupon creation. </div> To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. + /// Create coupon reservation Create a coupon reservation for the specified customer profiles on the specified coupon. You can also create a reservation via the Campaign Manager using the [Create coupon code reservation effect](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - If the **Reservation mandatory** option was selected when creating the specified coupon, the endpoint creates a **hard** reservation, meaning only users who have this coupon code reserved can redeem it. Otherwise, the endpoint creates a **soft** reservation, meaning the coupon will be associated with the specified customer profiles (they show up when using the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint), but any user can redeem it. This can be useful, for example, to display a _coupon wallet_ for customers when they visit your store. - If the **Coupon visibility** option was selected when creating the specified coupon, the coupon code is implicitly soft-reserved for all customers, and the code will be returned for all customer profiles in the [List customer data](https://docs.talon.one/integration-api#operation/getCustomerInventory) endpoint. To delete a reservation, use the [Delete reservation](https://docs.talon.one/integration-api#tag/Coupons/operation/deleteCouponReservation) endpoint. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -3003,30 +3003,30 @@ public async System.Threading.Tasks.Task Get } /// - /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// LoyaltyBalances - public LoyaltyBalances GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + public LoyaltyBalances GetLoyaltyBalances (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)) { TalonOne.Client.ApiResponse localVarResponse = GetLoyaltyBalancesWithHttpInfo(loyaltyProgramId, integrationId, endDate, subledgerId); return localVarResponse.Data; } /// - /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// ApiResponse of LoyaltyBalances - public TalonOne.Client.ApiResponse< LoyaltyBalances > GetLoyaltyBalancesWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + public TalonOne.Client.ApiResponse< LoyaltyBalances > GetLoyaltyBalancesWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)) { // verify the required parameter 'integrationId' is set if (integrationId == null) @@ -3056,7 +3056,7 @@ public async System.Threading.Tasks.Task Get } if (subledgerId != null) { - localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("csv", "subledgerId", subledgerId)); + localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("", "subledgerId", subledgerId)); } // authentication (api_key_v1) required @@ -3084,15 +3084,15 @@ public async System.Threading.Tasks.Task Get } /// - /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// Task of LoyaltyBalances - public async System.Threading.Tasks.Task GetLoyaltyBalancesAsync (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + public async System.Threading.Tasks.Task GetLoyaltyBalancesAsync (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)) { TalonOne.Client.ApiResponse localVarResponse = await GetLoyaltyBalancesAsyncWithHttpInfo(loyaltyProgramId, integrationId, endDate, subledgerId); return localVarResponse.Data; @@ -3100,15 +3100,15 @@ public async System.Threading.Tasks.Task Get } /// - /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) + /// Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. You can filter balances by date and subledger ID. **Note**: If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. Loyalty balances are calculated when Talon.One receives your request using the points stored in our database, so retrieving a large number of balances at once can impact performance. For more information, see: - [Managing card-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/card-based/managing-loyalty-cards) - [Managing profile-based loyalty program data](https://docs.talon.one/docs/product/loyalty-programs/profile-based/managing-pb-lp-data) /// /// Thrown when fails to make API call /// 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. /// The integration identifier for this customer profile. Must be: - Unique within the deployment. - Stable for the customer. Do not use an ID that the customer can update themselves. For example, you can use a database ID. Once set, you cannot update this identifier. /// 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. (optional) - /// Filter results by one or more subledger IDs. Must be exact match. (optional) + /// The ID of the subledger by which we filter the data. (optional) /// Task of ApiResponse (LoyaltyBalances) - public async System.Threading.Tasks.Task> GetLoyaltyBalancesAsyncWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + public async System.Threading.Tasks.Task> GetLoyaltyBalancesAsyncWithHttpInfo (int loyaltyProgramId, string integrationId, DateTime? endDate = default(DateTime?), string subledgerId = default(string)) { // verify the required parameter 'integrationId' is set if (integrationId == null) @@ -3139,7 +3139,7 @@ public async System.Threading.Tasks.Task Get } if (subledgerId != null) { - localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("csv", "subledgerId", subledgerId)); + localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("", "subledgerId", subledgerId)); } // authentication (api_key_v1) required @@ -3175,10 +3175,10 @@ public async System.Threading.Tasks.Task Get /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// LoyaltyBalances - public LoyaltyBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + /// LoyaltyCardBalances + public LoyaltyCardBalances GetLoyaltyCardBalances (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) { - TalonOne.Client.ApiResponse localVarResponse = GetLoyaltyCardBalancesWithHttpInfo(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); + TalonOne.Client.ApiResponse localVarResponse = GetLoyaltyCardBalancesWithHttpInfo(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); return localVarResponse.Data; } @@ -3190,8 +3190,8 @@ public async System.Threading.Tasks.Task Get /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// ApiResponse of LoyaltyBalances - public TalonOne.Client.ApiResponse< LoyaltyBalances > GetLoyaltyCardBalancesWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + /// ApiResponse of LoyaltyCardBalances + public TalonOne.Client.ApiResponse< LoyaltyCardBalances > GetLoyaltyCardBalancesWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) { // verify the required parameter 'loyaltyCardId' is set if (loyaltyCardId == null) @@ -3236,7 +3236,7 @@ public async System.Threading.Tasks.Task Get } // make the HTTP request - var localVarResponse = this.Client.Get< LoyaltyBalances >("/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get< LoyaltyCardBalances >("/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) @@ -3256,10 +3256,10 @@ public async System.Threading.Tasks.Task Get /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// Task of LoyaltyBalances - public async System.Threading.Tasks.Task GetLoyaltyCardBalancesAsync (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + /// Task of LoyaltyCardBalances + public async System.Threading.Tasks.Task GetLoyaltyCardBalancesAsync (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) { - TalonOne.Client.ApiResponse localVarResponse = await GetLoyaltyCardBalancesAsyncWithHttpInfo(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); + TalonOne.Client.ApiResponse localVarResponse = await GetLoyaltyCardBalancesAsyncWithHttpInfo(loyaltyProgramId, loyaltyCardId, endDate, subledgerId); return localVarResponse.Data; } @@ -3272,8 +3272,8 @@ public async System.Threading.Tasks.Task Get /// 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. /// 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. (optional) /// Filter results by one or more subledger IDs. Must be exact match. (optional) - /// Task of ApiResponse (LoyaltyBalances) - public async System.Threading.Tasks.Task> GetLoyaltyCardBalancesAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) + /// Task of ApiResponse (LoyaltyCardBalances) + public async System.Threading.Tasks.Task> GetLoyaltyCardBalancesAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, DateTime? endDate = default(DateTime?), List subledgerId = default(List)) { // verify the required parameter 'loyaltyCardId' is set if (loyaltyCardId == null) @@ -3320,7 +3320,7 @@ public async System.Threading.Tasks.Task Get // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances", localVarRequestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/loyalty_programs/{loyaltyProgramId}/cards/{loyaltyCardId}/balances", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) @@ -3339,11 +3339,11 @@ public async System.Threading.Tasks.Task Get /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// InlineResponse2003 - public InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)) + public InlineResponse2003 GetLoyaltyCardPoints (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)) { TalonOne.Client.ApiResponse localVarResponse = GetLoyaltyCardPointsWithHttpInfo(loyaltyProgramId, loyaltyCardId, status, subledgerId, pageSize, skip); return localVarResponse.Data; @@ -3356,11 +3356,11 @@ public async System.Threading.Tasks.Task Get /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// ApiResponse of InlineResponse2003 - public TalonOne.Client.ApiResponse< InlineResponse2003 > GetLoyaltyCardPointsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)) + public TalonOne.Client.ApiResponse< InlineResponse2003 > GetLoyaltyCardPointsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)) { // verify the required parameter 'loyaltyCardId' is set if (loyaltyCardId == null) @@ -3390,7 +3390,7 @@ public async System.Threading.Tasks.Task Get } if (subledgerId != null) { - localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("", "subledgerId", subledgerId)); + localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("csv", "subledgerId", subledgerId)); } if (pageSize != null) { @@ -3432,11 +3432,11 @@ public async System.Threading.Tasks.Task Get /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// Task of InlineResponse2003 - public async System.Threading.Tasks.Task GetLoyaltyCardPointsAsync (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)) + public async System.Threading.Tasks.Task GetLoyaltyCardPointsAsync (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)) { TalonOne.Client.ApiResponse localVarResponse = await GetLoyaltyCardPointsAsyncWithHttpInfo(loyaltyProgramId, loyaltyCardId, status, subledgerId, pageSize, skip); return localVarResponse.Data; @@ -3450,11 +3450,11 @@ public async System.Threading.Tasks.Task Get /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. /// Filter points based on their status. (optional, default to active) - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// The number of items in the response. (optional, default to 50) /// The number of items to skip when paging through large result sets. (optional) /// Task of ApiResponse (InlineResponse2003) - public async System.Threading.Tasks.Task> GetLoyaltyCardPointsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), string subledgerId = default(string), int? pageSize = default(int?), int? skip = default(int?)) + public async System.Threading.Tasks.Task> GetLoyaltyCardPointsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string status = default(string), List subledgerId = default(List), int? pageSize = default(int?), int? skip = default(int?)) { // verify the required parameter 'loyaltyCardId' is set if (loyaltyCardId == null) @@ -3485,7 +3485,7 @@ public async System.Threading.Tasks.Task Get } if (subledgerId != null) { - localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("", "subledgerId", subledgerId)); + localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("csv", "subledgerId", subledgerId)); } if (pageSize != null) { @@ -3527,14 +3527,14 @@ public async System.Threading.Tasks.Task Get /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// InlineResponse2001 - public InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) + public InlineResponse2001 GetLoyaltyCardTransactions (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) { TalonOne.Client.ApiResponse localVarResponse = GetLoyaltyCardTransactionsWithHttpInfo(loyaltyProgramId, loyaltyCardId, subledgerId, loyaltyTransactionType, startDate, endDate, pageSize, skip); return localVarResponse.Data; @@ -3546,14 +3546,14 @@ public async System.Threading.Tasks.Task Get /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// ApiResponse of InlineResponse2001 - public TalonOne.Client.ApiResponse< InlineResponse2001 > GetLoyaltyCardTransactionsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) + public TalonOne.Client.ApiResponse< InlineResponse2001 > GetLoyaltyCardTransactionsWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) { // verify the required parameter 'loyaltyCardId' is set if (loyaltyCardId == null) @@ -3579,7 +3579,7 @@ public async System.Threading.Tasks.Task Get localVarRequestOptions.PathParameters.Add("loyaltyCardId", TalonOne.Client.ClientUtils.ParameterToString(loyaltyCardId)); // path parameter if (subledgerId != null) { - localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("", "subledgerId", subledgerId)); + localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("csv", "subledgerId", subledgerId)); } if (loyaltyTransactionType != null) { @@ -3632,14 +3632,14 @@ public async System.Threading.Tasks.Task Get /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// Task of InlineResponse2001 - public async System.Threading.Tasks.Task GetLoyaltyCardTransactionsAsync (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) + public async System.Threading.Tasks.Task GetLoyaltyCardTransactionsAsync (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) { TalonOne.Client.ApiResponse localVarResponse = await GetLoyaltyCardTransactionsAsyncWithHttpInfo(loyaltyProgramId, loyaltyCardId, subledgerId, loyaltyTransactionType, startDate, endDate, pageSize, skip); return localVarResponse.Data; @@ -3652,14 +3652,14 @@ public async System.Threading.Tasks.Task Get /// Thrown when fails to make API call /// Identifier of the card-based loyalty program containing the loyalty card. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) endpoint. /// 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. - /// The ID of the subledger by which we filter the data. (optional) + /// Filter results by one or more subledger IDs. Must be exact match. (optional) /// Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. (optional) /// 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. (optional) /// 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. (optional) /// The number of items in the response. (optional, default to 1000) /// The number of items to skip when paging through large result sets. (optional) /// Task of ApiResponse (InlineResponse2001) - public async System.Threading.Tasks.Task> GetLoyaltyCardTransactionsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, string subledgerId = default(string), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) + public async System.Threading.Tasks.Task> GetLoyaltyCardTransactionsAsyncWithHttpInfo (int loyaltyProgramId, string loyaltyCardId, List subledgerId = default(List), string loyaltyTransactionType = default(string), DateTime? startDate = default(DateTime?), DateTime? endDate = default(DateTime?), int? pageSize = default(int?), int? skip = default(int?)) { // verify the required parameter 'loyaltyCardId' is set if (loyaltyCardId == null) @@ -3686,7 +3686,7 @@ public async System.Threading.Tasks.Task Get localVarRequestOptions.PathParameters.Add("loyaltyCardId", TalonOne.Client.ClientUtils.ParameterToString(loyaltyCardId)); // path parameter if (subledgerId != null) { - localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("", "subledgerId", subledgerId)); + localVarRequestOptions.QueryParameters.Add(TalonOne.Client.ClientUtils.ParameterToMultiMap("csv", "subledgerId", subledgerId)); } if (loyaltyTransactionType != null) { @@ -4137,7 +4137,7 @@ public async System.Threading.Tasks.Task Get } /// - /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -4149,7 +4149,7 @@ public InlineResponse200 GetReservedCustomers (string couponValue) } /// - /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -4203,7 +4203,7 @@ public TalonOne.Client.ApiResponse< InlineResponse200 > GetReservedCustomersWith } /// - /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. @@ -4216,7 +4216,7 @@ public async System.Threading.Tasks.Task GetReservedCustomers } /// - /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. Coupons are reserved in the following ways: - To create a soft reservation (any customer can use the coupon), use the [Create coupon reservation](#operation/createCouponReservation) endpoint. - To create a hard reservation (only the given customer can use the coupon), create a coupon in the Campaign Manager for a given `recipientIntegrationId` or use the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoints. + /// List customers that have this coupon reserved Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. /// /// Thrown when fails to make API call /// The code of the coupon. diff --git a/src/TalonOne/Api/ManagementApi.cs b/src/TalonOne/Api/ManagementApi.cs index 39db45a..f16f52d 100644 --- a/src/TalonOne/Api/ManagementApi.cs +++ b/src/TalonOne/Api/ManagementApi.cs @@ -30,6 +30,27 @@ public interface IManagementApiSync : IApiAccessor { #region Synchronous Operations /// + /// Activate user by email address + /// + /// + /// Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// + void ActivateUserByEmail (ActivateUserRequest body); + + /// + /// Activate user by email address + /// + /// + /// Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// ApiResponse of Object(void) + ApiResponse ActivateUserByEmailWithHttpInfo (ActivateUserRequest body); + /// /// Add points to card /// /// @@ -868,7 +889,7 @@ public interface IManagementApiSync : IApiAccessor /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -893,7 +914,7 @@ public interface IManagementApiSync : IApiAccessor /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -1392,25 +1413,6 @@ public interface IManagementApiSync : IApiAccessor /// ApiResponse of InlineResponse20020 ApiResponse GetAllAccessLogsWithHttpInfo (DateTime? rangeStart = default(DateTime?), DateTime? rangeEnd = default(DateTime?), string path = default(string), string method = default(string), string status = default(string), int? pageSize = default(int?), int? skip = default(int?), string sort = default(string)); /// - /// List roles - /// - /// - /// List all roles. - /// - /// Thrown when fails to make API call - /// InlineResponse20044 - InlineResponse20044 GetAllRoles (); - - /// - /// List roles - /// - /// - /// List all roles. - /// - /// Thrown when fails to make API call - /// ApiResponse of InlineResponse20044 - ApiResponse GetAllRolesWithHttpInfo (); - /// /// Get Application /// /// @@ -2711,23 +2713,23 @@ public interface IManagementApiSync : IApiAccessor /// Get role /// /// - /// Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// Role - Role GetRole (int roleId); + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// RoleV2 + RoleV2 GetRoleV2 (int roleId); /// /// Get role /// /// - /// Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// ApiResponse of Role - ApiResponse GetRoleWithHttpInfo (int roleId); + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// ApiResponse of RoleV2 + ApiResponse GetRoleV2WithHttpInfo (int roleId); /// /// Get ruleset /// @@ -3083,7 +3085,7 @@ public interface IManagementApiSync : IApiAccessor /// Import coupons /// /// - /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -3097,7 +3099,7 @@ public interface IManagementApiSync : IApiAccessor /// Import coupons /// /// - /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -3224,6 +3226,27 @@ public interface IManagementApiSync : IApiAccessor /// ApiResponse of Import ApiResponse ImportReferralsWithHttpInfo (int applicationId, int campaignId, string upFile = default(string)); /// + /// Invite user from identity provider + /// + /// + /// Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + /// + /// Thrown when fails to make API call + /// body + /// + void InviteUserExternal (NewExternalInvitation body); + + /// + /// Invite user from identity provider + /// + /// + /// Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + /// + /// Thrown when fails to make API call + /// body + /// ApiResponse of Object(void) + ApiResponse InviteUserExternalWithHttpInfo (NewExternalInvitation body); + /// /// List collections in account /// /// @@ -3282,6 +3305,25 @@ public interface IManagementApiSync : IApiAccessor /// ApiResponse of InlineResponse20046 ApiResponse ListAchievementsWithHttpInfo (int applicationId, int campaignId, int? pageSize = default(int?), int? skip = default(int?), string title = default(string)); /// + /// List roles + /// + /// + /// List all roles. + /// + /// Thrown when fails to make API call + /// InlineResponse20044 + InlineResponse20044 ListAllRolesV2 (); + + /// + /// List roles + /// + /// + /// List all roles. + /// + /// Thrown when fails to make API call + /// ApiResponse of InlineResponse20044 + ApiResponse ListAllRolesV2WithHttpInfo (); + /// /// List items in a catalog /// /// @@ -3933,7 +3975,7 @@ public interface IManagementApiSync : IApiAccessor /// Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// RoleV2 RoleV2 UpdateRoleV2 (int roleId, RoleV2Base body); @@ -3945,7 +3987,7 @@ public interface IManagementApiSync : IApiAccessor /// Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// ApiResponse of RoleV2 ApiResponse UpdateRoleV2WithHttpInfo (int roleId, RoleV2Base body); @@ -4007,6 +4049,27 @@ public interface IManagementApiAsync : IApiAccessor { #region Asynchronous Operations /// + /// Activate user by email address + /// + /// + /// Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// Task of void + System.Threading.Tasks.Task ActivateUserByEmailAsync (ActivateUserRequest body); + + /// + /// Activate user by email address + /// + /// + /// Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// Task of ApiResponse + System.Threading.Tasks.Task> ActivateUserByEmailAsyncWithHttpInfo (ActivateUserRequest body); + /// /// Add points to card /// /// @@ -4845,7 +4908,7 @@ public interface IManagementApiAsync : IApiAccessor /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -4870,7 +4933,7 @@ public interface IManagementApiAsync : IApiAccessor /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -5369,25 +5432,6 @@ public interface IManagementApiAsync : IApiAccessor /// Task of ApiResponse (InlineResponse20020) System.Threading.Tasks.Task> GetAllAccessLogsAsyncWithHttpInfo (DateTime? rangeStart = default(DateTime?), DateTime? rangeEnd = default(DateTime?), string path = default(string), string method = default(string), string status = default(string), int? pageSize = default(int?), int? skip = default(int?), string sort = default(string)); /// - /// List roles - /// - /// - /// List all roles. - /// - /// Thrown when fails to make API call - /// Task of InlineResponse20044 - System.Threading.Tasks.Task GetAllRolesAsync (); - - /// - /// List roles - /// - /// - /// List all roles. - /// - /// Thrown when fails to make API call - /// Task of ApiResponse (InlineResponse20044) - System.Threading.Tasks.Task> GetAllRolesAsyncWithHttpInfo (); - /// /// Get Application /// /// @@ -6688,23 +6732,23 @@ public interface IManagementApiAsync : IApiAccessor /// Get role /// /// - /// Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// Task of Role - System.Threading.Tasks.Task GetRoleAsync (int roleId); + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// Task of RoleV2 + System.Threading.Tasks.Task GetRoleV2Async (int roleId); /// /// Get role /// /// - /// Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// Task of ApiResponse (Role) - System.Threading.Tasks.Task> GetRoleAsyncWithHttpInfo (int roleId); + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// Task of ApiResponse (RoleV2) + System.Threading.Tasks.Task> GetRoleV2AsyncWithHttpInfo (int roleId); /// /// Get ruleset /// @@ -7060,7 +7104,7 @@ public interface IManagementApiAsync : IApiAccessor /// Import coupons /// /// - /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -7074,7 +7118,7 @@ public interface IManagementApiAsync : IApiAccessor /// Import coupons /// /// - /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -7201,6 +7245,27 @@ public interface IManagementApiAsync : IApiAccessor /// Task of ApiResponse (Import) System.Threading.Tasks.Task> ImportReferralsAsyncWithHttpInfo (int applicationId, int campaignId, string upFile = default(string)); /// + /// Invite user from identity provider + /// + /// + /// Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + /// + /// Thrown when fails to make API call + /// body + /// Task of void + System.Threading.Tasks.Task InviteUserExternalAsync (NewExternalInvitation body); + + /// + /// Invite user from identity provider + /// + /// + /// Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + /// + /// Thrown when fails to make API call + /// body + /// Task of ApiResponse + System.Threading.Tasks.Task> InviteUserExternalAsyncWithHttpInfo (NewExternalInvitation body); + /// /// List collections in account /// /// @@ -7259,6 +7324,25 @@ public interface IManagementApiAsync : IApiAccessor /// Task of ApiResponse (InlineResponse20046) System.Threading.Tasks.Task> ListAchievementsAsyncWithHttpInfo (int applicationId, int campaignId, int? pageSize = default(int?), int? skip = default(int?), string title = default(string)); /// + /// List roles + /// + /// + /// List all roles. + /// + /// Thrown when fails to make API call + /// Task of InlineResponse20044 + System.Threading.Tasks.Task ListAllRolesV2Async (); + + /// + /// List roles + /// + /// + /// List all roles. + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (InlineResponse20044) + System.Threading.Tasks.Task> ListAllRolesV2AsyncWithHttpInfo (); + /// /// List items in a catalog /// /// @@ -7910,7 +7994,7 @@ public interface IManagementApiAsync : IApiAccessor /// Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// Task of RoleV2 System.Threading.Tasks.Task UpdateRoleV2Async (int roleId, RoleV2Base body); @@ -7922,7 +8006,7 @@ public interface IManagementApiAsync : IApiAccessor /// Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// Task of ApiResponse (RoleV2) System.Threading.Tasks.Task> UpdateRoleV2AsyncWithHttpInfo (int roleId, RoleV2Base body); @@ -8094,6 +8178,159 @@ public TalonOne.Client.ExceptionFactory ExceptionFactory set { _exceptionFactory = value; } } + /// + /// Activate user by email address Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// + public void ActivateUserByEmail (ActivateUserRequest body) + { + ActivateUserByEmailWithHttpInfo(body); + } + + /// + /// Activate user by email address Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// ApiResponse of Object(void) + public TalonOne.Client.ApiResponse ActivateUserByEmailWithHttpInfo (ActivateUserRequest body) + { + // verify the required parameter 'body' is set + if (body == null) + throw new TalonOne.Client.ApiException(400, "Missing required parameter 'body' when calling ManagementApi->ActivateUserByEmail"); + + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + var localVarContentType = TalonOne.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = TalonOne.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.Data = body; + + // authentication (management_key) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (manager_auth) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post("/v1/users/activate", localVarRequestOptions, this.Configuration); + + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ActivateUserByEmail", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Activate user by email address Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// Task of void + public async System.Threading.Tasks.Task ActivateUserByEmailAsync (ActivateUserRequest body) + { + await ActivateUserByEmailAsyncWithHttpInfo(body); + + } + + /// + /// Activate user by email address Activate a deactivated user by their email address. + /// + /// Thrown when fails to make API call + /// body + /// Task of ApiResponse + public async System.Threading.Tasks.Task> ActivateUserByEmailAsyncWithHttpInfo (ActivateUserRequest body) + { + // verify the required parameter 'body' is set + if (body == null) + throw new TalonOne.Client.ApiException(400, "Missing required parameter 'body' when calling ManagementApi->ActivateUserByEmail"); + + + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "application/json" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + }; + + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); + + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); + + localVarRequestOptions.Data = body; + + // authentication (management_key) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (manager_auth) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/users/activate", localVarRequestOptions, this.Configuration); + + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ActivateUserByEmail", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + /// /// Add points to card Add points to the given loyalty card in the specified card-based loyalty program. /// @@ -13846,7 +14083,7 @@ public async System.Threading.Tasks.Task ExportCollectionItemsAsync (int } /// - /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -13872,7 +14109,7 @@ public async System.Threading.Tasks.Task ExportCollectionItemsAsync (int } /// - /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -14002,7 +14239,7 @@ public async System.Threading.Tasks.Task ExportCollectionItemsAsync (int } /// - /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -14029,7 +14266,7 @@ public async System.Threading.Tasks.Task ExportCollectionItemsAsync (int } /// - /// 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. + /// 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 recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `referralid`: The ID of the referral code that triggered the creation of this coupon (create coupon effect). - `reservation`: Whether the coupon can be reserved for multiple customers. - `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. /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -17406,147 +17643,6 @@ public async System.Threading.Tasks.Task GetAdditionalCos return localVarResponse; } - /// - /// List roles List all roles. - /// - /// Thrown when fails to make API call - /// InlineResponse20044 - public InlineResponse20044 GetAllRoles () - { - TalonOne.Client.ApiResponse localVarResponse = GetAllRolesWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// List roles List all roles. - /// - /// Thrown when fails to make API call - /// ApiResponse of InlineResponse20044 - public TalonOne.Client.ApiResponse< InlineResponse20044 > GetAllRolesWithHttpInfo () - { - TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); - - String[] _contentTypes = new String[] { - }; - - // to determine the Accept header - String[] _accepts = new String[] { - "application/json" - }; - - var localVarContentType = TalonOne.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - - var localVarAccept = TalonOne.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - - - // authentication (management_key) required - if ( - !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( - !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || - localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 - ) - ) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); - } - // authentication (manager_auth) required - if ( - !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( - !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || - localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 - ) - ) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); - } - - // make the HTTP request - var localVarResponse = this.Client.Get< InlineResponse20044 >("/v1/roles", localVarRequestOptions, this.Configuration); - - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAllRoles", localVarResponse); - if (_exception != null) throw _exception; - } - - return localVarResponse; - } - - /// - /// List roles List all roles. - /// - /// Thrown when fails to make API call - /// Task of InlineResponse20044 - public async System.Threading.Tasks.Task GetAllRolesAsync () - { - TalonOne.Client.ApiResponse localVarResponse = await GetAllRolesAsyncWithHttpInfo(); - return localVarResponse.Data; - - } - - /// - /// List roles List all roles. - /// - /// Thrown when fails to make API call - /// Task of ApiResponse (InlineResponse20044) - public async System.Threading.Tasks.Task> GetAllRolesAsyncWithHttpInfo () - { - - TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); - - String[] _contentTypes = new String[] { - }; - - // to determine the Accept header - String[] _accepts = new String[] { - "application/json" - }; - - foreach (var _contentType in _contentTypes) - localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); - - foreach (var _accept in _accepts) - localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - - - // authentication (management_key) required - if ( - !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( - !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || - localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 - ) - ) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); - } - // authentication (manager_auth) required - if ( - !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( - !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || - localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 - ) - ) - { - localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); - } - - // make the HTTP request - - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/roles", localVarRequestOptions, this.Configuration); - - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetAllRoles", localVarResponse); - if (_exception != null) throw _exception; - } - - return localVarResponse; - } - /// /// Get Application Get the application specified by the ID. /// @@ -26283,24 +26379,24 @@ public async System.Threading.Tasks.Task GetLoyaltyStatist } /// - /// Get role Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get role Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// Role - public Role GetRole (int roleId) + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// RoleV2 + public RoleV2 GetRoleV2 (int roleId) { - TalonOne.Client.ApiResponse localVarResponse = GetRoleWithHttpInfo(roleId); + TalonOne.Client.ApiResponse localVarResponse = GetRoleV2WithHttpInfo(roleId); return localVarResponse.Data; } /// - /// Get role Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get role Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// ApiResponse of Role - public TalonOne.Client.ApiResponse< Role > GetRoleWithHttpInfo (int roleId) + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// ApiResponse of RoleV2 + public TalonOne.Client.ApiResponse< RoleV2 > GetRoleV2WithHttpInfo (int roleId) { TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); @@ -26342,12 +26438,12 @@ public TalonOne.Client.ApiResponse< Role > GetRoleWithHttpInfo (int roleId) } // make the HTTP request - var localVarResponse = this.Client.Get< Role >("/v1/roles/{roleId}", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Get< RoleV2 >("/v2/roles/{roleId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetRole", localVarResponse); + Exception _exception = this.ExceptionFactory("GetRoleV2", localVarResponse); if (_exception != null) throw _exception; } @@ -26355,25 +26451,25 @@ public TalonOne.Client.ApiResponse< Role > GetRoleWithHttpInfo (int roleId) } /// - /// Get role Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get role Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// Task of Role - public async System.Threading.Tasks.Task GetRoleAsync (int roleId) + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// Task of RoleV2 + public async System.Threading.Tasks.Task GetRoleV2Async (int roleId) { - TalonOne.Client.ApiResponse localVarResponse = await GetRoleAsyncWithHttpInfo(roleId); + TalonOne.Client.ApiResponse localVarResponse = await GetRoleV2AsyncWithHttpInfo(roleId); return localVarResponse.Data; } /// - /// Get role Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). + /// Get role Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// /// Thrown when fails to make API call - /// 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. - /// Task of ApiResponse (Role) - public async System.Threading.Tasks.Task> GetRoleAsyncWithHttpInfo (int roleId) + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + /// Task of ApiResponse (RoleV2) + public async System.Threading.Tasks.Task> GetRoleV2AsyncWithHttpInfo (int roleId) { TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); @@ -26417,12 +26513,12 @@ public async System.Threading.Tasks.Task GetRoleAsync (int roleId) // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/roles/{roleId}", localVarRequestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.GetAsync("/v2/roles/{roleId}", localVarRequestOptions, this.Configuration); if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("GetRole", localVarResponse); + Exception _exception = this.ExceptionFactory("GetRoleV2", localVarResponse); if (_exception != null) throw _exception; } @@ -28861,7 +28957,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -28876,7 +28972,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -28955,7 +29051,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -28971,7 +29067,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the customer who receives the coupon. Only the customer with this integration ID can redeem the corresponding coupon code. Learn about [coupon reservation](https://docs.talon.one/docs/product/rules/effects/using-effects#reserving-a-coupon-code). - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). + /// Import coupons Upload a CSV file containing the coupons that should be created. The file should be sent as multipart data. The CSV file contains the following columns: - `value` (required): The coupon code. - `expirydate`: The end date in RFC3339 of the code redemption period. - `startdate`: The start date in RFC3339 of the code redemption period. - `recipientintegrationid`: The integration ID of the recipient of the coupon. Only the customer with this integration ID can redeem this code. Available only for personal codes. - `limitval`: The maximum number of redemptions of this code. For unlimited redemptions, use `0`. Defaults to `1` when not provided. - `discountlimit`: The total discount value that the code can give. This is typically used to represent a gift card value. - `attributes`: A JSON object describing _custom_ coupon attribute names and their values, enclosed with double quotation marks. For example, if you created a [custom attribute](https://docs.talon.one/docs/dev/concepts/attributes#custom-attributes) called `category` associated with the coupon entity, the object in the CSV file, when opened in a text editor, must be: `\"{\"category\": \"10_off\"}\"`. You can use the time zone of your choice. It is converted to UTC internally by Talon.One. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text \"value\",\"expirydate\",\"startdate\",\"recipientintegrationid\",\"limitval\",\"attributes\",\"discountlimit\" COUP1,2018-07-01T04:00:00Z,2018-05-01T04:00:00Z,cust123,1,\"{\"\"Category\"\": \"\"10_off\"\"}\",2.4 ``` Once imported, you can find the `batchId` in the Campaign Manager or by using [List coupons](#tag/Coupons/operation/getCouponsWithoutTotalCount). /// /// Thrown when fails to make API call /// The ID of the Application. It is displayed in your Talon.One deployment URL. @@ -29553,7 +29649,180 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/loyalty_programs/{loyaltyProgramId}/import_points", localVarRequestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/loyalty_programs/{loyaltyProgramId}/import_points", localVarRequestOptions, this.Configuration); + + if (upFileStream != null) + { + upFileStream.Close(); + upFileStream.Dispose(); + } + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ImportLoyaltyPoints", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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 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:** ```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\"\"}\" ``` + /// + /// Thrown when fails to make API call + /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The file containing the data that is being imported. (optional) + /// Import + public Import ImportPoolGiveaways (int poolId, string upFile = default(string)) + { + TalonOne.Client.ApiResponse localVarResponse = ImportPoolGiveawaysWithHttpInfo(poolId, upFile); + return localVarResponse.Data; + } + + /// + /// 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 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:** ```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\"\"}\" ``` + /// + /// Thrown when fails to make API call + /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The file containing the data that is being imported. (optional) + /// ApiResponse of Import + public TalonOne.Client.ApiResponse< Import > ImportPoolGiveawaysWithHttpInfo (int poolId, string upFile = default(string)) + { + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "multipart/form-data" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = TalonOne.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = TalonOne.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("poolId", TalonOne.Client.ClientUtils.ParameterToString(poolId)); // path parameter + MemoryStream upFileStream = TalonOne.Client.ClientUtils.ParameterToStream(upFile); + if (upFile != null) + { + localVarRequestOptions.FileParameters.Add("upFile", upFileStream); // file parameter + } + + // authentication (management_key) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (manager_auth) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Post< Import >("/v1/giveaways/pools/{poolId}/import", localVarRequestOptions, this.Configuration); + + if (upFileStream != null) + { + upFileStream.Close(); + upFileStream.Dispose(); + } + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ImportPoolGiveaways", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// 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 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:** ```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\"\"}\" ``` + /// + /// Thrown when fails to make API call + /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The file containing the data that is being imported. (optional) + /// Task of Import + public async System.Threading.Tasks.Task ImportPoolGiveawaysAsync (int poolId, string upFile = default(string)) + { + TalonOne.Client.ApiResponse localVarResponse = await ImportPoolGiveawaysAsyncWithHttpInfo(poolId, upFile); + return localVarResponse.Data; + + } + + /// + /// 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 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:** ```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\"\"}\" ``` + /// + /// Thrown when fails to make API call + /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The file containing the data that is being imported. (optional) + /// Task of ApiResponse (Import) + public async System.Threading.Tasks.Task> ImportPoolGiveawaysAsyncWithHttpInfo (int poolId, string upFile = default(string)) + { + + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + "multipart/form-data" + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); + + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); + + localVarRequestOptions.PathParameters.Add("poolId", TalonOne.Client.ClientUtils.ParameterToString(poolId)); // path parameter + MemoryStream upFileStream = TalonOne.Client.ClientUtils.ParameterToStream(upFile); + if (upFile != null) + { + localVarRequestOptions.FileParameters.Add("upFile", upFileStream); // file parameter + } + + // authentication (management_key) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (manager_auth) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/giveaways/pools/{poolId}/import", localVarRequestOptions, this.Configuration); if (upFileStream != null) { @@ -29563,7 +29832,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ImportLoyaltyPoints", localVarResponse); + Exception _exception = this.ExceptionFactory("ImportPoolGiveaways", localVarResponse); if (_exception != null) throw _exception; } @@ -29571,26 +29840,28 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// 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 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:** ```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\"\"}\" ``` + /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` /// /// Thrown when fails to make API call - /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The ID of the Application. It is displayed in your Talon.One deployment URL. + /// The ID of the campaign. It is displayed in your Talon.One deployment URL. /// The file containing the data that is being imported. (optional) /// Import - public Import ImportPoolGiveaways (int poolId, string upFile = default(string)) + public Import ImportReferrals (int applicationId, int campaignId, string upFile = default(string)) { - TalonOne.Client.ApiResponse localVarResponse = ImportPoolGiveawaysWithHttpInfo(poolId, upFile); + TalonOne.Client.ApiResponse localVarResponse = ImportReferralsWithHttpInfo(applicationId, campaignId, upFile); return localVarResponse.Data; } /// - /// 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 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:** ```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\"\"}\" ``` + /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` /// /// Thrown when fails to make API call - /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The ID of the Application. It is displayed in your Talon.One deployment URL. + /// The ID of the campaign. It is displayed in your Talon.One deployment URL. /// The file containing the data that is being imported. (optional) /// ApiResponse of Import - public TalonOne.Client.ApiResponse< Import > ImportPoolGiveawaysWithHttpInfo (int poolId, string upFile = default(string)) + public TalonOne.Client.ApiResponse< Import > ImportReferralsWithHttpInfo (int applicationId, int campaignId, string upFile = default(string)) { TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); @@ -29609,7 +29880,8 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId var localVarAccept = TalonOne.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.PathParameters.Add("poolId", TalonOne.Client.ClientUtils.ParameterToString(poolId)); // path parameter + localVarRequestOptions.PathParameters.Add("applicationId", TalonOne.Client.ClientUtils.ParameterToString(applicationId)); // path parameter + localVarRequestOptions.PathParameters.Add("campaignId", TalonOne.Client.ClientUtils.ParameterToString(campaignId)); // path parameter MemoryStream upFileStream = TalonOne.Client.ClientUtils.ParameterToStream(upFile); if (upFile != null) { @@ -29638,7 +29910,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } // make the HTTP request - var localVarResponse = this.Client.Post< Import >("/v1/giveaways/pools/{poolId}/import", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post< Import >("/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals", localVarRequestOptions, this.Configuration); if (upFileStream != null) { @@ -29648,7 +29920,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ImportPoolGiveaways", localVarResponse); + Exception _exception = this.ExceptionFactory("ImportReferrals", localVarResponse); if (_exception != null) throw _exception; } @@ -29656,27 +29928,29 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// 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 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:** ```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\"\"}\" ``` + /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` /// /// Thrown when fails to make API call - /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The ID of the Application. It is displayed in your Talon.One deployment URL. + /// The ID of the campaign. It is displayed in your Talon.One deployment URL. /// The file containing the data that is being imported. (optional) /// Task of Import - public async System.Threading.Tasks.Task ImportPoolGiveawaysAsync (int poolId, string upFile = default(string)) + public async System.Threading.Tasks.Task ImportReferralsAsync (int applicationId, int campaignId, string upFile = default(string)) { - TalonOne.Client.ApiResponse localVarResponse = await ImportPoolGiveawaysAsyncWithHttpInfo(poolId, upFile); + TalonOne.Client.ApiResponse localVarResponse = await ImportReferralsAsyncWithHttpInfo(applicationId, campaignId, upFile); return localVarResponse.Data; } /// - /// 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 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:** ```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\"\"}\" ``` + /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` /// /// Thrown when fails to make API call - /// The ID of the pool. You can find it in the Campaign Manager, in the **Giveaways** section. + /// The ID of the Application. It is displayed in your Talon.One deployment URL. + /// The ID of the campaign. It is displayed in your Talon.One deployment URL. /// The file containing the data that is being imported. (optional) /// Task of ApiResponse (Import) - public async System.Threading.Tasks.Task> ImportPoolGiveawaysAsyncWithHttpInfo (int poolId, string upFile = default(string)) + public async System.Threading.Tasks.Task> ImportReferralsAsyncWithHttpInfo (int applicationId, int campaignId, string upFile = default(string)) { TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); @@ -29696,7 +29970,8 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - localVarRequestOptions.PathParameters.Add("poolId", TalonOne.Client.ClientUtils.ParameterToString(poolId)); // path parameter + localVarRequestOptions.PathParameters.Add("applicationId", TalonOne.Client.ClientUtils.ParameterToString(applicationId)); // path parameter + localVarRequestOptions.PathParameters.Add("campaignId", TalonOne.Client.ClientUtils.ParameterToString(campaignId)); // path parameter MemoryStream upFileStream = TalonOne.Client.ClientUtils.ParameterToStream(upFile); if (upFile != null) { @@ -29726,7 +30001,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/giveaways/pools/{poolId}/import", localVarRequestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals", localVarRequestOptions, this.Configuration); if (upFileStream != null) { @@ -29736,7 +30011,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ImportPoolGiveaways", localVarResponse); + Exception _exception = this.ExceptionFactory("ImportReferrals", localVarResponse); if (_exception != null) throw _exception; } @@ -29744,38 +30019,36 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + /// Invite user from identity provider Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. /// /// Thrown when fails to make API call - /// The ID of the Application. It is displayed in your Talon.One deployment URL. - /// The ID of the campaign. It is displayed in your Talon.One deployment URL. - /// The file containing the data that is being imported. (optional) - /// Import - public Import ImportReferrals (int applicationId, int campaignId, string upFile = default(string)) + /// body + /// + public void InviteUserExternal (NewExternalInvitation body) { - TalonOne.Client.ApiResponse localVarResponse = ImportReferralsWithHttpInfo(applicationId, campaignId, upFile); - return localVarResponse.Data; + InviteUserExternalWithHttpInfo(body); } /// - /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + /// Invite user from identity provider Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. /// /// Thrown when fails to make API call - /// The ID of the Application. It is displayed in your Talon.One deployment URL. - /// The ID of the campaign. It is displayed in your Talon.One deployment URL. - /// The file containing the data that is being imported. (optional) - /// ApiResponse of Import - public TalonOne.Client.ApiResponse< Import > ImportReferralsWithHttpInfo (int applicationId, int campaignId, string upFile = default(string)) + /// body + /// ApiResponse of Object(void) + public TalonOne.Client.ApiResponse InviteUserExternalWithHttpInfo (NewExternalInvitation body) { + // verify the required parameter 'body' is set + if (body == null) + throw new TalonOne.Client.ApiException(400, "Missing required parameter 'body' when calling ManagementApi->InviteUserExternal"); + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); String[] _contentTypes = new String[] { - "multipart/form-data" + "application/json" }; // to determine the Accept header String[] _accepts = new String[] { - "application/json" }; var localVarContentType = TalonOne.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -29784,13 +30057,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId var localVarAccept = TalonOne.Client.ClientUtils.SelectHeaderAccept(_accepts); if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - localVarRequestOptions.PathParameters.Add("applicationId", TalonOne.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", TalonOne.Client.ClientUtils.ParameterToString(campaignId)); // path parameter - MemoryStream upFileStream = TalonOne.Client.ClientUtils.ParameterToStream(upFile); - if (upFile != null) - { - localVarRequestOptions.FileParameters.Add("upFile", upFileStream); // file parameter - } + localVarRequestOptions.Data = body; // authentication (management_key) required if ( @@ -29814,17 +30081,12 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } // make the HTTP request - var localVarResponse = this.Client.Post< Import >("/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals", localVarRequestOptions, this.Configuration); + var localVarResponse = this.Client.Post("/v1/users/invite", localVarRequestOptions, this.Configuration); - if (upFileStream != null) - { - upFileStream.Close(); - upFileStream.Dispose(); - } if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ImportReferrals", localVarResponse); + Exception _exception = this.ExceptionFactory("InviteUserExternal", localVarResponse); if (_exception != null) throw _exception; } @@ -29832,40 +30094,38 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId } /// - /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + /// Invite user from identity provider Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. /// /// Thrown when fails to make API call - /// The ID of the Application. It is displayed in your Talon.One deployment URL. - /// The ID of the campaign. It is displayed in your Talon.One deployment URL. - /// The file containing the data that is being imported. (optional) - /// Task of Import - public async System.Threading.Tasks.Task ImportReferralsAsync (int applicationId, int campaignId, string upFile = default(string)) + /// body + /// Task of void + public async System.Threading.Tasks.Task InviteUserExternalAsync (NewExternalInvitation body) { - TalonOne.Client.ApiResponse localVarResponse = await ImportReferralsAsyncWithHttpInfo(applicationId, campaignId, upFile); - return localVarResponse.Data; + await InviteUserExternalAsyncWithHttpInfo(body); } /// - /// 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. **Important:** When you import a CSV file with referrals, a [customer profile](https://docs.talon.one/docs/dev/concepts/entities/customer-profiles) is **not** automatically created for each `advocateprofileintegrationid` column value. Use the [Update customer profile](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfileV2) endpoint or the [Update multiple customer profiles](https://docs.talon.one/integration-api#tag/Customer-profiles/operation/updateCustomerProfilesV2) endpoint to create the customer profiles. **Note:** We recommend limiting your file size to 500MB. **Example:** ```text code,startdate,expirydate,advocateprofileintegrationid,limitval,attributes REFERRAL_CODE1,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid_4,1,\"{\"\"my_attribute\"\": \"\"10_off\"\"}\" REFERRAL_CODE2,2020-11-10T23:00:00Z,2021-11-11T23:00:00Z,integid1,1,\"{\"\"my_attribute\"\": \"\"20_off\"\"}\" ``` + /// Invite user from identity provider Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. /// /// Thrown when fails to make API call - /// The ID of the Application. It is displayed in your Talon.One deployment URL. - /// The ID of the campaign. It is displayed in your Talon.One deployment URL. - /// The file containing the data that is being imported. (optional) - /// Task of ApiResponse (Import) - public async System.Threading.Tasks.Task> ImportReferralsAsyncWithHttpInfo (int applicationId, int campaignId, string upFile = default(string)) + /// body + /// Task of ApiResponse + public async System.Threading.Tasks.Task> InviteUserExternalAsyncWithHttpInfo (NewExternalInvitation body) { + // verify the required parameter 'body' is set + if (body == null) + throw new TalonOne.Client.ApiException(400, "Missing required parameter 'body' when calling ManagementApi->InviteUserExternal"); + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); String[] _contentTypes = new String[] { - "multipart/form-data" + "application/json" }; // to determine the Accept header String[] _accepts = new String[] { - "application/json" }; foreach (var _contentType in _contentTypes) @@ -29874,13 +30134,7 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId foreach (var _accept in _accepts) localVarRequestOptions.HeaderParameters.Add("Accept", _accept); - localVarRequestOptions.PathParameters.Add("applicationId", TalonOne.Client.ClientUtils.ParameterToString(applicationId)); // path parameter - localVarRequestOptions.PathParameters.Add("campaignId", TalonOne.Client.ClientUtils.ParameterToString(campaignId)); // path parameter - MemoryStream upFileStream = TalonOne.Client.ClientUtils.ParameterToStream(upFile); - if (upFile != null) - { - localVarRequestOptions.FileParameters.Add("upFile", upFileStream); // file parameter - } + localVarRequestOptions.Data = body; // authentication (management_key) required if ( @@ -29905,17 +30159,12 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/applications/{applicationId}/campaigns/{campaignId}/import_referrals", localVarRequestOptions, this.Configuration); + var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/users/invite", localVarRequestOptions, this.Configuration); - if (upFileStream != null) - { - upFileStream.Close(); - upFileStream.Dispose(); - } if (this.ExceptionFactory != null) { - Exception _exception = this.ExceptionFactory("ImportReferrals", localVarResponse); + Exception _exception = this.ExceptionFactory("InviteUserExternal", localVarResponse); if (_exception != null) throw _exception; } @@ -30312,6 +30561,147 @@ public async System.Threading.Tasks.Task GetWebhookAsync (int webhookId return localVarResponse; } + /// + /// List roles List all roles. + /// + /// Thrown when fails to make API call + /// InlineResponse20044 + public InlineResponse20044 ListAllRolesV2 () + { + TalonOne.Client.ApiResponse localVarResponse = ListAllRolesV2WithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// List roles List all roles. + /// + /// Thrown when fails to make API call + /// ApiResponse of InlineResponse20044 + public TalonOne.Client.ApiResponse< InlineResponse20044 > ListAllRolesV2WithHttpInfo () + { + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + var localVarContentType = TalonOne.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = TalonOne.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + + // authentication (management_key) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (manager_auth) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + var localVarResponse = this.Client.Get< InlineResponse20044 >("/v2/roles", localVarRequestOptions, this.Configuration); + + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListAllRolesV2", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// List roles List all roles. + /// + /// Thrown when fails to make API call + /// Task of InlineResponse20044 + public async System.Threading.Tasks.Task ListAllRolesV2Async () + { + TalonOne.Client.ApiResponse localVarResponse = await ListAllRolesV2AsyncWithHttpInfo(); + return localVarResponse.Data; + + } + + /// + /// List roles List all roles. + /// + /// Thrown when fails to make API call + /// Task of ApiResponse (InlineResponse20044) + public async System.Threading.Tasks.Task> ListAllRolesV2AsyncWithHttpInfo () + { + + TalonOne.Client.RequestOptions localVarRequestOptions = new TalonOne.Client.RequestOptions(); + + String[] _contentTypes = new String[] { + }; + + // to determine the Accept header + String[] _accepts = new String[] { + "application/json" + }; + + foreach (var _contentType in _contentTypes) + localVarRequestOptions.HeaderParameters.Add("Content-Type", _contentType); + + foreach (var _accept in _accepts) + localVarRequestOptions.HeaderParameters.Add("Accept", _accept); + + + // authentication (management_key) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + // authentication (manager_auth) required + if ( + !String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("Authorization")) && ( + !localVarRequestOptions.HeaderParameters.ContainsKey("Authorization") || + localVarRequestOptions.HeaderParameters["Authorization"].Count == 0 + ) + ) + { + localVarRequestOptions.HeaderParameters.Add("Authorization", this.Configuration.GetApiKeyWithPrefix("Authorization")); + } + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/v2/roles", localVarRequestOptions, this.Configuration); + + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ListAllRolesV2", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + /// /// List items in a catalog Return a paginated list of cart items in the given catalog. /// @@ -34697,7 +35087,7 @@ public async System.Threading.Tasks.Task UpdateReferralAsync (int appl /// Update role Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// RoleV2 public RoleV2 UpdateRoleV2 (int roleId, RoleV2Base body) @@ -34710,7 +35100,7 @@ public RoleV2 UpdateRoleV2 (int roleId, RoleV2Base body) /// Update role Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// ApiResponse of RoleV2 public TalonOne.Client.ApiResponse< RoleV2 > UpdateRoleV2WithHttpInfo (int roleId, RoleV2Base body) @@ -34777,7 +35167,7 @@ public TalonOne.Client.ApiResponse< RoleV2 > UpdateRoleV2WithHttpInfo (int roleI /// Update role Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// Task of RoleV2 public async System.Threading.Tasks.Task UpdateRoleV2Async (int roleId, RoleV2Base body) @@ -34791,7 +35181,7 @@ public async System.Threading.Tasks.Task UpdateRoleV2Async (int roleId, /// Update role Update a specific role. /// /// Thrown when fails to make API call - /// The ID of role. + /// The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// body /// Task of ApiResponse (RoleV2) public async System.Threading.Tasks.Task> UpdateRoleV2AsyncWithHttpInfo (int roleId, RoleV2Base body) diff --git a/src/TalonOne/Model/ActivateUserRequest.cs b/src/TalonOne/Model/ActivateUserRequest.cs new file mode 100644 index 0000000..195a25e --- /dev/null +++ b/src/TalonOne/Model/ActivateUserRequest.cs @@ -0,0 +1,132 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * + * Contact: devs@talon.one + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = TalonOne.Client.OpenAPIDateConverter; + +namespace TalonOne.Model +{ + /// + /// ActivateUserRequest + /// + [DataContract] + public partial class ActivateUserRequest : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ActivateUserRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// The email address associated with the user profile. (required). + public ActivateUserRequest(string email = default(string)) + { + // to ensure "email" is required (not null) + this.Email = email ?? throw new ArgumentNullException("email is a required property for ActivateUserRequest and cannot be null"); + } + + /// + /// The email address associated with the user profile. + /// + /// The email address associated with the user profile. + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class ActivateUserRequest {\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as ActivateUserRequest); + } + + /// + /// Returns true if ActivateUserRequest instances are equal + /// + /// Instance of ActivateUserRequest to be compared + /// Boolean + public bool Equals(ActivateUserRequest input) + { + if (input == null) + return false; + + return + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/TalonOne/Model/AddItemCatalogAction.cs b/src/TalonOne/Model/AddItemCatalogAction.cs index 11bb924..e0fd799 100644 --- a/src/TalonOne/Model/AddItemCatalogAction.cs +++ b/src/TalonOne/Model/AddItemCatalogAction.cs @@ -65,7 +65,7 @@ protected AddItemCatalogAction() { } /// Price of the item. /// /// Price of the item. - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// diff --git a/src/TalonOne/Model/AdditionalCampaignProperties.cs b/src/TalonOne/Model/AdditionalCampaignProperties.cs index 04ccfc3..0158792 100644 --- a/src/TalonOne/Model/AdditionalCampaignProperties.cs +++ b/src/TalonOne/Model/AdditionalCampaignProperties.cs @@ -60,7 +60,19 @@ public enum FrontendStateEnum /// Enum Draft for value: draft /// [EnumMember(Value = "draft")] - Draft = 4 + Draft = 4, + + /// + /// Enum Disabled for value: disabled + /// + [EnumMember(Value = "disabled")] + Disabled = 5, + + /// + /// Enum Archived for value: archived + /// + [EnumMember(Value = "archived")] + Archived = 6 } diff --git a/src/TalonOne/Model/AdditionalCost.cs b/src/TalonOne/Model/AdditionalCost.cs index febae00..ef5729c 100644 --- a/src/TalonOne/Model/AdditionalCost.cs +++ b/src/TalonOne/Model/AdditionalCost.cs @@ -48,7 +48,7 @@ protected AdditionalCost() { } /// /// Gets or Sets Price /// - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// diff --git a/src/TalonOne/Model/Campaign.cs b/src/TalonOne/Model/Campaign.cs index 2f6520e..7bb1e5b 100644 --- a/src/TalonOne/Model/Campaign.cs +++ b/src/TalonOne/Model/Campaign.cs @@ -171,7 +171,19 @@ public enum FrontendStateEnum /// Enum Draft for value: draft /// [EnumMember(Value = "draft")] - Draft = 4 + Draft = 4, + + /// + /// Enum Disabled for value: disabled + /// + [EnumMember(Value = "disabled")] + Disabled = 5, + + /// + /// Enum Archived for value: archived + /// + [EnumMember(Value = "archived")] + Archived = 6 } diff --git a/src/TalonOne/Model/CartItem.cs b/src/TalonOne/Model/CartItem.cs index f71c3a7..3c29611 100644 --- a/src/TalonOne/Model/CartItem.cs +++ b/src/TalonOne/Model/CartItem.cs @@ -115,7 +115,7 @@ protected CartItem() { } /// 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 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. - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// @@ -163,7 +163,7 @@ protected CartItem() { } /// Position of the Cart Item in the Cart (calculated internally). /// /// Position of the Cart Item in the Cart (calculated internally). - [DataMember(Name="position", EmitDefaultValue=true)] + [DataMember(Name="position", EmitDefaultValue=false)] public decimal Position { get; set; } /// diff --git a/src/TalonOne/Model/CatalogItem.cs b/src/TalonOne/Model/CatalogItem.cs index 9c87493..c0c5da6 100644 --- a/src/TalonOne/Model/CatalogItem.cs +++ b/src/TalonOne/Model/CatalogItem.cs @@ -85,7 +85,7 @@ protected CatalogItem() { } /// Price of the item. /// /// Price of the item. - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// diff --git a/src/TalonOne/Model/Coupon.cs b/src/TalonOne/Model/Coupon.cs index 15b65d8..0d35e24 100644 --- a/src/TalonOne/Model/Coupon.cs +++ b/src/TalonOne/Model/Coupon.cs @@ -57,9 +57,9 @@ protected Coupon() { } /// The integration ID of the referring customer (if any) for whom this coupon was created as an effect.. /// The Integration ID of the customer that is allowed to redeem this coupon.. /// The ID of the Import which created this coupon.. - /// 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. (default to true). + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. (default to true). /// The id of the batch the coupon belongs to.. - /// Whether the reservation effect actually created a new reservation. (default to false). + /// An indication of whether the code can be redeemed only if it has been reserved first. (default to false). /// An indication of whether the coupon is implicitly reserved for all customers.. public Coupon(int id = default(int), DateTime created = default(DateTime), int campaignId = default(int), string value = default(string), int usageLimit = default(int), decimal discountLimit = default(decimal), int reservationLimit = default(int), DateTime startDate = default(DateTime), DateTime expiryDate = default(DateTime), List limits = default(List), int usageCounter = default(int), decimal discountCounter = default(decimal), decimal discountRemainder = default(decimal), decimal reservationCounter = default(decimal), Object attributes = default(Object), int referralId = default(int), string recipientIntegrationId = default(string), int importId = default(int), bool reservation = true, string batchId = default(string), bool isReservationMandatory = false, bool implicitlyReserved = default(bool)) { @@ -215,9 +215,9 @@ protected Coupon() { } public int ImportId { get; set; } /// - /// 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. + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. /// - /// 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. + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. [DataMember(Name="reservation", EmitDefaultValue=false)] public bool Reservation { get; set; } @@ -229,9 +229,9 @@ protected Coupon() { } public string BatchId { get; set; } /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. [DataMember(Name="isReservationMandatory", EmitDefaultValue=false)] public bool IsReservationMandatory { get; set; } diff --git a/src/TalonOne/Model/CustomerInventory.cs b/src/TalonOne/Model/CustomerInventory.cs index 1d522d6..92f0ecc 100644 --- a/src/TalonOne/Model/CustomerInventory.cs +++ b/src/TalonOne/Model/CustomerInventory.cs @@ -37,7 +37,7 @@ public partial class CustomerInventory : IEquatable, IValida /// profile. /// loyalty. /// referrals. - /// The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. . + /// The coupons reserved by this profile. This array includes hard and soft reservations. . /// giveaways. /// achievements. public CustomerInventory(CustomerProfile profile = default(CustomerProfile), Loyalty loyalty = default(Loyalty), List referrals = default(List), List coupons = default(List), List giveaways = default(List), List achievements = default(List)) @@ -69,9 +69,9 @@ public partial class CustomerInventory : IEquatable, IValida public List Referrals { get; set; } /// - /// The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. + /// The coupons reserved by this profile. This array includes hard and soft reservations. /// - /// The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. + /// The coupons reserved by this profile. This array includes hard and soft reservations. [DataMember(Name="coupons", EmitDefaultValue=false)] public List Coupons { get; set; } diff --git a/src/TalonOne/Model/InlineResponse20044.cs b/src/TalonOne/Model/InlineResponse20044.cs index 8b195ff..9997a3b 100644 --- a/src/TalonOne/Model/InlineResponse20044.cs +++ b/src/TalonOne/Model/InlineResponse20044.cs @@ -41,7 +41,7 @@ protected InlineResponse20044() { } /// /// totalResultSize (required). /// data (required). - public InlineResponse20044(int totalResultSize = default(int), List data = default(List)) + public InlineResponse20044(int totalResultSize = default(int), List data = default(List)) { this.TotalResultSize = totalResultSize; // to ensure "data" is required (not null) @@ -58,7 +58,7 @@ protected InlineResponse20044() { } /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// /// Returns the string presentation of the object diff --git a/src/TalonOne/Model/IntegrationCoupon.cs b/src/TalonOne/Model/IntegrationCoupon.cs index ec1c318..b3d791a 100644 --- a/src/TalonOne/Model/IntegrationCoupon.cs +++ b/src/TalonOne/Model/IntegrationCoupon.cs @@ -57,9 +57,9 @@ protected IntegrationCoupon() { } /// The integration ID of the referring customer (if any) for whom this coupon was created as an effect.. /// The Integration ID of the customer that is allowed to redeem this coupon.. /// The ID of the Import which created this coupon.. - /// 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. (default to true). + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. (default to true). /// The id of the batch the coupon belongs to.. - /// Whether the reservation effect actually created a new reservation. (default to false). + /// An indication of whether the code can be redeemed only if it has been reserved first. (default to false). /// An indication of whether the coupon is implicitly reserved for all customers.. /// The number of times the coupon was redeemed by the profile. (required). public IntegrationCoupon(int id = default(int), DateTime created = default(DateTime), int campaignId = default(int), string value = default(string), int usageLimit = default(int), decimal discountLimit = default(decimal), int reservationLimit = default(int), DateTime startDate = default(DateTime), DateTime expiryDate = default(DateTime), List limits = default(List), int usageCounter = default(int), decimal discountCounter = default(decimal), decimal discountRemainder = default(decimal), decimal reservationCounter = default(decimal), Object attributes = default(Object), int referralId = default(int), string recipientIntegrationId = default(string), int importId = default(int), bool reservation = true, string batchId = default(string), bool isReservationMandatory = false, bool implicitlyReserved = default(bool), int profileRedemptionCount = default(int)) @@ -217,9 +217,9 @@ protected IntegrationCoupon() { } public int ImportId { get; set; } /// - /// 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. + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. /// - /// 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. + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. [DataMember(Name="reservation", EmitDefaultValue=false)] public bool Reservation { get; set; } @@ -231,9 +231,9 @@ protected IntegrationCoupon() { } public string BatchId { get; set; } /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. [DataMember(Name="isReservationMandatory", EmitDefaultValue=false)] public bool IsReservationMandatory { get; set; } diff --git a/src/TalonOne/Model/InventoryCoupon.cs b/src/TalonOne/Model/InventoryCoupon.cs index 5e968df..9520e27 100644 --- a/src/TalonOne/Model/InventoryCoupon.cs +++ b/src/TalonOne/Model/InventoryCoupon.cs @@ -57,9 +57,9 @@ protected InventoryCoupon() { } /// The integration ID of the referring customer (if any) for whom this coupon was created as an effect.. /// The Integration ID of the customer that is allowed to redeem this coupon.. /// The ID of the Import which created this coupon.. - /// 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. (default to true). + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. (default to true). /// The id of the batch the coupon belongs to.. - /// Whether the reservation effect actually created a new reservation. (default to false). + /// An indication of whether the code can be redeemed only if it has been reserved first. (default to false). /// An indication of whether the coupon is implicitly reserved for all customers.. /// The number of times the coupon was redeemed by the profile. (required). /// 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. (required). @@ -220,9 +220,9 @@ protected InventoryCoupon() { } public int ImportId { get; set; } /// - /// 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. + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. /// - /// 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. + /// Defines the reservation type: - `true`: The coupon can be reserved for multiple customers. - `false`: The coupon can be reserved only for one customer. It is a personal code. [DataMember(Name="reservation", EmitDefaultValue=false)] public bool Reservation { get; set; } @@ -234,9 +234,9 @@ protected InventoryCoupon() { } public string BatchId { get; set; } /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. [DataMember(Name="isReservationMandatory", EmitDefaultValue=false)] public bool IsReservationMandatory { get; set; } diff --git a/src/TalonOne/Model/LoyaltyCardBalances.cs b/src/TalonOne/Model/LoyaltyCardBalances.cs new file mode 100644 index 0000000..b857897 --- /dev/null +++ b/src/TalonOne/Model/LoyaltyCardBalances.cs @@ -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}` + * + * + * Contact: devs@talon.one + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = TalonOne.Client.OpenAPIDateConverter; + +namespace TalonOne.Model +{ + /// + /// LoyaltyCardBalances + /// + [DataContract] + public partial class LoyaltyCardBalances : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// balance. + /// Map of the loyalty balances of the subledgers of a ledger.. + /// Customer profiles linked to the loyalty card.. + public LoyaltyCardBalances(LoyaltyBalance balance = default(LoyaltyBalance), Dictionary subledgerBalances = default(Dictionary), List profiles = default(List)) + { + this.Balance = balance; + this.SubledgerBalances = subledgerBalances; + this.Profiles = profiles; + } + + /// + /// Gets or Sets Balance + /// + [DataMember(Name="balance", EmitDefaultValue=false)] + public LoyaltyBalance Balance { get; set; } + + /// + /// Map of the loyalty balances of the subledgers of a ledger. + /// + /// Map of the loyalty balances of the subledgers of a ledger. + [DataMember(Name="subledgerBalances", EmitDefaultValue=false)] + public Dictionary SubledgerBalances { get; set; } + + /// + /// Customer profiles linked to the loyalty card. + /// + /// Customer profiles linked to the loyalty card. + [DataMember(Name="profiles", EmitDefaultValue=false)] + public List Profiles { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class LoyaltyCardBalances {\n"); + sb.Append(" Balance: ").Append(Balance).Append("\n"); + sb.Append(" SubledgerBalances: ").Append(SubledgerBalances).Append("\n"); + sb.Append(" Profiles: ").Append(Profiles).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as LoyaltyCardBalances); + } + + /// + /// Returns true if LoyaltyCardBalances instances are equal + /// + /// Instance of LoyaltyCardBalances to be compared + /// Boolean + public bool Equals(LoyaltyCardBalances input) + { + if (input == null) + return false; + + return + ( + this.Balance == input.Balance || + (this.Balance != null && + this.Balance.Equals(input.Balance)) + ) && + ( + this.SubledgerBalances == input.SubledgerBalances || + this.SubledgerBalances != null && + input.SubledgerBalances != null && + this.SubledgerBalances.SequenceEqual(input.SubledgerBalances) + ) && + ( + this.Profiles == input.Profiles || + this.Profiles != null && + input.Profiles != null && + this.Profiles.SequenceEqual(input.Profiles) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Balance != null) + hashCode = hashCode * 59 + this.Balance.GetHashCode(); + if (this.SubledgerBalances != null) + hashCode = hashCode * 59 + this.SubledgerBalances.GetHashCode(); + if (this.Profiles != null) + hashCode = hashCode * 59 + this.Profiles.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/TalonOne/Model/LoyaltyCardProfileRegistration.cs b/src/TalonOne/Model/LoyaltyCardProfileRegistration.cs index 7c7015a..51e146b 100644 --- a/src/TalonOne/Model/LoyaltyCardProfileRegistration.cs +++ b/src/TalonOne/Model/LoyaltyCardProfileRegistration.cs @@ -40,7 +40,7 @@ protected LoyaltyCardProfileRegistration() { } /// Initializes a new instance of the class. /// /// Integration ID of the customer profile linked to the card. (required). - /// Timestamp of the registration to the card. (required). + /// Timestamp the customer profile was linked to the card. (required). public LoyaltyCardProfileRegistration(string integrationId = default(string), DateTime timestamp = default(DateTime)) { // to ensure "integrationId" is required (not null) @@ -56,9 +56,9 @@ protected LoyaltyCardProfileRegistration() { } public string IntegrationId { get; set; } /// - /// Timestamp of the registration to the card. + /// Timestamp the customer profile was linked to the card. /// - /// Timestamp of the registration to the card. + /// Timestamp the customer profile was linked to the card. [DataMember(Name="timestamp", EmitDefaultValue=false)] public DateTime Timestamp { get; set; } diff --git a/src/TalonOne/Model/MessageLogEntry.cs b/src/TalonOne/Model/MessageLogEntry.cs index dfc2cc9..4ba1401 100644 --- a/src/TalonOne/Model/MessageLogEntry.cs +++ b/src/TalonOne/Model/MessageLogEntry.cs @@ -32,9 +32,9 @@ namespace TalonOne.Model public partial class MessageLogEntry : IEquatable, IValidatableObject { /// - /// The entity type the log is related to. + /// The entity type the notification is related to. /// - /// The entity type the log is related to. + /// The entity type the notification is related to. [JsonConverter(typeof(StringEnumConverter))] public enum EntityTypeEnum { @@ -48,20 +48,14 @@ public enum EntityTypeEnum /// Enum Loyaltyprogram for value: loyalty_program /// [EnumMember(Value = "loyalty_program")] - Loyaltyprogram = 2, - - /// - /// Enum Webhook for value: webhook - /// - [EnumMember(Value = "webhook")] - Webhook = 3 + Loyaltyprogram = 2 } /// - /// The entity type the log is related to. + /// The entity type the notification is related to. /// - /// The entity type the log is related to. + /// The entity type the notification is related to. [DataMember(Name="entityType", EmitDefaultValue=false)] public EntityTypeEnum? EntityType { get; set; } /// @@ -80,11 +74,10 @@ protected MessageLogEntry() { } /// request. /// response. /// Timestamp when the log entry was created. (required). - /// The entity type the log is related to. . - /// The target URL of the request.. + /// The entity type the notification is related to. . /// Identifier of the Application.. /// Identifier of the loyalty program.. - public MessageLogEntry(string id = default(string), string service = default(string), string changeType = default(string), int notificationId = default(int), string notificationName = default(string), MessageLogRequest request = default(MessageLogRequest), MessageLogResponse response = default(MessageLogResponse), DateTime createdAt = default(DateTime), EntityTypeEnum? entityType = default(EntityTypeEnum?), string url = default(string), int applicationId = default(int), int loyaltyProgramId = default(int)) + public MessageLogEntry(string id = default(string), string service = default(string), string changeType = default(string), int notificationId = default(int), string notificationName = default(string), MessageLogRequest request = default(MessageLogRequest), MessageLogResponse response = default(MessageLogResponse), DateTime createdAt = default(DateTime), EntityTypeEnum? entityType = default(EntityTypeEnum?), int applicationId = default(int), int loyaltyProgramId = default(int)) { // to ensure "id" is required (not null) this.Id = id ?? throw new ArgumentNullException("id is a required property for MessageLogEntry and cannot be null"); @@ -97,7 +90,6 @@ protected MessageLogEntry() { } this.Request = request; this.Response = response; this.EntityType = entityType; - this.Url = url; this.ApplicationId = applicationId; this.LoyaltyProgramId = loyaltyProgramId; } @@ -156,13 +148,6 @@ protected MessageLogEntry() { } [DataMember(Name="createdAt", EmitDefaultValue=false)] public DateTime CreatedAt { get; set; } - /// - /// The target URL of the request. - /// - /// The target URL of the request. - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } - /// /// Identifier of the Application. /// @@ -194,7 +179,6 @@ public override string ToString() sb.Append(" Response: ").Append(Response).Append("\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" EntityType: ").Append(EntityType).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); sb.Append(" LoyaltyProgramId: ").Append(LoyaltyProgramId).Append("\n"); sb.Append("}\n"); @@ -274,11 +258,6 @@ public bool Equals(MessageLogEntry input) this.EntityType == input.EntityType || this.EntityType.Equals(input.EntityType) ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && ( this.ApplicationId == input.ApplicationId || this.ApplicationId.Equals(input.ApplicationId) @@ -314,8 +293,6 @@ public override int GetHashCode() if (this.CreatedAt != null) hashCode = hashCode * 59 + this.CreatedAt.GetHashCode(); hashCode = hashCode * 59 + this.EntityType.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); hashCode = hashCode * 59 + this.ApplicationId.GetHashCode(); hashCode = hashCode * 59 + this.LoyaltyProgramId.GetHashCode(); return hashCode; diff --git a/src/TalonOne/Model/NewCoupons.cs b/src/TalonOne/Model/NewCoupons.cs index 96d58bc..617fdec 100644 --- a/src/TalonOne/Model/NewCoupons.cs +++ b/src/TalonOne/Model/NewCoupons.cs @@ -51,7 +51,7 @@ protected NewCoupons() { } /// The integration ID for this coupon's beneficiary's profile.. /// 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. . /// The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. . - /// Whether the reservation effect actually created a new reservation. (default to false). + /// An indication of whether the code can be redeemed only if it has been reserved first. (default to false). /// An indication of whether the coupon is implicitly reserved for all customers.. public NewCoupons(int usageLimit = default(int), decimal discountLimit = default(decimal), int reservationLimit = default(int), DateTime startDate = default(DateTime), DateTime expiryDate = default(DateTime), List limits = default(List), int numberOfCoupons = default(int), string uniquePrefix = default(string), Object attributes = default(Object), string recipientIntegrationId = default(string), List validCharacters = default(List), string couponPattern = default(string), bool isReservationMandatory = false, bool implicitlyReserved = default(bool)) { @@ -156,9 +156,9 @@ protected NewCoupons() { } public string CouponPattern { get; set; } /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. [DataMember(Name="isReservationMandatory", EmitDefaultValue=false)] public bool IsReservationMandatory { get; set; } diff --git a/src/TalonOne/Model/NewExternalInvitation.cs b/src/TalonOne/Model/NewExternalInvitation.cs new file mode 100644 index 0000000..a33c964 --- /dev/null +++ b/src/TalonOne/Model/NewExternalInvitation.cs @@ -0,0 +1,167 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * + * Contact: devs@talon.one + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using System.ComponentModel.DataAnnotations; +using OpenAPIDateConverter = TalonOne.Client.OpenAPIDateConverter; + +namespace TalonOne.Model +{ + /// + /// Parameters for inviting a new user from an external identity provider. + /// + [DataContract] + public partial class NewExternalInvitation : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected NewExternalInvitation() { } + /// + /// Initializes a new instance of the class. + /// + /// Name of the user.. + /// List of user groups in the external identity provider. If there are roles in Talon.One whose names match these user groups, those roles will be automatically assigned to the user upon invitation. . + /// Email address of the user. (required). + public NewExternalInvitation(string name = default(string), List userGroups = default(List), string email = default(string)) + { + // to ensure "email" is required (not null) + this.Email = email ?? throw new ArgumentNullException("email is a required property for NewExternalInvitation and cannot be null"); + this.Name = name; + this.UserGroups = userGroups; + } + + /// + /// Name of the user. + /// + /// Name of the user. + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + /// + /// List of user groups in the external identity provider. If there are roles in Talon.One whose names match these user groups, those roles will be automatically assigned to the user upon invitation. + /// + /// List of user groups in the external identity provider. If there are roles in Talon.One whose names match these user groups, those roles will be automatically assigned to the user upon invitation. + [DataMember(Name="userGroups", EmitDefaultValue=false)] + public List UserGroups { get; set; } + + /// + /// Email address of the user. + /// + /// Email address of the user. + [DataMember(Name="email", EmitDefaultValue=false)] + public string Email { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class NewExternalInvitation {\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" UserGroups: ").Append(UserGroups).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + return this.Equals(input as NewExternalInvitation); + } + + /// + /// Returns true if NewExternalInvitation instances are equal + /// + /// Instance of NewExternalInvitation to be compared + /// Boolean + public bool Equals(NewExternalInvitation input) + { + if (input == null) + return false; + + return + ( + this.Name == input.Name || + (this.Name != null && + this.Name.Equals(input.Name)) + ) && + ( + this.UserGroups == input.UserGroups || + this.UserGroups != null && + input.UserGroups != null && + this.UserGroups.SequenceEqual(input.UserGroups) + ) && + ( + this.Email == input.Email || + (this.Email != null && + this.Email.Equals(input.Email)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + int hashCode = 41; + if (this.Name != null) + hashCode = hashCode * 59 + this.Name.GetHashCode(); + if (this.UserGroups != null) + hashCode = hashCode * 59 + this.UserGroups.GetHashCode(); + if (this.Email != null) + hashCode = hashCode * 59 + this.Email.GetHashCode(); + return hashCode; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/TalonOne/Model/PatchItemCatalogAction.cs b/src/TalonOne/Model/PatchItemCatalogAction.cs index 0fbf55a..121edfb 100644 --- a/src/TalonOne/Model/PatchItemCatalogAction.cs +++ b/src/TalonOne/Model/PatchItemCatalogAction.cs @@ -65,7 +65,7 @@ protected PatchItemCatalogAction() { } /// Price of the item. /// /// Price of the item. - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// diff --git a/src/TalonOne/Model/PatchManyItemsCatalogAction.cs b/src/TalonOne/Model/PatchManyItemsCatalogAction.cs index 016f05a..766ffc0 100644 --- a/src/TalonOne/Model/PatchManyItemsCatalogAction.cs +++ b/src/TalonOne/Model/PatchManyItemsCatalogAction.cs @@ -48,7 +48,7 @@ public partial class PatchManyItemsCatalogAction : IEquatable /// Price of the item. - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// diff --git a/src/TalonOne/Model/ReturnedCartItem.cs b/src/TalonOne/Model/ReturnedCartItem.cs index 9b5556d..614ee20 100644 --- a/src/TalonOne/Model/ReturnedCartItem.cs +++ b/src/TalonOne/Model/ReturnedCartItem.cs @@ -51,7 +51,7 @@ protected ReturnedCartItem() { } /// The index of the cart item in the provided customer session's `cartItems` property. /// /// The index of the cart item in the provided customer session's `cartItems` property. - [DataMember(Name="position", EmitDefaultValue=true)] + [DataMember(Name="position", EmitDefaultValue=false)] public int Position { get; set; } /// diff --git a/src/TalonOne/Model/SetDiscountPerAdditionalCostPerItemEffectProps.cs b/src/TalonOne/Model/SetDiscountPerAdditionalCostPerItemEffectProps.cs index 6b55539..02a7ad1 100644 --- a/src/TalonOne/Model/SetDiscountPerAdditionalCostPerItemEffectProps.cs +++ b/src/TalonOne/Model/SetDiscountPerAdditionalCostPerItemEffectProps.cs @@ -84,7 +84,7 @@ protected SetDiscountPerAdditionalCostPerItemEffectProps() { } /// The index of the item in the cart item list containing the additional cost to be discounted. /// /// The index of the item in the cart item list containing the additional cost to be discounted. - [DataMember(Name="position", EmitDefaultValue=true)] + [DataMember(Name="position", EmitDefaultValue=false)] public decimal Position { get; set; } /// diff --git a/src/TalonOne/Model/SetDiscountPerItemEffectProps.cs b/src/TalonOne/Model/SetDiscountPerItemEffectProps.cs index ce1c843..9c58638 100644 --- a/src/TalonOne/Model/SetDiscountPerItemEffectProps.cs +++ b/src/TalonOne/Model/SetDiscountPerItemEffectProps.cs @@ -86,7 +86,7 @@ protected SetDiscountPerItemEffectProps() { } /// The index of the item in the cart items list on which this discount should be applied. /// /// The index of the item in the cart items list on which this discount should be applied. - [DataMember(Name="position", EmitDefaultValue=true)] + [DataMember(Name="position", EmitDefaultValue=false)] public decimal Position { get; set; } /// diff --git a/src/TalonOne/Model/StrikethroughChangedItem.cs b/src/TalonOne/Model/StrikethroughChangedItem.cs index 19771d0..1ef9965 100644 --- a/src/TalonOne/Model/StrikethroughChangedItem.cs +++ b/src/TalonOne/Model/StrikethroughChangedItem.cs @@ -90,7 +90,7 @@ protected StrikethroughChangedItem() { } /// The price of the changed item. /// /// The price of the changed item. - [DataMember(Name="price", EmitDefaultValue=true)] + [DataMember(Name="price", EmitDefaultValue=false)] public decimal Price { get; set; } /// diff --git a/src/TalonOne/Model/UpdateCoupon.cs b/src/TalonOne/Model/UpdateCoupon.cs index d9fbab7..8858fd8 100644 --- a/src/TalonOne/Model/UpdateCoupon.cs +++ b/src/TalonOne/Model/UpdateCoupon.cs @@ -42,7 +42,7 @@ public partial class UpdateCoupon : IEquatable, IValidatableObjec /// 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. . /// The integration ID for this coupon's beneficiary's profile.. /// Arbitrary properties associated with this item.. - /// Whether the reservation effect actually created a new reservation. (default to false). + /// An indication of whether the code can be redeemed only if it has been reserved first. (default to false). /// An indication of whether the coupon is implicitly reserved for all customers.. public UpdateCoupon(int usageLimit = default(int), decimal discountLimit = default(decimal), int reservationLimit = default(int), DateTime startDate = default(DateTime), DateTime expiryDate = default(DateTime), List limits = default(List), string recipientIntegrationId = default(string), Object attributes = default(Object), bool isReservationMandatory = false, bool implicitlyReserved = default(bool)) { @@ -115,9 +115,9 @@ public partial class UpdateCoupon : IEquatable, IValidatableObjec public Object Attributes { get; set; } /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. /// - /// Whether the reservation effect actually created a new reservation. + /// An indication of whether the code can be redeemed only if it has been reserved first. [DataMember(Name="isReservationMandatory", EmitDefaultValue=false)] public bool IsReservationMandatory { get; set; } diff --git a/src/TalonOne/Model/UpdateUser.cs b/src/TalonOne/Model/UpdateUser.cs index bbbf02f..3fa1b52 100644 --- a/src/TalonOne/Model/UpdateUser.cs +++ b/src/TalonOne/Model/UpdateUser.cs @@ -65,7 +65,7 @@ public enum StateEnum /// 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. . /// Indicates whether the user is an `admin`.. /// Indicates the access level of the user.. - /// 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. . + /// A list of the IDs of the roles assigned to the user. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. . /// Application notifications that the user is subscribed to.. public UpdateUser(string name = default(string), StateEnum? state = default(StateEnum?), bool isAdmin = default(bool), string policy = default(string), List roles = default(List), Object applicationNotificationSubscriptions = default(Object)) { @@ -99,9 +99,9 @@ public enum StateEnum public string Policy { get; set; } /// - /// 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. + /// A list of the IDs of the roles assigned to the user. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. /// - /// 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. + /// A list of the IDs of the roles assigned to the user. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. [DataMember(Name="roles", EmitDefaultValue=false)] public List Roles { get; set; }