From 6f619b0b90cb276cd350d7bf0f93ef5a0655fe7b Mon Sep 17 00:00:00 2001 From: rubyjohn93 Date: Mon, 10 Jun 2024 14:51:58 +0200 Subject: [PATCH] Update SDK --- Makefile | 2 +- README.md | 15 +- api/openapi.yaml | 414 ++++++++++----- api_integration.go | 89 ++-- api_management.go | 564 +++++++++++++++------ configuration.go | 2 +- docs/ActivateUserRequest.md | 39 ++ docs/Coupon.md | 4 +- docs/CustomerInventory.md | 2 +- docs/InlineResponse20044.md | 10 +- docs/IntegrationApi.md | 12 +- docs/IntegrationCoupon.md | 4 +- docs/InventoryCoupon.md | 4 +- docs/LoyaltyCardBalances.md | 91 ++++ docs/LoyaltyCardProfileRegistration.md | 2 +- docs/ManagementApi.md | 166 ++++-- docs/MessageLogEntry.md | 28 +- docs/NewCoupons.md | 2 +- docs/NewExternalInvitation.md | 91 ++++ docs/UpdateCoupon.md | 2 +- docs/UpdateUser.md | 2 +- go.mod | 2 +- model_activate_user_request.go | 59 +++ model_coupon.go | 4 +- model_customer_inventory.go | 2 +- model_inline_response_200_44.go | 10 +- model_integration_coupon.go | 4 +- model_inventory_coupon.go | 4 +- model_loyalty_card_balances.go | 146 ++++++ model_loyalty_card_profile_registration.go | 2 +- model_message_log_entry.go | 37 +- model_new_coupons.go | 2 +- model_new_external_invitation.go | 129 +++++ model_update_coupon.go | 2 +- model_update_user.go | 2 +- 35 files changed, 1474 insertions(+), 476 deletions(-) create mode 100644 docs/ActivateUserRequest.md create mode 100644 docs/LoyaltyCardBalances.md create mode 100644 docs/NewExternalInvitation.md create mode 100644 model_activate_user_request.go create mode 100644 model_loyalty_card_balances.go create mode 100644 model_new_external_invitation.go diff --git a/Makefile b/Makefile index 57ba83e1..70f75913 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,3 @@ update-pkg-cache: GOPROXY=https://proxy.golang.org GO111MODULE=on \ - go get github.com/talon-one/talon_go/v6 + go get github.com/talon-one/talon_go/v7 diff --git a/README.md b/README.md index 11e268f4..673014da 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - API version: -- Package version: 6.0.0 +- Package version: 7.0.0 - Build package: org.openapitools.codegen.languages.GoClientExperimentalCodegen ## Installation @@ -94,7 +94,7 @@ import ( "encoding/json" "fmt" - talon "github.com/talon-one/talon_go/v6" + talon "github.com/talon-one/talon_go/v7" ) func main() { @@ -220,7 +220,7 @@ import ( "context" "fmt" - talon "github.com/talon-one/talon_go/v6" + talon "github.com/talon-one/talon_go/v7" ) func main() { @@ -295,6 +295,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 @@ -349,7 +350,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 @@ -395,7 +395,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 @@ -415,8 +415,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 @@ -464,6 +466,7 @@ Class | Method | HTTP request | Description - [Achievement](docs/Achievement.md) - [AchievementAdditionalProperties](docs/AchievementAdditionalProperties.md) - [AchievementProgress](docs/AchievementProgress.md) + - [ActivateUserRequest](docs/ActivateUserRequest.md) - [AddFreeItemEffectProps](docs/AddFreeItemEffectProps.md) - [AddItemCatalogAction](docs/AddItemCatalogAction.md) - [AddLoyaltyPoints](docs/AddLoyaltyPoints.md) @@ -704,6 +707,7 @@ Class | Method | HTTP request | Description - [LoyaltyBalance](docs/LoyaltyBalance.md) - [LoyaltyBalances](docs/LoyaltyBalances.md) - [LoyaltyCard](docs/LoyaltyCard.md) + - [LoyaltyCardBalances](docs/LoyaltyCardBalances.md) - [LoyaltyCardProfileRegistration](docs/LoyaltyCardProfileRegistration.md) - [LoyaltyCardRegistration](docs/LoyaltyCardRegistration.md) - [LoyaltyDashboardData](docs/LoyaltyDashboardData.md) @@ -762,6 +766,7 @@ Class | Method | HTTP request | Description - [NewCustomerSessionV2](docs/NewCustomerSessionV2.md) - [NewEvent](docs/NewEvent.md) - [NewEventType](docs/NewEventType.md) + - [NewExternalInvitation](docs/NewExternalInvitation.md) - [NewGiveawaysPool](docs/NewGiveawaysPool.md) - [NewInternalAudience](docs/NewInternalAudience.md) - [NewInvitation](docs/NewInvitation.md) diff --git a/api/openapi.yaml b/api/openapi.yaml index 0889ac03..0f3e9d99 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1247,40 +1247,16 @@ paths: x-codegen-request-body-name: body post: description: | - Create a coupon reservation for specified customer profiles on the specified coupon. + 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). - 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. -
+ - 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. operationId: createCouponReservation @@ -1332,11 +1308,7 @@ paths: /v1/coupon_reservations/customerprofiles/{couponValue}: get: description: | - 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. operationId: getReservedCustomers parameters: - description: The code of the coupon. @@ -1484,12 +1456,21 @@ paths: schema: format: date-time type: string + - description: Filter results by one or more subledger IDs. Must be exact match. + explode: false + in: query + name: subledgerId + schema: + items: + type: string + type: array + style: form responses: "200": content: application/json: schema: - $ref: '#/components/schemas/LoyaltyBalances' + $ref: '#/components/schemas/LoyaltyCardBalances' description: OK "400": content: @@ -1518,11 +1499,13 @@ paths: get: description: | Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. - You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. + 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. - **Note:** For more information, see: + 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) operationId: getLoyaltyBalances @@ -1558,6 +1541,11 @@ paths: schema: format: date-time type: string + - description: The ID of the subledger by which we filter the data. + in: query + name: subledgerId + schema: + type: string responses: "200": content: @@ -1612,11 +1600,15 @@ paths: schema: maxLength: 108 type: string - - description: The ID of the subledger by which we filter the data. + - description: Filter results by one or more subledger IDs. Must be exact match. + explode: false in: query name: subledgerId schema: - type: string + items: + type: string + type: array + style: form - description: | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. @@ -1852,11 +1844,15 @@ paths: - pending - expired type: string - - description: The ID of the subledger by which we filter the data. + - description: Filter results by one or more subledger IDs. Must be exact match. + explode: false in: query name: subledgerId schema: - type: string + items: + type: string + type: array + style: form - description: The number of items in the response. in: query name: pageSize @@ -8403,9 +8399,8 @@ paths: - `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). + - `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. @@ -8494,11 +8489,10 @@ paths: - `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). + - `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 is reserved. + - `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. @@ -9097,6 +9091,26 @@ paths: tags: - management x-codegen-request-body-name: body + /v1/users/activate: + post: + description: | + Activate a deactivated user by their email address. + operationId: activateUserByEmail + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ActivateUserRequest' + description: body + required: true + responses: + "204": + content: {} + description: No Content + summary: Activate user by email address + tags: + - management + x-codegen-request-body-name: body /v1/users/deactivate: post: description: | @@ -9117,6 +9131,26 @@ paths: tags: - management x-codegen-request-body-name: body + /v1/users/invite: + post: + description: | + Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + operationId: inviteUserExternal + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/NewExternalInvitation' + description: body + required: true + responses: + "204": + content: {} + description: Invitation email sent + summary: Invite user from identity provider + tags: + - management + x-codegen-request-body-name: body /v1/changes: get: description: | @@ -9455,10 +9489,10 @@ paths: summary: Get exports tags: - management - /v1/roles: + /v2/roles: get: description: List all roles. - operationId: getAllRoles + operationId: listAllRolesV2 responses: "200": content: @@ -9469,16 +9503,16 @@ paths: summary: List roles tags: - management - /v1/roles/{roleId}: + /v2/roles/{roleId}: get: description: | - Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). - operationId: getRole + Get the details of a specific role. To see all the roles, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. + operationId: getRoleV2 parameters: - description: | - ID of role. + The 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. + **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. in: path name: roleId required: true @@ -9489,17 +9523,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Role' + $ref: '#/components/schemas/RoleV2' description: OK summary: Get role tags: - management - /v2/roles/{roleId}: put: description: Update a specific role. operationId: updateRoleV2 parameters: - - description: 'The ID of role. ' + - description: | + The ID of role. + + **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. in: path name: roleId required: true @@ -12093,6 +12129,8 @@ components: - scheduled - running - draft + - disabled + - archived example: running type: string required: @@ -12272,6 +12310,8 @@ components: - scheduled - running - draft + - disabled + - archived example: running type: string required: @@ -13745,7 +13785,8 @@ components: type: string isReservationMandatory: default: false - description: Whether the reservation effect actually created a new reservation. + description: An indication of whether the code can be redeemed only if it + has been reserved first. example: false title: Is reservation mandatory type: boolean @@ -13973,7 +14014,8 @@ components: type: object isReservationMandatory: default: false - description: Whether the reservation effect actually created a new reservation. + description: An indication of whether the code can be redeemed only if it + has been reserved first. example: false title: Is reservation mandatory type: boolean @@ -14186,11 +14228,11 @@ components: reservation: default: true description: | - 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. example: false - title: Reservation Status + title: Reservation Type type: boolean batchId: description: The id of the batch the coupon belongs to. @@ -14199,7 +14241,8 @@ components: type: string isReservationMandatory: default: false - description: Whether the reservation effect actually created a new reservation. + description: An indication of whether the code can be redeemed only if it + has been reserved first. example: false title: Is reservation mandatory type: boolean @@ -14363,11 +14406,11 @@ components: reservation: default: true description: | - 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. example: false - title: Reservation Status + title: Reservation Type type: boolean batchId: description: The id of the batch the coupon belongs to. @@ -14376,7 +14419,8 @@ components: type: string isReservationMandatory: default: false - description: Whether the reservation effect actually created a new reservation. + description: An indication of whether the code can be redeemed only if it + has been reserved first. example: false title: Is reservation mandatory type: boolean @@ -14567,11 +14611,11 @@ components: reservation: default: true description: | - 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. example: false - title: Reservation Status + title: Reservation Type type: boolean batchId: description: The id of the batch the coupon belongs to. @@ -14580,7 +14624,8 @@ components: type: string isReservationMandatory: default: false - description: Whether the reservation effect actually created a new reservation. + description: An indication of whether the code can be redeemed only if it + has been reserved first. example: false title: Is reservation mandatory type: boolean @@ -15060,17 +15105,12 @@ components: type: string entityType: description: | - The entity type the log is related to. + The entity type the notification is related to. enum: - application - loyalty_program - - webhook example: loyalty_program type: string - url: - description: The target URL of the request. - example: www.my-company.com/my-endpoint-name - type: string applicationId: description: Identifier of the Application. example: 5 @@ -15293,6 +15333,19 @@ components: required: - email type: object + ActivateUserRequest: + description: "" + example: + email: john.doe@example.com + properties: + email: + description: The email address associated with the user profile. + example: john.doe@example.com + format: email + type: string + required: + - email + type: object DeleteUserRequest: description: "" example: @@ -15341,6 +15394,39 @@ components: required: - email type: object + NewExternalInvitation: + description: Parameters for inviting a new user from an external identity provider. + example: + userGroups: + - Managers + - Customer support + name: John Doe + email: john.doe@example.com + properties: + name: + description: Name of the user. + example: John Doe + type: string + userGroups: + description: | + 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. + example: + - Managers + - Customer support + items: + type: string + type: array + email: + description: Email address of the user. + example: john.doe@example.com + format: email + type: string + required: + - email + type: object Change: description: "" example: @@ -16280,6 +16366,45 @@ components: - subLedgerID - type type: object + LoyaltyCardBalances: + description: "" + example: + balance: + activePoints: 286.0 + spentPoints: 150.0 + expiredPoints: 286.0 + pendingPoints: 50.0 + subledgerBalances: + mysubledger: + activePoints: 286 + pendingPoints: 50 + spentPoints: 150 + expiredPoints: 25 + profiles: + - integrationId: R195412 + timestamp: 2021-09-12T10:12:42Z + - integrationId: R195412 + timestamp: 2021-09-12T10:12:42Z + properties: + balance: + $ref: '#/components/schemas/LoyaltyBalance' + subledgerBalances: + additionalProperties: + $ref: '#/components/schemas/LoyaltyBalance' + description: Map of the loyalty balances of the subledgers of a ledger. + example: + mysubledger: + activePoints: 286 + pendingPoints: 50 + spentPoints: 150 + expiredPoints: 25 + type: object + profiles: + description: Customer profiles linked to the loyalty card. + items: + $ref: '#/components/schemas/LoyaltyCardProfileRegistration' + type: array + type: object LoyaltyBalances: description: List of loyalty balances for a ledger and its subledgers. example: @@ -17834,7 +17959,7 @@ components: maxLength: 1000 type: string timestamp: - description: Timestamp of the registration to the card. + description: Timestamp the customer profile was linked to the card. example: 2021-09-12T10:12:42Z format: date-time type: string @@ -18359,7 +18484,7 @@ components: type: array coupons: description: | - 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. items: $ref: '#/components/schemas/InventoryCoupon' type: array @@ -22811,7 +22936,7 @@ components: description: | A list of the IDs of the roles assigned to the user. - **Note**: Use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint to find the ID of a role. + **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. example: - 1 - 3 @@ -25473,21 +25598,6 @@ components: type: object Role: description: "" - example: - accountId: 3886 - created: 2020-06-10T09:05:27.993483Z - campaignGroupID: 3 - members: - - 48 - - 562 - - 475 - - 18 - name: Campaign Reviewer - modified: 2021-09-12T10:12:42Z - description: Reviews the campaigns - id: 6 - acl: - Role: 127 properties: id: description: Internal ID of this entity. @@ -35208,32 +35318,96 @@ components: data: - accountId: 3886 created: 2020-06-10T09:05:27.993483Z - campaignGroupID: 3 + permissions: + permissionSets: + - name: Application permission set + logicalOperations: + - getApplicationOperations + - editApplicationOperations + - name: Campaign manager permission set + logicalOperations: + - getCampaignOperations + - createCampaignOperations + - updateCampaignOperations + - name: Campaign read-only permission set + logicalOperations: + - getCampaignOperations + - name: Loyalty program read-only permission set + logicalOperations: + - getLoyaltyProgramOperations + - name: Campaign access group manager permission set + logicalOperations: + - getCampaignAccessGroupOperations + - updateCampaignAccessGroupOperations + - deleteCampaignAccessGroupOperations + roles: + campaignAccessGroups: + "5": Campaign access group manager permission set + loyaltyPrograms: + "10": Loyalty program manager permission set + applications: + "1": + application: Application permission set + "3": + campaign: Campaign manager permission set + "4": + draftCampaign: Campaign read-only permission set + "5": + tools: Tools permission set members: - - 48 - - 562 - - 475 - - 18 - name: Campaign Reviewer + - 10 + - 12 + name: Campaign and campaign access group manager modified: 2021-09-12T10:12:42Z - description: Reviews the campaigns + description: Allows you to create and edit campaigns for specific Applications, + delete specific campaign access groups, and view loyalty programs. id: 6 - acl: - Role: 127 - accountId: 3886 created: 2020-06-10T09:05:27.993483Z - campaignGroupID: 3 + permissions: + permissionSets: + - name: Application permission set + logicalOperations: + - getApplicationOperations + - editApplicationOperations + - name: Campaign manager permission set + logicalOperations: + - getCampaignOperations + - createCampaignOperations + - updateCampaignOperations + - name: Campaign read-only permission set + logicalOperations: + - getCampaignOperations + - name: Loyalty program read-only permission set + logicalOperations: + - getLoyaltyProgramOperations + - name: Campaign access group manager permission set + logicalOperations: + - getCampaignAccessGroupOperations + - updateCampaignAccessGroupOperations + - deleteCampaignAccessGroupOperations + roles: + campaignAccessGroups: + "5": Campaign access group manager permission set + loyaltyPrograms: + "10": Loyalty program manager permission set + applications: + "1": + application: Application permission set + "3": + campaign: Campaign manager permission set + "4": + draftCampaign: Campaign read-only permission set + "5": + tools: Tools permission set members: - - 48 - - 562 - - 475 - - 18 - name: Campaign Reviewer + - 10 + - 12 + name: Campaign and campaign access group manager modified: 2021-09-12T10:12:42Z - description: Reviews the campaigns + description: Allows you to create and edit campaigns for specific Applications, + delete specific campaign access groups, and view loyalty programs. id: 6 - acl: - Role: 127 totalResultSize: 1 properties: totalResultSize: @@ -35241,7 +35415,7 @@ components: type: integer data: items: - $ref: '#/components/schemas/Role' + $ref: '#/components/schemas/RoleV2' type: array required: - data diff --git a/api_integration.go b/api_integration.go index 4ff55b57..22629c1f 100644 --- a/api_integration.go +++ b/api_integration.go @@ -219,42 +219,17 @@ func (r apiCreateCouponReservationRequest) Body(body CouponReservations) apiCrea /* CreateCouponReservation Create coupon reservation -Create a coupon reservation for specified customer profiles on the specified coupon. +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). -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 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, -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. - -
+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. @@ -1622,6 +1597,7 @@ type apiGetLoyaltyBalancesRequest struct { loyaltyProgramId int32 integrationId string endDate *time.Time + subledgerId *string } func (r apiGetLoyaltyBalancesRequest) EndDate(endDate time.Time) apiGetLoyaltyBalancesRequest { @@ -1629,14 +1605,21 @@ func (r apiGetLoyaltyBalancesRequest) EndDate(endDate time.Time) apiGetLoyaltyBa return r } +func (r apiGetLoyaltyBalancesRequest) SubledgerId(subledgerId string) apiGetLoyaltyBalancesRequest { + r.subledgerId = &subledgerId + return r +} + /* GetLoyaltyBalances Get customer's loyalty points Retrieve loyalty ledger balances for the given Integration ID in the specified loyalty program. -You can filter balances by date. If no filtering options are applied, you retrieve all loyalty balances on the current date for the given integration ID. +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. -**Note:** For more information, see: +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) @@ -1686,6 +1669,9 @@ func (r apiGetLoyaltyBalancesRequest) Execute() (LoyaltyBalances, *_nethttp.Resp if r.endDate != nil { localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) } + if r.subledgerId != nil { + localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1798,6 +1784,7 @@ type apiGetLoyaltyCardBalancesRequest struct { loyaltyProgramId int32 loyaltyCardId string endDate *time.Time + subledgerId *[]string } func (r apiGetLoyaltyCardBalancesRequest) EndDate(endDate time.Time) apiGetLoyaltyCardBalancesRequest { @@ -1805,6 +1792,11 @@ func (r apiGetLoyaltyCardBalancesRequest) EndDate(endDate time.Time) apiGetLoyal return r } +func (r apiGetLoyaltyCardBalancesRequest) SubledgerId(subledgerId []string) apiGetLoyaltyCardBalancesRequest { + r.subledgerId = &subledgerId + return r +} + /* GetLoyaltyCardBalances Get card's point balances Retrieve loyalty balances for the given loyalty card in the specified loyalty program with filtering options applied. @@ -1828,16 +1820,16 @@ func (a *IntegrationApiService) GetLoyaltyCardBalances(ctx _context.Context, loy /* Execute executes the request - @return LoyaltyBalances + @return LoyaltyCardBalances */ -func (r apiGetLoyaltyCardBalancesRequest) Execute() (LoyaltyBalances, *_nethttp.Response, error) { +func (r apiGetLoyaltyCardBalancesRequest) Execute() (LoyaltyCardBalances, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue LoyaltyBalances + localVarReturnValue LoyaltyCardBalances ) localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "IntegrationApiService.GetLoyaltyCardBalances") @@ -1860,6 +1852,9 @@ func (r apiGetLoyaltyCardBalancesRequest) Execute() (LoyaltyBalances, *_nethttp. if r.endDate != nil { localVarQueryParams.Add("endDate", parameterToString(*r.endDate, "")) } + if r.subledgerId != nil { + localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "csv")) + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -1913,7 +1908,7 @@ func (r apiGetLoyaltyCardBalancesRequest) Execute() (LoyaltyBalances, *_nethttp. error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v LoyaltyBalances + var v LoyaltyCardBalances err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1972,7 +1967,7 @@ type apiGetLoyaltyCardPointsRequest struct { loyaltyProgramId int32 loyaltyCardId string status *string - subledgerId *string + subledgerId *[]string pageSize *int32 skip *int32 } @@ -1982,7 +1977,7 @@ func (r apiGetLoyaltyCardPointsRequest) Status(status string) apiGetLoyaltyCardP return r } -func (r apiGetLoyaltyCardPointsRequest) SubledgerId(subledgerId string) apiGetLoyaltyCardPointsRequest { +func (r apiGetLoyaltyCardPointsRequest) SubledgerId(subledgerId []string) apiGetLoyaltyCardPointsRequest { r.subledgerId = &subledgerId return r } @@ -2057,7 +2052,7 @@ func (r apiGetLoyaltyCardPointsRequest) Execute() (InlineResponse2003, *_nethttp localVarQueryParams.Add("status", parameterToString(*r.status, "")) } if r.subledgerId != nil { - localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) + localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "csv")) } if r.pageSize != nil { localVarQueryParams.Add("pageSize", parameterToString(*r.pageSize, "")) @@ -2176,7 +2171,7 @@ type apiGetLoyaltyCardTransactionsRequest struct { apiService *IntegrationApiService loyaltyProgramId int32 loyaltyCardId string - subledgerId *string + subledgerId *[]string loyaltyTransactionType *string startDate *time.Time endDate *time.Time @@ -2184,7 +2179,7 @@ type apiGetLoyaltyCardTransactionsRequest struct { skip *int32 } -func (r apiGetLoyaltyCardTransactionsRequest) SubledgerId(subledgerId string) apiGetLoyaltyCardTransactionsRequest { +func (r apiGetLoyaltyCardTransactionsRequest) SubledgerId(subledgerId []string) apiGetLoyaltyCardTransactionsRequest { r.subledgerId = &subledgerId return r } @@ -2267,7 +2262,7 @@ func (r apiGetLoyaltyCardTransactionsRequest) Execute() (InlineResponse2001, *_n } if r.subledgerId != nil { - localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "")) + localVarQueryParams.Add("subledgerId", parameterToString(*r.subledgerId, "csv")) } if r.loyaltyTransactionType != nil { localVarQueryParams.Add("loyaltyTransactionType", parameterToString(*r.loyaltyTransactionType, "")) @@ -2818,11 +2813,7 @@ type apiGetReservedCustomersRequest struct { /* 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. +Return all customers that have this coupon marked as reserved. This includes hard and soft reservations. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param couponValue The code of the coupon. diff --git a/api_management.go b/api_management.go index d5802c68..c2c0fc84 100644 --- a/api_management.go +++ b/api_management.go @@ -26,6 +26,133 @@ var ( // ManagementApiService ManagementApi service type ManagementApiService service +type apiActivateUserByEmailRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *ActivateUserRequest +} + +func (r apiActivateUserByEmailRequest) Body(body ActivateUserRequest) apiActivateUserByEmailRequest { + r.body = &body + return r +} + +/* +ActivateUserByEmail Activate user by email address +Activate a deactivated user by their email address. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return apiActivateUserByEmailRequest +*/ +func (a *ManagementApiService) ActivateUserByEmail(ctx _context.Context) apiActivateUserByEmailRequest { + return apiActivateUserByEmailRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request +*/ +func (r apiActivateUserByEmailRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ActivateUserByEmail") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/users/activate" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type apiAddLoyaltyCardPointsRequest struct { ctx _context.Context apiService *ManagementApiService @@ -5537,13 +5664,12 @@ The CSV file can contain the following columns: - `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). + - `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 is reserved. + - `reservation`: Whether the coupon can be reserved for multiple customers. - `reservation_counter`: How many times this coupon has been reserved. @@ -8959,141 +9085,6 @@ func (r apiGetAllAccessLogsRequest) Execute() (InlineResponse20020, *_nethttp.Re return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetAllRolesRequest struct { - ctx _context.Context - apiService *ManagementApiService -} - -/* -GetAllRoles List roles -List all roles. - - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - -@return apiGetAllRolesRequest -*/ -func (a *ManagementApiService) GetAllRoles(ctx _context.Context) apiGetAllRolesRequest { - return apiGetAllRolesRequest{ - apiService: a, - ctx: ctx, - } -} - -/* -Execute executes the request - - @return InlineResponse20044 -*/ -func (r apiGetAllRolesRequest) Execute() (InlineResponse20044, *_nethttp.Response, error) { - var ( - localVarHTTPMethod = _nethttp.MethodGet - localVarPostBody interface{} - localVarFormFileName string - localVarFileName string - localVarFileBytes []byte - localVarReturnValue InlineResponse20044 - ) - - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetAllRoles") - if err != nil { - return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v1/roles" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := _neturl.Values{} - localVarFormParams := _neturl.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if auth, ok := auth["Authorization"]; ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } - if r.ctx != nil { - // API Key Authentication - if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { - if auth, ok := auth["Authorization"]; ok { - var key string - if auth.Prefix != "" { - key = auth.Prefix + " " + auth.Key - } else { - key = auth.Key - } - localVarHeaderParams["Authorization"] = key - } - } - } - req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := r.apiService.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 200 { - var v InlineResponse20044 - err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - type apiGetApplicationRequest struct { ctx _context.Context apiService *ManagementApiService @@ -17187,23 +17178,23 @@ func (r apiGetReferralsWithoutTotalCountRequest) Execute() (InlineResponse20010, return localVarReturnValue, localVarHTTPResponse, nil } -type apiGetRoleRequest struct { +type apiGetRoleV2Request struct { ctx _context.Context apiService *ManagementApiService roleId int32 } /* -GetRole Get role -Get the details of a specific role. To see all the roles, use [List roles](#operation/getAllRoles). +GetRoleV2 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. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param roleId ID of role. **Note**: To find the ID of a role, use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint. + - @param roleId The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. -@return apiGetRoleRequest +@return apiGetRoleV2Request */ -func (a *ManagementApiService) GetRole(ctx _context.Context, roleId int32) apiGetRoleRequest { - return apiGetRoleRequest{ +func (a *ManagementApiService) GetRoleV2(ctx _context.Context, roleId int32) apiGetRoleV2Request { + return apiGetRoleV2Request{ apiService: a, ctx: ctx, roleId: roleId, @@ -17213,24 +17204,24 @@ func (a *ManagementApiService) GetRole(ctx _context.Context, roleId int32) apiGe /* Execute executes the request - @return Role + @return RoleV2 */ -func (r apiGetRoleRequest) Execute() (Role, *_nethttp.Response, error) { +func (r apiGetRoleV2Request) Execute() (RoleV2, *_nethttp.Response, error) { var ( localVarHTTPMethod = _nethttp.MethodGet localVarPostBody interface{} localVarFormFileName string localVarFileName string localVarFileBytes []byte - localVarReturnValue Role + localVarReturnValue RoleV2 ) - localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRole") + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.GetRoleV2") if err != nil { return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v1/roles/{roleId}" + localVarPath := localBasePath + "/v2/roles/{roleId}" localVarPath = strings.Replace(localVarPath, "{"+"roleId"+"}", _neturl.QueryEscape(parameterToString(r.roleId, "")), -1) localVarHeaderParams := make(map[string]string) @@ -17304,7 +17295,7 @@ func (r apiGetRoleRequest) Execute() (Role, *_nethttp.Response, error) { error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 200 { - var v Role + var v RoleV2 err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -19690,9 +19681,8 @@ The CSV file contains the following columns: - `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). + - `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. @@ -20796,6 +20786,133 @@ func (r apiImportReferralsRequest) Execute() (Import, *_nethttp.Response, error) return localVarReturnValue, localVarHTTPResponse, nil } +type apiInviteUserExternalRequest struct { + ctx _context.Context + apiService *ManagementApiService + body *NewExternalInvitation +} + +func (r apiInviteUserExternalRequest) Body(body NewExternalInvitation) apiInviteUserExternalRequest { + r.body = &body + return r +} + +/* +InviteUserExternal Invite user from identity provider +Invite a user from an external identity provider to Talon.One by sending an invitation to their email address. + + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return apiInviteUserExternalRequest +*/ +func (a *ManagementApiService) InviteUserExternal(ctx _context.Context) apiInviteUserExternalRequest { + return apiInviteUserExternalRequest{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request +*/ +func (r apiInviteUserExternalRequest) Execute() (*_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodPost + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.InviteUserExternal") + if err != nil { + return nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v1/users/invite" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + if r.body == nil { + return nil, reportError("body is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.body + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarHTTPResponse, newErr + } + + return localVarHTTPResponse, nil +} + type apiListAccountCollectionsRequest struct { ctx _context.Context apiService *ManagementApiService @@ -21176,6 +21293,141 @@ func (r apiListAchievementsRequest) Execute() (InlineResponse20046, *_nethttp.Re return localVarReturnValue, localVarHTTPResponse, nil } +type apiListAllRolesV2Request struct { + ctx _context.Context + apiService *ManagementApiService +} + +/* +ListAllRolesV2 List roles +List all roles. + - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + +@return apiListAllRolesV2Request +*/ +func (a *ManagementApiService) ListAllRolesV2(ctx _context.Context) apiListAllRolesV2Request { + return apiListAllRolesV2Request{ + apiService: a, + ctx: ctx, + } +} + +/* +Execute executes the request + + @return InlineResponse20044 +*/ +func (r apiListAllRolesV2Request) Execute() (InlineResponse20044, *_nethttp.Response, error) { + var ( + localVarHTTPMethod = _nethttp.MethodGet + localVarPostBody interface{} + localVarFormFileName string + localVarFileName string + localVarFileBytes []byte + localVarReturnValue InlineResponse20044 + ) + + localBasePath, err := r.apiService.client.cfg.ServerURLWithContext(r.ctx, "ManagementApiService.ListAllRolesV2") + if err != nil { + return localVarReturnValue, nil, GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v2/roles" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := _neturl.Values{} + localVarFormParams := _neturl.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if auth, ok := auth["Authorization"]; ok { + var key string + if auth.Prefix != "" { + key = auth.Prefix + " " + auth.Key + } else { + key = auth.Key + } + localVarHeaderParams["Authorization"] = key + } + } + } + req, err := r.apiService.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFormFileName, localVarFileName, localVarFileBytes) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := r.apiService.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := _ioutil.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 200 { + var v InlineResponse20044 + err = r.apiService.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = r.apiService.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + type apiListCatalogItemsRequest struct { ctx _context.Context apiService *ManagementApiService @@ -25371,7 +25623,7 @@ func (r apiUpdateRoleV2Request) Body(body RoleV2Base) apiUpdateRoleV2Request { UpdateRoleV2 Update role Update a specific role. - @param ctx _context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - - @param roleId The ID of role. + - @param roleId The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. @return apiUpdateRoleV2Request */ diff --git a/configuration.go b/configuration.go index b9cc4256..eb2d4610 100644 --- a/configuration.go +++ b/configuration.go @@ -97,7 +97,7 @@ type Configuration struct { func NewConfiguration() *Configuration { cfg := &Configuration{ DefaultHeader: make(map[string]string), - UserAgent: "OpenAPI-Generator/6.0.0/go", + UserAgent: "OpenAPI-Generator/7.0.0/go", Debug: false, Servers: ServerConfigurations{ { diff --git a/docs/ActivateUserRequest.md b/docs/ActivateUserRequest.md new file mode 100644 index 00000000..a0f3bb37 --- /dev/null +++ b/docs/ActivateUserRequest.md @@ -0,0 +1,39 @@ +# ActivateUserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | Pointer to **string** | The email address associated with the user profile. | + +## Methods + +### GetEmail + +`func (o *ActivateUserRequest) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *ActivateUserRequest) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *ActivateUserRequest) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *ActivateUserRequest) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Coupon.md b/docs/Coupon.md index 6d692be6..bb09d414 100644 --- a/docs/Coupon.md +++ b/docs/Coupon.md @@ -22,9 +22,9 @@ Name | Type | Description | Notes **ReferralId** | Pointer to **int32** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **RecipientIntegrationId** | Pointer to **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **ImportId** | Pointer to **int32** | The ID of the Import which created this coupon. | [optional] -**Reservation** | Pointer to **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**Reservation** | Pointer to **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** | Pointer to **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | Pointer to **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] ## Methods diff --git a/docs/CustomerInventory.md b/docs/CustomerInventory.md index bbf073cc..a1a049cf 100644 --- a/docs/CustomerInventory.md +++ b/docs/CustomerInventory.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **Profile** | Pointer to [**CustomerProfile**](CustomerProfile.md) | | [optional] **Loyalty** | Pointer to [**Loyalty**](Loyalty.md) | | [optional] **Referrals** | Pointer to [**[]InventoryReferral**](InventoryReferral.md) | | [optional] -**Coupons** | Pointer to [**[]InventoryCoupon**](InventoryCoupon.md) | The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. | [optional] +**Coupons** | Pointer to [**[]InventoryCoupon**](InventoryCoupon.md) | The coupons reserved by this profile. This array includes hard and soft reservations. | [optional] **Giveaways** | Pointer to [**[]Giveaway**](Giveaway.md) | | [optional] **Achievements** | Pointer to [**[]AchievementProgress**](AchievementProgress.md) | | [optional] diff --git a/docs/InlineResponse20044.md b/docs/InlineResponse20044.md index bc015a1a..9f3d0535 100644 --- a/docs/InlineResponse20044.md +++ b/docs/InlineResponse20044.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **TotalResultSize** | Pointer to **int32** | | -**Data** | Pointer to [**[]Role**](Role.md) | | +**Data** | Pointer to [**[]RoleV2**](RoleV2.md) | | ## Methods @@ -36,13 +36,13 @@ SetTotalResultSize gets a reference to the given int32 and assigns it to the Tot ### GetData -`func (o *InlineResponse20044) GetData() []Role` +`func (o *InlineResponse20044) GetData() []RoleV2` GetData returns the Data field if non-nil, zero value otherwise. ### GetDataOk -`func (o *InlineResponse20044) GetDataOk() ([]Role, bool)` +`func (o *InlineResponse20044) GetDataOk() ([]RoleV2, bool)` GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. @@ -55,9 +55,9 @@ HasData returns a boolean if a field has been set. ### SetData -`func (o *InlineResponse20044) SetData(v []Role)` +`func (o *InlineResponse20044) SetData(v []RoleV2)` -SetData gets a reference to the given []Role and assigns it to the Data field. +SetData gets a reference to the given []RoleV2 and assigns it to the Data field. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IntegrationApi.md b/docs/IntegrationApi.md index 5894779f..58c8a7f6 100644 --- a/docs/IntegrationApi.md +++ b/docs/IntegrationApi.md @@ -464,7 +464,7 @@ Name | Type | Description | Notes ## GetLoyaltyBalances -> LoyaltyBalances GetLoyaltyBalances(ctx, loyaltyProgramId, integrationId).EndDate(endDate).Execute() +> LoyaltyBalances GetLoyaltyBalances(ctx, loyaltyProgramId, integrationId).EndDate(endDate).SubledgerId(subledgerId).Execute() Get customer's loyalty points @@ -489,6 +489,7 @@ Name | Type | Description | Notes **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - 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. | + **subledgerId** | **string** | The ID of the subledger by which we filter the data. | ### Return type @@ -510,7 +511,7 @@ Name | Type | Description | Notes ## GetLoyaltyCardBalances -> LoyaltyBalances GetLoyaltyCardBalances(ctx, loyaltyProgramId, loyaltyCardId).EndDate(endDate).Execute() +> LoyaltyCardBalances GetLoyaltyCardBalances(ctx, loyaltyProgramId, loyaltyCardId).EndDate(endDate).SubledgerId(subledgerId).Execute() Get card's point balances @@ -535,10 +536,11 @@ Name | Type | Description | Notes **endDate** | **time.Time** | Used to return expired, active, and pending loyalty balances before this timestamp. You can enter any past, present, or future timestamp value. **Note:** - It must be an RFC3339 timestamp string. - 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. | + **subledgerId** | [**[]string**](string.md) | Filter results by one or more subledger IDs. Must be exact match. | ### Return type -[**LoyaltyBalances**](LoyaltyBalances.md) +[**LoyaltyCardBalances**](LoyaltyCardBalances.md) ### Authorization @@ -581,7 +583,7 @@ Name | Type | Description | Notes **status** | **string** | Filter points based on their status. | [default to active] - **subledgerId** | **string** | The ID of the subledger by which we filter the data. | + **subledgerId** | [**[]string**](string.md) | Filter results by one or more subledger IDs. Must be exact match. | **pageSize** | **int32** | The number of items in the response. | [default to 50] **skip** | **int32** | The number of items to skip when paging through large result sets. | @@ -629,7 +631,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **subledgerId** | **string** | The ID of the subledger by which we filter the data. | + **subledgerId** | [**[]string**](string.md) | Filter results by one or more subledger IDs. Must be exact match. | **loyaltyTransactionType** | **string** | Filter results by loyalty transaction type: - `manual`: Loyalty transaction that was done manually. - `session`: Loyalty transaction that resulted from a customer session. - `import`: Loyalty transaction that was imported from a CSV file. | **startDate** | **time.Time** | Date and time from which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | **endDate** | **time.Time** | Date and time by which results are returned. Results are filtered by transaction creation date. **Note:** - It must be an RFC3339 timestamp string. - You can include a time component in your string, for example, `T23:59:59` to specify the end of the day. The time zone setting considered is `UTC`. If you do not include a time component, a default time value of `T00:00:00` (midnight) in `UTC` is considered. | diff --git a/docs/IntegrationCoupon.md b/docs/IntegrationCoupon.md index d9efbe4b..165e6879 100644 --- a/docs/IntegrationCoupon.md +++ b/docs/IntegrationCoupon.md @@ -22,9 +22,9 @@ Name | Type | Description | Notes **ReferralId** | Pointer to **int32** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **RecipientIntegrationId** | Pointer to **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **ImportId** | Pointer to **int32** | The ID of the Import which created this coupon. | [optional] -**Reservation** | Pointer to **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**Reservation** | Pointer to **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** | Pointer to **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | Pointer to **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **ProfileRedemptionCount** | Pointer to **int32** | The number of times the coupon was redeemed by the profile. | diff --git a/docs/InventoryCoupon.md b/docs/InventoryCoupon.md index 971466e0..24fa4843 100644 --- a/docs/InventoryCoupon.md +++ b/docs/InventoryCoupon.md @@ -22,9 +22,9 @@ Name | Type | Description | Notes **ReferralId** | Pointer to **int32** | The integration ID of the referring customer (if any) for whom this coupon was created as an effect. | [optional] **RecipientIntegrationId** | Pointer to **string** | The Integration ID of the customer that is allowed to redeem this coupon. | [optional] **ImportId** | Pointer to **int32** | The ID of the Import which created this coupon. | [optional] -**Reservation** | Pointer to **bool** | Defines the type of reservation: - `true`: The reservation is a soft reservation. Any customer can use the coupon. This is done via the [Create coupon reservation](https://docs.talon.one/integration-api#operation/createCouponReservation) endpoint. - `false`: The reservation is a hard reservation. Only the associated customer (`recipientIntegrationId`) can use the coupon. This is done via the Campaign Manager when you create a coupon for a given `recipientIntegrationId`, the [Create coupons](https://docs.talon.one/management-api#operation/createCoupons) endpoint or [Create coupons for multiple recipients](https://docs.talon.one/management-api#operation/createCouponsForMultipleRecipients) endpoint. | [optional] [default to true] +**Reservation** | Pointer to **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** | Pointer to **string** | The id of the batch the coupon belongs to. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | Pointer to **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] **ProfileRedemptionCount** | Pointer to **int32** | The number of times the coupon was redeemed by the profile. | **State** | Pointer to **string** | Can be: - `active`: The coupon can be used. It is a reserved coupon that is 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 00000000..9962e11e --- /dev/null +++ b/docs/LoyaltyCardBalances.md @@ -0,0 +1,91 @@ +# LoyaltyCardBalances + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Balance** | Pointer to [**LoyaltyBalance**](LoyaltyBalance.md) | | [optional] +**SubledgerBalances** | Pointer to [**map[string]LoyaltyBalance**](LoyaltyBalance.md) | Map of the loyalty balances of the subledgers of a ledger. | [optional] +**Profiles** | Pointer to [**[]LoyaltyCardProfileRegistration**](LoyaltyCardProfileRegistration.md) | Customer profiles linked to the loyalty card. | [optional] + +## Methods + +### GetBalance + +`func (o *LoyaltyCardBalances) GetBalance() LoyaltyBalance` + +GetBalance returns the Balance field if non-nil, zero value otherwise. + +### GetBalanceOk + +`func (o *LoyaltyCardBalances) GetBalanceOk() (LoyaltyBalance, bool)` + +GetBalanceOk returns a tuple with the Balance field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasBalance + +`func (o *LoyaltyCardBalances) HasBalance() bool` + +HasBalance returns a boolean if a field has been set. + +### SetBalance + +`func (o *LoyaltyCardBalances) SetBalance(v LoyaltyBalance)` + +SetBalance gets a reference to the given LoyaltyBalance and assigns it to the Balance field. + +### GetSubledgerBalances + +`func (o *LoyaltyCardBalances) GetSubledgerBalances() map[string]LoyaltyBalance` + +GetSubledgerBalances returns the SubledgerBalances field if non-nil, zero value otherwise. + +### GetSubledgerBalancesOk + +`func (o *LoyaltyCardBalances) GetSubledgerBalancesOk() (map[string]LoyaltyBalance, bool)` + +GetSubledgerBalancesOk returns a tuple with the SubledgerBalances field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasSubledgerBalances + +`func (o *LoyaltyCardBalances) HasSubledgerBalances() bool` + +HasSubledgerBalances returns a boolean if a field has been set. + +### SetSubledgerBalances + +`func (o *LoyaltyCardBalances) SetSubledgerBalances(v map[string]LoyaltyBalance)` + +SetSubledgerBalances gets a reference to the given map[string]LoyaltyBalance and assigns it to the SubledgerBalances field. + +### GetProfiles + +`func (o *LoyaltyCardBalances) GetProfiles() []LoyaltyCardProfileRegistration` + +GetProfiles returns the Profiles field if non-nil, zero value otherwise. + +### GetProfilesOk + +`func (o *LoyaltyCardBalances) GetProfilesOk() ([]LoyaltyCardProfileRegistration, bool)` + +GetProfilesOk returns a tuple with the Profiles field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasProfiles + +`func (o *LoyaltyCardBalances) HasProfiles() bool` + +HasProfiles returns a boolean if a field has been set. + +### SetProfiles + +`func (o *LoyaltyCardBalances) SetProfiles(v []LoyaltyCardProfileRegistration)` + +SetProfiles gets a reference to the given []LoyaltyCardProfileRegistration and assigns it to the Profiles field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LoyaltyCardProfileRegistration.md b/docs/LoyaltyCardProfileRegistration.md index 36b2cdb9..3f16fca6 100644 --- a/docs/LoyaltyCardProfileRegistration.md +++ b/docs/LoyaltyCardProfileRegistration.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **IntegrationId** | Pointer to **string** | Integration ID of the customer profile linked to the card. | -**Timestamp** | Pointer to [**time.Time**](time.Time.md) | Timestamp of the registration to the card. | +**Timestamp** | Pointer to [**time.Time**](time.Time.md) | Timestamp the customer profile was linked to the card. | ## Methods diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index 35749e24..f3b9d5b3 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 @@ -155,6 +157,45 @@ Method | HTTP request | Description +## ActivateUserByEmail + +> ActivateUserByEmail(ctx).Body(body).Execute() + +Activate user by email address + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiActivateUserByEmailRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**ActivateUserRequest**](ActivateUserRequest.md) | body | + +### Return type + + (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## AddLoyaltyCardPoints > AddLoyaltyCardPoints(ctx, loyaltyProgramId, loyaltyCardId).Body(body).Execute() @@ -2569,41 +2610,6 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetAllRoles - -> InlineResponse20044 GetAllRoles(ctx).Execute() - -List roles - - - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetAllRolesRequest struct via the builder pattern - - -### Return type - -[**InlineResponse20044**](inline_response_200_44.md) - -### Authorization - -[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - ## GetApplication > Application GetApplication(ctx, applicationId).Execute() @@ -4679,9 +4685,9 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## GetRole +## GetRoleV2 -> Role GetRole(ctx, roleId).Execute() +> RoleV2 GetRoleV2(ctx, roleId).Execute() Get role @@ -4693,11 +4699,11 @@ Get role Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | ID of role. **Note**: To find the ID of a role, use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint. | +**roleId** | **int32** | The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. | ### Other Parameters -Other parameters are passed through a pointer to a apiGetRoleRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiGetRoleV2Request struct via the builder pattern Name | Type | Description | Notes @@ -4706,7 +4712,7 @@ Name | Type | Description | Notes ### Return type -[**Role**](Role.md) +[**RoleV2**](RoleV2.md) ### Authorization @@ -5579,6 +5585,45 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## InviteUserExternal + +> InviteUserExternal(ctx).Body(body).Execute() + +Invite user from identity provider + + + +### Path Parameters + + + +### Other Parameters + +Other parameters are passed through a pointer to a apiInviteUserExternalRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**NewExternalInvitation**](NewExternalInvitation.md) | body | + +### Return type + + (empty response body) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## ListAccountCollections > InlineResponse20017 ListAccountCollections(ctx).PageSize(pageSize).Skip(skip).Sort(sort).WithTotalResultSize(withTotalResultSize).Name(name).Execute() @@ -5670,6 +5715,41 @@ Name | Type | Description | Notes [[Back to README]](../README.md) +## ListAllRolesV2 + +> InlineResponse20044 ListAllRolesV2(ctx).Execute() + +List roles + + + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiListAllRolesV2Request struct via the builder pattern + + +### Return type + +[**InlineResponse20044**](inline_response_200_44.md) + +### Authorization + +[management_key](../README.md#management_key), [manager_auth](../README.md#manager_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + + ## ListCatalogItems > InlineResponse20035 ListCatalogItems(ctx, catalogId).PageSize(pageSize).Skip(skip).WithTotalResultSize(withTotalResultSize).Sku(sku).ProductNames(productNames).Execute() @@ -6765,7 +6845,7 @@ Update role Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**roleId** | **int32** | The ID of role. | +**roleId** | **int32** | The ID of role. **Note**: To find the ID of a role, use the [List roles](/management-api#tag/Roles/operation/listAllRolesV2) endpoint. | ### Other Parameters diff --git a/docs/MessageLogEntry.md b/docs/MessageLogEntry.md index 14529b34..69891304 100644 --- a/docs/MessageLogEntry.md +++ b/docs/MessageLogEntry.md @@ -12,8 +12,7 @@ Name | Type | Description | Notes **Request** | Pointer to [**MessageLogRequest**](MessageLogRequest.md) | | [optional] **Response** | Pointer to [**MessageLogResponse**](MessageLogResponse.md) | | [optional] **CreatedAt** | Pointer to [**time.Time**](time.Time.md) | Timestamp when the log entry was created. | -**EntityType** | Pointer to **string** | The entity type the log is related to. | [optional] -**Url** | Pointer to **string** | The target URL of the request. | [optional] +**EntityType** | Pointer to **string** | The entity type the notification is related to. | [optional] **ApplicationId** | Pointer to **int32** | Identifier of the Application. | [optional] **LoyaltyProgramId** | Pointer to **int32** | Identifier of the loyalty program. | [optional] @@ -244,31 +243,6 @@ HasEntityType returns a boolean if a field has been set. SetEntityType gets a reference to the given string and assigns it to the EntityType field. -### GetUrl - -`func (o *MessageLogEntry) GetUrl() string` - -GetUrl returns the Url field if non-nil, zero value otherwise. - -### GetUrlOk - -`func (o *MessageLogEntry) GetUrlOk() (string, bool)` - -GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### HasUrl - -`func (o *MessageLogEntry) HasUrl() bool` - -HasUrl returns a boolean if a field has been set. - -### SetUrl - -`func (o *MessageLogEntry) SetUrl(v string)` - -SetUrl gets a reference to the given string and assigns it to the Url field. - ### GetApplicationId `func (o *MessageLogEntry) GetApplicationId() int32` diff --git a/docs/NewCoupons.md b/docs/NewCoupons.md index 89329548..b0493fa3 100644 --- a/docs/NewCoupons.md +++ b/docs/NewCoupons.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **RecipientIntegrationId** | Pointer to **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **ValidCharacters** | Pointer to **[]string** | List of characters used to generate the random parts of a code. By default, the list of characters is equivalent to the `[A-Z, 0-9]` regular expression. | [optional] **CouponPattern** | Pointer to **string** | The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | Pointer to **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] ## Methods diff --git a/docs/NewExternalInvitation.md b/docs/NewExternalInvitation.md new file mode 100644 index 00000000..2c6359c6 --- /dev/null +++ b/docs/NewExternalInvitation.md @@ -0,0 +1,91 @@ +# NewExternalInvitation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | Pointer to **string** | Name of the user. | [optional] +**UserGroups** | Pointer to **[]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** | Pointer to **string** | Email address of the user. | + +## Methods + +### GetName + +`func (o *NewExternalInvitation) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *NewExternalInvitation) GetNameOk() (string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasName + +`func (o *NewExternalInvitation) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetName + +`func (o *NewExternalInvitation) SetName(v string)` + +SetName gets a reference to the given string and assigns it to the Name field. + +### GetUserGroups + +`func (o *NewExternalInvitation) GetUserGroups() []string` + +GetUserGroups returns the UserGroups field if non-nil, zero value otherwise. + +### GetUserGroupsOk + +`func (o *NewExternalInvitation) GetUserGroupsOk() ([]string, bool)` + +GetUserGroupsOk returns a tuple with the UserGroups field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasUserGroups + +`func (o *NewExternalInvitation) HasUserGroups() bool` + +HasUserGroups returns a boolean if a field has been set. + +### SetUserGroups + +`func (o *NewExternalInvitation) SetUserGroups(v []string)` + +SetUserGroups gets a reference to the given []string and assigns it to the UserGroups field. + +### GetEmail + +`func (o *NewExternalInvitation) GetEmail() string` + +GetEmail returns the Email field if non-nil, zero value otherwise. + +### GetEmailOk + +`func (o *NewExternalInvitation) GetEmailOk() (string, bool)` + +GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### HasEmail + +`func (o *NewExternalInvitation) HasEmail() bool` + +HasEmail returns a boolean if a field has been set. + +### SetEmail + +`func (o *NewExternalInvitation) SetEmail(v string)` + +SetEmail gets a reference to the given string and assigns it to the Email field. + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateCoupon.md b/docs/UpdateCoupon.md index 745f423d..d6cd7277 100644 --- a/docs/UpdateCoupon.md +++ b/docs/UpdateCoupon.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **Limits** | Pointer to [**[]LimitConfig**](LimitConfig.md) | Limits configuration for a coupon. These limits will override the limits set from the campaign. **Note:** Only usable when creating a single coupon which is not tied to a specific recipient. Only per-profile limits are allowed to be configured. | [optional] **RecipientIntegrationId** | Pointer to **string** | The integration ID for this coupon's beneficiary's profile. | [optional] **Attributes** | Pointer to [**map[string]interface{}**](.md) | Arbitrary properties associated with this item. | [optional] -**IsReservationMandatory** | Pointer to **bool** | Whether the reservation effect actually created a new reservation. | [optional] [default to false] +**IsReservationMandatory** | Pointer to **bool** | An indication of whether the code can be redeemed only if it has been reserved first. | [optional] [default to false] **ImplicitlyReserved** | Pointer to **bool** | An indication of whether the coupon is implicitly reserved for all customers. | [optional] ## Methods diff --git a/docs/UpdateUser.md b/docs/UpdateUser.md index 3dcca24c..1d484773 100644 --- a/docs/UpdateUser.md +++ b/docs/UpdateUser.md @@ -8,7 +8,7 @@ Name | Type | Description | Notes **State** | Pointer to **string** | The state of the user. - `deactivated`: The user has been deactivated. - `active`: The user is active. **Note**: Only `admin` users can update the state of another user. | [optional] **IsAdmin** | Pointer to **bool** | Indicates whether the user is an `admin`. | [optional] **Policy** | Pointer to **string** | Indicates the access level of the user. | [optional] -**Roles** | Pointer to **[]int32** | A list of the IDs of the roles assigned to the user. **Note**: Use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint to find the ID of a role. | [optional] +**Roles** | Pointer to **[]int32** | 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** | Pointer to [**map[string]interface{}**](.md) | Application notifications that the user is subscribed to. | [optional] ## Methods diff --git a/go.mod b/go.mod index 20bde2aa..6a3dccf4 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/talon-one/talon_go/v6 +module github.com/talon-one/talon_go/v7 go 1.13 diff --git a/model_activate_user_request.go b/model_activate_user_request.go new file mode 100644 index 00000000..a44a2f36 --- /dev/null +++ b/model_activate_user_request.go @@ -0,0 +1,59 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// ActivateUserRequest +type ActivateUserRequest struct { + // The email address associated with the user profile. + Email string `json:"email"` +} + +// GetEmail returns the Email field value +func (o *ActivateUserRequest) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// SetEmail sets field value +func (o *ActivateUserRequest) SetEmail(v string) { + o.Email = v +} + +type NullableActivateUserRequest struct { + Value ActivateUserRequest + ExplicitNull bool +} + +func (v NullableActivateUserRequest) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableActivateUserRequest) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_coupon.go b/model_coupon.go index 9459d30d..4a76fb91 100644 --- a/model_coupon.go +++ b/model_coupon.go @@ -53,11 +53,11 @@ type Coupon struct { RecipientIntegrationId *string `json:"recipientIntegrationId,omitempty"` // The ID of the Import which created this coupon. ImportId *int32 `json:"importId,omitempty"` - // 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. Reservation *bool `json:"reservation,omitempty"` // The id of the batch the coupon belongs to. BatchId *string `json:"batchId,omitempty"` - // 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. IsReservationMandatory *bool `json:"isReservationMandatory,omitempty"` // An indication of whether the coupon is implicitly reserved for all customers. ImplicitlyReserved *bool `json:"implicitlyReserved,omitempty"` diff --git a/model_customer_inventory.go b/model_customer_inventory.go index 7b31bddc..8bd1ce56 100644 --- a/model_customer_inventory.go +++ b/model_customer_inventory.go @@ -19,7 +19,7 @@ type CustomerInventory struct { Profile *CustomerProfile `json:"profile,omitempty"` Loyalty *Loyalty `json:"loyalty,omitempty"` Referrals *[]InventoryReferral `json:"referrals,omitempty"` - // The coupons reserved by this profile. This array includes hard and soft reservations. See each coupon's `reservation` property. + // The coupons reserved by this profile. This array includes hard and soft reservations. Coupons *[]InventoryCoupon `json:"coupons,omitempty"` Giveaways *[]Giveaway `json:"giveaways,omitempty"` Achievements *[]AchievementProgress `json:"achievements,omitempty"` diff --git a/model_inline_response_200_44.go b/model_inline_response_200_44.go index f279af7d..510f99b4 100644 --- a/model_inline_response_200_44.go +++ b/model_inline_response_200_44.go @@ -16,8 +16,8 @@ import ( // InlineResponse20044 struct for InlineResponse20044 type InlineResponse20044 struct { - TotalResultSize int32 `json:"totalResultSize"` - Data []Role `json:"data"` + TotalResultSize int32 `json:"totalResultSize"` + Data []RoleV2 `json:"data"` } // GetTotalResultSize returns the TotalResultSize field value @@ -36,9 +36,9 @@ func (o *InlineResponse20044) SetTotalResultSize(v int32) { } // GetData returns the Data field value -func (o *InlineResponse20044) GetData() []Role { +func (o *InlineResponse20044) GetData() []RoleV2 { if o == nil { - var ret []Role + var ret []RoleV2 return ret } @@ -46,7 +46,7 @@ func (o *InlineResponse20044) GetData() []Role { } // SetData sets field value -func (o *InlineResponse20044) SetData(v []Role) { +func (o *InlineResponse20044) SetData(v []RoleV2) { o.Data = v } diff --git a/model_integration_coupon.go b/model_integration_coupon.go index 4a785511..d0986e23 100644 --- a/model_integration_coupon.go +++ b/model_integration_coupon.go @@ -53,11 +53,11 @@ type IntegrationCoupon struct { RecipientIntegrationId *string `json:"recipientIntegrationId,omitempty"` // The ID of the Import which created this coupon. ImportId *int32 `json:"importId,omitempty"` - // 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. Reservation *bool `json:"reservation,omitempty"` // The id of the batch the coupon belongs to. BatchId *string `json:"batchId,omitempty"` - // 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. IsReservationMandatory *bool `json:"isReservationMandatory,omitempty"` // An indication of whether the coupon is implicitly reserved for all customers. ImplicitlyReserved *bool `json:"implicitlyReserved,omitempty"` diff --git a/model_inventory_coupon.go b/model_inventory_coupon.go index 6474e873..1cb2c9e7 100644 --- a/model_inventory_coupon.go +++ b/model_inventory_coupon.go @@ -53,11 +53,11 @@ type InventoryCoupon struct { RecipientIntegrationId *string `json:"recipientIntegrationId,omitempty"` // The ID of the Import which created this coupon. ImportId *int32 `json:"importId,omitempty"` - // 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. Reservation *bool `json:"reservation,omitempty"` // The id of the batch the coupon belongs to. BatchId *string `json:"batchId,omitempty"` - // 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. IsReservationMandatory *bool `json:"isReservationMandatory,omitempty"` // An indication of whether the coupon is implicitly reserved for all customers. ImplicitlyReserved *bool `json:"implicitlyReserved,omitempty"` diff --git a/model_loyalty_card_balances.go b/model_loyalty_card_balances.go new file mode 100644 index 00000000..75ce2eaa --- /dev/null +++ b/model_loyalty_card_balances.go @@ -0,0 +1,146 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// LoyaltyCardBalances +type LoyaltyCardBalances struct { + Balance *LoyaltyBalance `json:"balance,omitempty"` + // Map of the loyalty balances of the subledgers of a ledger. + SubledgerBalances *map[string]LoyaltyBalance `json:"subledgerBalances,omitempty"` + // Customer profiles linked to the loyalty card. + Profiles *[]LoyaltyCardProfileRegistration `json:"profiles,omitempty"` +} + +// GetBalance returns the Balance field value if set, zero value otherwise. +func (o *LoyaltyCardBalances) GetBalance() LoyaltyBalance { + if o == nil || o.Balance == nil { + var ret LoyaltyBalance + return ret + } + return *o.Balance +} + +// GetBalanceOk returns a tuple with the Balance field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyCardBalances) GetBalanceOk() (LoyaltyBalance, bool) { + if o == nil || o.Balance == nil { + var ret LoyaltyBalance + return ret, false + } + return *o.Balance, true +} + +// HasBalance returns a boolean if a field has been set. +func (o *LoyaltyCardBalances) HasBalance() bool { + if o != nil && o.Balance != nil { + return true + } + + return false +} + +// SetBalance gets a reference to the given LoyaltyBalance and assigns it to the Balance field. +func (o *LoyaltyCardBalances) SetBalance(v LoyaltyBalance) { + o.Balance = &v +} + +// GetSubledgerBalances returns the SubledgerBalances field value if set, zero value otherwise. +func (o *LoyaltyCardBalances) GetSubledgerBalances() map[string]LoyaltyBalance { + if o == nil || o.SubledgerBalances == nil { + var ret map[string]LoyaltyBalance + return ret + } + return *o.SubledgerBalances +} + +// GetSubledgerBalancesOk returns a tuple with the SubledgerBalances field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyCardBalances) GetSubledgerBalancesOk() (map[string]LoyaltyBalance, bool) { + if o == nil || o.SubledgerBalances == nil { + var ret map[string]LoyaltyBalance + return ret, false + } + return *o.SubledgerBalances, true +} + +// HasSubledgerBalances returns a boolean if a field has been set. +func (o *LoyaltyCardBalances) HasSubledgerBalances() bool { + if o != nil && o.SubledgerBalances != nil { + return true + } + + return false +} + +// SetSubledgerBalances gets a reference to the given map[string]LoyaltyBalance and assigns it to the SubledgerBalances field. +func (o *LoyaltyCardBalances) SetSubledgerBalances(v map[string]LoyaltyBalance) { + o.SubledgerBalances = &v +} + +// GetProfiles returns the Profiles field value if set, zero value otherwise. +func (o *LoyaltyCardBalances) GetProfiles() []LoyaltyCardProfileRegistration { + if o == nil || o.Profiles == nil { + var ret []LoyaltyCardProfileRegistration + return ret + } + return *o.Profiles +} + +// GetProfilesOk returns a tuple with the Profiles field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *LoyaltyCardBalances) GetProfilesOk() ([]LoyaltyCardProfileRegistration, bool) { + if o == nil || o.Profiles == nil { + var ret []LoyaltyCardProfileRegistration + return ret, false + } + return *o.Profiles, true +} + +// HasProfiles returns a boolean if a field has been set. +func (o *LoyaltyCardBalances) HasProfiles() bool { + if o != nil && o.Profiles != nil { + return true + } + + return false +} + +// SetProfiles gets a reference to the given []LoyaltyCardProfileRegistration and assigns it to the Profiles field. +func (o *LoyaltyCardBalances) SetProfiles(v []LoyaltyCardProfileRegistration) { + o.Profiles = &v +} + +type NullableLoyaltyCardBalances struct { + Value LoyaltyCardBalances + ExplicitNull bool +} + +func (v NullableLoyaltyCardBalances) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableLoyaltyCardBalances) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_loyalty_card_profile_registration.go b/model_loyalty_card_profile_registration.go index 2e787cb0..890bf959 100644 --- a/model_loyalty_card_profile_registration.go +++ b/model_loyalty_card_profile_registration.go @@ -19,7 +19,7 @@ import ( type LoyaltyCardProfileRegistration struct { // Integration ID of the customer profile linked to the card. IntegrationId string `json:"integrationId"` - // Timestamp of the registration to the card. + // Timestamp the customer profile was linked to the card. Timestamp time.Time `json:"timestamp"` } diff --git a/model_message_log_entry.go b/model_message_log_entry.go index 6e3426d2..52276ed9 100644 --- a/model_message_log_entry.go +++ b/model_message_log_entry.go @@ -31,10 +31,8 @@ type MessageLogEntry struct { Response *MessageLogResponse `json:"response,omitempty"` // Timestamp when the log entry was created. CreatedAt time.Time `json:"createdAt"` - // The entity type the log is related to. + // The entity type the notification is related to. EntityType *string `json:"entityType,omitempty"` - // The target URL of the request. - Url *string `json:"url,omitempty"` // Identifier of the Application. ApplicationId *int32 `json:"applicationId,omitempty"` // Identifier of the loyalty program. @@ -284,39 +282,6 @@ func (o *MessageLogEntry) SetEntityType(v string) { o.EntityType = &v } -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *MessageLogEntry) GetUrl() string { - if o == nil || o.Url == nil { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, zero value otherwise -// and a boolean to check if the value has been set. -func (o *MessageLogEntry) GetUrlOk() (string, bool) { - if o == nil || o.Url == nil { - var ret string - return ret, false - } - return *o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *MessageLogEntry) HasUrl() bool { - if o != nil && o.Url != nil { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *MessageLogEntry) SetUrl(v string) { - o.Url = &v -} - // GetApplicationId returns the ApplicationId field value if set, zero value otherwise. func (o *MessageLogEntry) GetApplicationId() int32 { if o == nil || o.ApplicationId == nil { diff --git a/model_new_coupons.go b/model_new_coupons.go index 56437e66..e1a88bfa 100644 --- a/model_new_coupons.go +++ b/model_new_coupons.go @@ -41,7 +41,7 @@ type NewCoupons struct { ValidCharacters *[]string `json:"validCharacters,omitempty"` // The pattern used to generate coupon codes. The character `#` is a placeholder and is replaced by a random character from the `validCharacters` set. CouponPattern *string `json:"couponPattern,omitempty"` - // 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. IsReservationMandatory *bool `json:"isReservationMandatory,omitempty"` // An indication of whether the coupon is implicitly reserved for all customers. ImplicitlyReserved *bool `json:"implicitlyReserved,omitempty"` diff --git a/model_new_external_invitation.go b/model_new_external_invitation.go new file mode 100644 index 00000000..a1cf9228 --- /dev/null +++ b/model_new_external_invitation.go @@ -0,0 +1,129 @@ +/* + * Talon.One API + * + * Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}` + * + * API version: + * Generated by: OpenAPI Generator (https://openapi-generator.tech) + */ + +package talon + +import ( + "bytes" + "encoding/json" +) + +// NewExternalInvitation Parameters for inviting a new user from an external identity provider. +type NewExternalInvitation struct { + // Name of the user. + Name *string `json:"name,omitempty"` + // 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. + UserGroups *[]string `json:"userGroups,omitempty"` + // Email address of the user. + Email string `json:"email"` +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *NewExternalInvitation) GetName() string { + if o == nil || o.Name == nil { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewExternalInvitation) GetNameOk() (string, bool) { + if o == nil || o.Name == nil { + var ret string + return ret, false + } + return *o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *NewExternalInvitation) HasName() bool { + if o != nil && o.Name != nil { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *NewExternalInvitation) SetName(v string) { + o.Name = &v +} + +// GetUserGroups returns the UserGroups field value if set, zero value otherwise. +func (o *NewExternalInvitation) GetUserGroups() []string { + if o == nil || o.UserGroups == nil { + var ret []string + return ret + } + return *o.UserGroups +} + +// GetUserGroupsOk returns a tuple with the UserGroups field value if set, zero value otherwise +// and a boolean to check if the value has been set. +func (o *NewExternalInvitation) GetUserGroupsOk() ([]string, bool) { + if o == nil || o.UserGroups == nil { + var ret []string + return ret, false + } + return *o.UserGroups, true +} + +// HasUserGroups returns a boolean if a field has been set. +func (o *NewExternalInvitation) HasUserGroups() bool { + if o != nil && o.UserGroups != nil { + return true + } + + return false +} + +// SetUserGroups gets a reference to the given []string and assigns it to the UserGroups field. +func (o *NewExternalInvitation) SetUserGroups(v []string) { + o.UserGroups = &v +} + +// GetEmail returns the Email field value +func (o *NewExternalInvitation) GetEmail() string { + if o == nil { + var ret string + return ret + } + + return o.Email +} + +// SetEmail sets field value +func (o *NewExternalInvitation) SetEmail(v string) { + o.Email = v +} + +type NullableNewExternalInvitation struct { + Value NewExternalInvitation + ExplicitNull bool +} + +func (v NullableNewExternalInvitation) MarshalJSON() ([]byte, error) { + switch { + case v.ExplicitNull: + return []byte("null"), nil + default: + return json.Marshal(v.Value) + } +} + +func (v *NullableNewExternalInvitation) UnmarshalJSON(src []byte) error { + if bytes.Equal(src, []byte("null")) { + v.ExplicitNull = true + return nil + } + + return json.Unmarshal(src, &v.Value) +} diff --git a/model_update_coupon.go b/model_update_coupon.go index c129d7c0..98ed7f2f 100644 --- a/model_update_coupon.go +++ b/model_update_coupon.go @@ -33,7 +33,7 @@ type UpdateCoupon struct { RecipientIntegrationId *string `json:"recipientIntegrationId,omitempty"` // Arbitrary properties associated with this item. Attributes *map[string]interface{} `json:"attributes,omitempty"` - // 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. IsReservationMandatory *bool `json:"isReservationMandatory,omitempty"` // An indication of whether the coupon is implicitly reserved for all customers. ImplicitlyReserved *bool `json:"implicitlyReserved,omitempty"` diff --git a/model_update_user.go b/model_update_user.go index d4a6c9d1..4cb4f5be 100644 --- a/model_update_user.go +++ b/model_update_user.go @@ -24,7 +24,7 @@ type UpdateUser struct { IsAdmin *bool `json:"isAdmin,omitempty"` // Indicates the access level of the user. Policy *string `json:"policy,omitempty"` - // A list of the IDs of the roles assigned to the user. **Note**: Use the [List roles](https://docs.talon.one/management-api#tag/Roles/operation/getAllRoles) endpoint to find the ID of a role. + // 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. Roles *[]int32 `json:"roles,omitempty"` // Application notifications that the user is subscribed to. ApplicationNotificationSubscriptions *map[string]interface{} `json:"applicationNotificationSubscriptions,omitempty"`