From f1dc556f3c5d6a0592dc3814512ca24333d611ca Mon Sep 17 00:00:00 2001 From: "Jakob (Koby) Shimony" Date: Wed, 27 Nov 2019 16:59:18 +0100 Subject: [PATCH] v1.3.0 (#5) - More filtering parameters when querying changes endpoint - The full `Coupon` object is now returned as part of an integration response - Support for new limit configuration of amount of give discount effects --- README.md | 6 +- api/swagger.yaml | 437 ++++++++++++++++++++++++-------- api_management.go | 25 ++ configuration.go | 2 +- docs/Application.md | 2 +- docs/Campaign.md | 2 + docs/InlineResponse20025.md | 3 +- docs/IntegrationState.md | 1 + docs/ManagementApi.md | 5 + docs/NewApplication.md | 2 +- docs/NewSamlConnection.md | 17 ++ docs/SamlConnection.md | 21 ++ docs/UpdateApplication.md | 16 ++ docs/User.md | 1 + model_application.go | 4 +- model_campaign.go | 4 + model_inline_response_200_25.go | 3 +- model_integration_state.go | 1 + model_new_application.go | 5 +- model_new_saml_connection.go | 30 +++ model_saml_connection.go | 41 +++ model_update_application.go | 27 ++ model_user.go | 2 + 23 files changed, 538 insertions(+), 119 deletions(-) create mode 100644 docs/NewSamlConnection.md create mode 100644 docs/SamlConnection.md create mode 100644 docs/UpdateApplication.md create mode 100644 model_new_saml_connection.go create mode 100644 model_saml_connection.go create mode 100644 model_update_application.go diff --git a/README.md b/README.md index 231ce970..54919bf7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ The Talon.One API is used to manage applications and campaigns, as well as to in This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. - API version: 1.0.0 -- Package version: 1.2.0 +- Package version: 1.3.0 - Build package: io.swagger.codegen.languages.GoClientCodegen ## Installation @@ -14,6 +14,7 @@ Put the package under your project folder and add the following in import: ```golang import "./talon" ``` + ## Getting Started ### Integration API @@ -337,6 +338,7 @@ Class | Method | HTTP request | Description - [NewReferral](docs/NewReferral.md) - [NewRole](docs/NewRole.md) - [NewRuleset](docs/NewRuleset.md) + - [NewSamlConnection](docs/NewSamlConnection.md) - [NewTemplateDef](docs/NewTemplateDef.md) - [NewUser](docs/NewUser.md) - [NewWebhook](docs/NewWebhook.md) @@ -349,11 +351,13 @@ Class | Method | HTTP request | Description - [RoleMembership](docs/RoleMembership.md) - [Rule](docs/Rule.md) - [Ruleset](docs/Ruleset.md) + - [SamlConnection](docs/SamlConnection.md) - [Session](docs/Session.md) - [SlotDef](docs/SlotDef.md) - [TemplateArgDef](docs/TemplateArgDef.md) - [TemplateDef](docs/TemplateDef.md) - [UpdateAccount](docs/UpdateAccount.md) + - [UpdateApplication](docs/UpdateApplication.md) - [UpdateCampaign](docs/UpdateCampaign.md) - [UpdateCoupon](docs/UpdateCoupon.md) - [UpdateCouponBatch](docs/UpdateCouponBatch.md) diff --git a/api/swagger.yaml b/api/swagger.yaml index d3b03a96..49527c65 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -4713,6 +4713,50 @@ paths: type: "string" x-exportParamName: "Sort" x-optionalDataType: "String" + - name: "applicationId" + in: "query" + required: false + type: "integer" + x-exportParamName: "ApplicationId" + x-optionalDataType: "Int32" + - name: "createdBefore" + in: "query" + description: "Filter results comparing the parameter value, expected to be\ + \ an RFC3339 timestamp string, to the change creation timestamp." + required: false + type: "string" + format: "date-time" + x-exportParamName: "CreatedBefore" + x-optionalDataType: "Time" + - name: "createdAfter" + in: "query" + description: "Filter results comparing the parameter value, expected to be\ + \ an RFC3339 timestamp string, to the change creation timestamp." + required: false + type: "string" + format: "date-time" + x-exportParamName: "CreatedAfter" + x-optionalDataType: "Time" + - name: "withTotalResultSize" + in: "query" + description: "When this flag is set, the result will include the total size\ + \ of the result, across all pages. This might decrease performance on large\ + \ data sets.\nWith this flag set to true, hasMore will be be true whenever\ + \ there is a next page. totalResultSize will always be zero.\nWith this\ + \ flag set to false, hasMore will always be set to false. totalResultSize\ + \ will contain the total number of results for this query.\n" + required: false + type: "boolean" + x-exportParamName: "WithTotalResultSize" + x-optionalDataType: "Bool" + - name: "includeOld" + in: "query" + description: "When this flag is set to false, the state without the change\ + \ will not be returned. The default value is true." + required: false + type: "boolean" + x-exportParamName: "IncludeOld" + x-optionalDataType: "Bool" responses: 200: description: "OK" @@ -4720,10 +4764,11 @@ paths: type: "object" required: - "data" - - "totalResultSize" properties: totalResultSize: type: "integer" + hasMore: + type: "boolean" data: type: "array" items: @@ -5328,11 +5373,10 @@ definitions: example: password: "password" email: "email" - NewApplication: + UpdateApplication: type: "object" required: - "currency" - - "key" - "name" - "timezone" properties: @@ -5343,13 +5387,45 @@ definitions: description: type: "string" description: "A longer description of the application." - key: + timezone: type: "string" - description: "Hex key for HMAC-signing API calls as coming from this application\ - \ (16 hex digits)" - minLength: 16 - maxLength: 16 - pattern: "^[a-fA-F0-9]{16}$" + description: "A string containing an IANA timezone descriptor." + minLength: 1 + currency: + type: "string" + description: "A string describing a default currency for new customer sessions." + minLength: 1 + caseSensitivity: + type: "string" + description: "A string indicating how should campaigns in this application\ + \ deal with case sensitivity on coupon codes." + enum: + - "sensitive" + - "insensitive-uppercase" + - "insensitive-lowercase" + attributes: + type: "object" + description: "Arbitrary properties associated with this campaign" + properties: {} + limits: + type: "array" + description: "Default limits for campaigns created in this application" + items: + $ref: "#/definitions/LimitConfig" + NewApplication: + type: "object" + required: + - "currency" + - "name" + - "timezone" + properties: + name: + type: "string" + description: "The name of this application." + minLength: 1 + description: + type: "string" + description: "A longer description of the application." timezone: type: "string" description: "A string containing an IANA timezone descriptor." @@ -5375,6 +5451,14 @@ definitions: description: "Default limits for campaigns created in this application" items: $ref: "#/definitions/LimitConfig" + key: + type: "string" + description: "Hex key for HMAC-signing API calls as coming from this application\ + \ (16 hex digits)" + minLength: 16 + maxLength: 16 + pattern: "^[a-fA-F0-9]{16}$" + description: "" Application: type: "object" required: @@ -5409,13 +5493,6 @@ definitions: description: type: "string" description: "A longer description of the application." - key: - type: "string" - description: "Hex key for HMAC-signing API calls as coming from this application\ - \ (16 hex digits)" - minLength: 16 - maxLength: 16 - pattern: "^[a-fA-F0-9]{16}$" timezone: type: "string" description: "A string containing an IANA timezone descriptor." @@ -5441,6 +5518,13 @@ definitions: description: "Default limits for campaigns created in this application" items: $ref: "#/definitions/LimitConfig" + key: + type: "string" + description: "Hex key for HMAC-signing API calls as coming from this application\ + \ (16 hex digits)" + minLength: 16 + maxLength: 16 + pattern: "^[a-fA-F0-9]{16}$" loyaltyPrograms: type: "array" description: "An array containing all the loyalty programs to which this application\ @@ -5480,7 +5564,6 @@ definitions: currency: "currency" attributes: "{}" id: 6 - key: "key" limits: - entities: - "Coupon" @@ -5492,6 +5575,7 @@ definitions: - "Coupon" limit: 0.59621339166831821554382031536079011857509613037109375 action: "redeemCoupon" + key: "key" NewCampaign: type: "object" required: @@ -5816,6 +5900,12 @@ definitions: discountCount: type: "integer" description: "Total amount of discounts redeemed in the campaign." + discountEffectCount: + type: "integer" + description: "Total number of times discounts were redeemed in this campaign." + couponCreationCount: + type: "integer" + description: "Total number of coupons created by rules in this campaign." lastActivity: type: "string" format: "date-time" @@ -5833,13 +5923,37 @@ definitions: description: "Name of the user who last updated this campaign if available." description: "" example: + discountCount: 9 + description: "description" + features: + - "coupons" + - "coupons" + - "coupons" + couponSettings: + couponPattern: "couponPattern" + validCharacters: + - "validCharacters" + - "validCharacters" + startTime: "2000-01-23T04:56:07.000+00:00" + id: 6 + state: "enabled" + limits: + - entities: + - "Coupon" + - "Coupon" + limit: 0.59621339166831821554382031536079011857509613037109375 + action: "redeemCoupon" + - entities: + - "Coupon" + - "Coupon" + limit: 0.59621339166831821554382031536079011857509613037109375 + action: "redeemCoupon" activeRulesetId: 5 updatedBy: "updatedBy" created: "2000-01-23T04:56:07.000+00:00" - discountCount: 9 - description: "description" couponRedemptionCount: 2 userId: 5 + couponCreationCount: 2 tags: - "tags" - "tags" @@ -5851,10 +5965,7 @@ definitions: - "tags" - "tags" - "tags" - features: - - "coupons" - - "coupons" - - "coupons" + discountEffectCount: 3 createdBy: "createdBy" name: "name" referralSettings: @@ -5862,31 +5973,12 @@ definitions: validCharacters: - "validCharacters" - "validCharacters" - couponSettings: - couponPattern: "couponPattern" - validCharacters: - - "validCharacters" - - "validCharacters" - startTime: "2000-01-23T04:56:07.000+00:00" attributes: "{}" lastActivity: "2000-01-23T04:56:07.000+00:00" - id: 6 endTime: "2000-01-23T04:56:07.000+00:00" - state: "enabled" applicationId: 1 referralRedemptionCount: 7 updated: "2000-01-23T04:56:07.000+00:00" - limits: - - entities: - - "Coupon" - - "Coupon" - limit: 0.59621339166831821554382031536079011857509613037109375 - action: "redeemCoupon" - - entities: - - "Coupon" - - "Coupon" - limit: 0.59621339166831821554382031536079011857509613037109375 - action: "redeemCoupon" NewRuleset: type: "object" required: @@ -6153,6 +6245,7 @@ definitions: - "redeemReferral" - "setDiscount" - "createCoupon" + - "setDiscountEffect" limit: type: "number" description: "The value to set for the limit" @@ -6645,15 +6738,15 @@ definitions: recipientIntegrationId: "recipientIntegrationId" created: "2000-01-23T04:56:07.000+00:00" campaignId: 6 - usageLimit: 146581 - referralId: 5 - usageCounter: 5 + usageLimit: 594488 + referralId: 3 + usageCounter: 6 batchId: "batchId" expiryDate: "2000-01-23T04:56:07.000+00:00" - importId: 2 + importId: 3 reservation: true attributes: "{}" - id: 0 + id: 6 value: "value" startDate: "2000-01-23T04:56:07.000+00:00" CampaignAnalytics: @@ -6957,6 +7050,9 @@ definitions: applicationNotificationSubscriptions: type: "object" properties: {} + authMethod: + type: "string" + description: "The Authentication method for this user" description: "" example: releaseUpdate: true @@ -6971,6 +7067,7 @@ definitions: modified: "2000-01-23T04:56:07.000+00:00" id: 6 state: "invited" + authMethod: "authMethod" latestFeature: "latestFeature" email: "email" policy: "policy" @@ -8138,9 +8235,26 @@ definitions: $ref: "#/definitions/Event" loyalty: $ref: "#/definitions/Loyalty" + coupon: + $ref: "#/definitions/Coupon" description: "Contains all state that might interest application integration plugins.\ \ This is the response type returned by all of the Integration API operations.\n" example: + coupon: + recipientIntegrationId: "recipientIntegrationId" + created: "2000-01-23T04:56:07.000+00:00" + campaignId: 6 + usageLimit: 594488 + referralId: 3 + usageCounter: 6 + batchId: "batchId" + expiryDate: "2000-01-23T04:56:07.000+00:00" + importId: 3 + reservation: true + attributes: "{}" + id: 6 + value: "value" + startDate: "2000-01-23T04:56:07.000+00:00" session: coupon: "coupon" created: "2000-01-23T04:56:07.000+00:00" @@ -10183,6 +10297,103 @@ definitions: type: "array" items: $ref: "#/definitions/Notification" + SamlConnection: + type: "object" + required: + - "accountId" + - "assertionConsumerServiceURL" + - "audience" + - "created" + - "enabled" + - "id" + - "issuer" + - "name" + - "signOnURL" + - "x509certificate" + properties: + id: + type: "integer" + created: + type: "string" + format: "date-time" + description: "Unix timestamp indicating when the session was first created." + accountId: + type: "integer" + description: "The ID of the account that owns this SAML Service." + assertionConsumerServiceURL: + type: "string" + description: "The location where the SAML assertion is sent with a HTTP POST." + name: + type: "string" + description: "ID of the SAML service." + minLength: 1 + enabled: + type: "boolean" + description: "Determines if this SAML connection active." + issuer: + type: "string" + description: "Identity Provider Entity ID." + minLength: 1 + signOnURL: + type: "string" + description: "Single Sign-On URL." + minLength: 1 + signOutURL: + type: "string" + description: "Single Sign-Out URL." + metadataURL: + type: "string" + description: "Metadata URL." + x509certificate: + type: "string" + description: "X.509 Certificate." + minLength: 1 + audience: + type: "string" + description: "The application-defined unique identifier that is the intended\ + \ audience of the SAML assertion. \nThis is most often the SP Entity ID\ + \ of your application. When not specified, the ACS URL will be used.\n" + description: "" + NewSamlConnection: + type: "object" + required: + - "enabled" + - "issuer" + - "name" + - "signOnURL" + - "x509certificate" + properties: + name: + type: "string" + description: "ID of the SAML service." + minLength: 1 + enabled: + type: "boolean" + description: "Determines if this SAML connection active." + issuer: + type: "string" + description: "Identity Provider Entity ID." + minLength: 1 + signOnURL: + type: "string" + description: "Single Sign-On URL." + minLength: 1 + signOutURL: + type: "string" + description: "Single Sign-Out URL." + metadataURL: + type: "string" + description: "Metadata URL." + x509certificate: + type: "string" + description: "X.509 Certificate." + minLength: 1 + audience: + type: "string" + description: "The application-defined unique identifier that is the intended\ + \ audience of the SAML assertion. \nThis is most often the SP Entity ID\ + \ of your application. When not specified, the ACS URL will be used.\n" + description: "A new SAML 2.0 connection." inline_response_200: required: - "data" @@ -10237,29 +10448,29 @@ definitions: - recipientIntegrationId: "recipientIntegrationId" created: "2000-01-23T04:56:07.000+00:00" campaignId: 6 - usageLimit: 146581 - referralId: 5 - usageCounter: 5 + usageLimit: 594488 + referralId: 3 + usageCounter: 6 batchId: "batchId" expiryDate: "2000-01-23T04:56:07.000+00:00" - importId: 2 + importId: 3 reservation: true attributes: "{}" - id: 0 + id: 6 value: "value" startDate: "2000-01-23T04:56:07.000+00:00" - recipientIntegrationId: "recipientIntegrationId" created: "2000-01-23T04:56:07.000+00:00" campaignId: 6 - usageLimit: 146581 - referralId: 5 - usageCounter: 5 + usageLimit: 594488 + referralId: 3 + usageCounter: 6 batchId: "batchId" expiryDate: "2000-01-23T04:56:07.000+00:00" - importId: 2 + importId: 3 reservation: true attributes: "{}" - id: 0 + id: 6 value: "value" startDate: "2000-01-23T04:56:07.000+00:00" totalResultSize: 0 @@ -10307,7 +10518,6 @@ definitions: currency: "currency" attributes: "{}" id: 6 - key: "key" limits: - entities: - "Coupon" @@ -10319,6 +10529,7 @@ definitions: - "Coupon" limit: 0.59621339166831821554382031536079011857509613037109375 action: "redeemCoupon" + key: "key" - created: "2000-01-23T04:56:07.000+00:00" timezone: "timezone" description: "description" @@ -10350,7 +10561,6 @@ definitions: currency: "currency" attributes: "{}" id: 6 - key: "key" limits: - entities: - "Coupon" @@ -10362,6 +10572,7 @@ definitions: - "Coupon" limit: 0.59621339166831821554382031536079011857509613037109375 action: "redeemCoupon" + key: "key" totalResultSize: 0 inline_response_200_3: required: @@ -10376,13 +10587,37 @@ definitions: $ref: "#/definitions/Campaign" example: data: - - activeRulesetId: 5 + - discountCount: 9 + description: "description" + features: + - "coupons" + - "coupons" + - "coupons" + couponSettings: + couponPattern: "couponPattern" + validCharacters: + - "validCharacters" + - "validCharacters" + startTime: "2000-01-23T04:56:07.000+00:00" + id: 6 + state: "enabled" + limits: + - entities: + - "Coupon" + - "Coupon" + limit: 0.59621339166831821554382031536079011857509613037109375 + action: "redeemCoupon" + - entities: + - "Coupon" + - "Coupon" + limit: 0.59621339166831821554382031536079011857509613037109375 + action: "redeemCoupon" + activeRulesetId: 5 updatedBy: "updatedBy" created: "2000-01-23T04:56:07.000+00:00" - discountCount: 9 - description: "description" couponRedemptionCount: 2 userId: 5 + couponCreationCount: 2 tags: - "tags" - "tags" @@ -10394,10 +10629,7 @@ definitions: - "tags" - "tags" - "tags" - features: - - "coupons" - - "coupons" - - "coupons" + discountEffectCount: 3 createdBy: "createdBy" name: "name" referralSettings: @@ -10405,20 +10637,26 @@ definitions: validCharacters: - "validCharacters" - "validCharacters" + attributes: "{}" + lastActivity: "2000-01-23T04:56:07.000+00:00" + endTime: "2000-01-23T04:56:07.000+00:00" + applicationId: 1 + referralRedemptionCount: 7 + updated: "2000-01-23T04:56:07.000+00:00" + - discountCount: 9 + description: "description" + features: + - "coupons" + - "coupons" + - "coupons" couponSettings: couponPattern: "couponPattern" validCharacters: - "validCharacters" - "validCharacters" startTime: "2000-01-23T04:56:07.000+00:00" - attributes: "{}" - lastActivity: "2000-01-23T04:56:07.000+00:00" id: 6 - endTime: "2000-01-23T04:56:07.000+00:00" state: "enabled" - applicationId: 1 - referralRedemptionCount: 7 - updated: "2000-01-23T04:56:07.000+00:00" limits: - entities: - "Coupon" @@ -10430,13 +10668,12 @@ definitions: - "Coupon" limit: 0.59621339166831821554382031536079011857509613037109375 action: "redeemCoupon" - - activeRulesetId: 5 + activeRulesetId: 5 updatedBy: "updatedBy" created: "2000-01-23T04:56:07.000+00:00" - discountCount: 9 - description: "description" couponRedemptionCount: 2 userId: 5 + couponCreationCount: 2 tags: - "tags" - "tags" @@ -10448,10 +10685,7 @@ definitions: - "tags" - "tags" - "tags" - features: - - "coupons" - - "coupons" - - "coupons" + discountEffectCount: 3 createdBy: "createdBy" name: "name" referralSettings: @@ -10459,31 +10693,12 @@ definitions: validCharacters: - "validCharacters" - "validCharacters" - couponSettings: - couponPattern: "couponPattern" - validCharacters: - - "validCharacters" - - "validCharacters" - startTime: "2000-01-23T04:56:07.000+00:00" attributes: "{}" lastActivity: "2000-01-23T04:56:07.000+00:00" - id: 6 endTime: "2000-01-23T04:56:07.000+00:00" - state: "enabled" applicationId: 1 referralRedemptionCount: 7 updated: "2000-01-23T04:56:07.000+00:00" - limits: - - entities: - - "Coupon" - - "Coupon" - limit: 0.59621339166831821554382031536079011857509613037109375 - action: "redeemCoupon" - - entities: - - "Coupon" - - "Coupon" - limit: 0.59621339166831821554382031536079011857509613037109375 - action: "redeemCoupon" totalResultSize: 0 inline_response_200_4: required: @@ -10617,29 +10832,29 @@ definitions: - recipientIntegrationId: "recipientIntegrationId" created: "2000-01-23T04:56:07.000+00:00" campaignId: 6 - usageLimit: 146581 - referralId: 5 - usageCounter: 5 + usageLimit: 594488 + referralId: 3 + usageCounter: 6 batchId: "batchId" expiryDate: "2000-01-23T04:56:07.000+00:00" - importId: 2 + importId: 3 reservation: true attributes: "{}" - id: 0 + id: 6 value: "value" startDate: "2000-01-23T04:56:07.000+00:00" - recipientIntegrationId: "recipientIntegrationId" created: "2000-01-23T04:56:07.000+00:00" campaignId: 6 - usageLimit: 146581 - referralId: 5 - usageCounter: 5 + usageLimit: 594488 + referralId: 3 + usageCounter: 6 batchId: "batchId" expiryDate: "2000-01-23T04:56:07.000+00:00" - importId: 2 + importId: 3 reservation: true attributes: "{}" - id: 0 + id: 6 value: "value" startDate: "2000-01-23T04:56:07.000+00:00" hasMore: true @@ -11374,6 +11589,7 @@ definitions: modified: "2000-01-23T04:56:07.000+00:00" id: 6 state: "invited" + authMethod: "authMethod" latestFeature: "latestFeature" email: "email" policy: "policy" @@ -11389,6 +11605,7 @@ definitions: modified: "2000-01-23T04:56:07.000+00:00" id: 6 state: "invited" + authMethod: "authMethod" latestFeature: "latestFeature" email: "email" policy: "policy" @@ -11396,10 +11613,11 @@ definitions: inline_response_200_25: required: - "data" - - "totalResultSize" properties: totalResultSize: type: "integer" + hasMore: + type: "boolean" data: type: "array" items: @@ -11418,6 +11636,7 @@ definitions: id: 6 userId: 1 entity: "entity" + hasMore: true totalResultSize: 0 inline_response_200_26: required: diff --git a/api_management.go b/api_management.go index 1b2b2804..c44a308e 100644 --- a/api_management.go +++ b/api_management.go @@ -4151,6 +4151,11 @@ Get list of changes caused by API calls for an account. Only accessible for admi * @param "PageSize" (optional.Int32) - The number of items to include in this response. When omitted, the maximum value of 1000 will be used. * @param "Skip" (optional.Int32) - Skips the given number of items when paging through large result sets. * @param "Sort" (optional.String) - The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. + * @param "ApplicationId" (optional.Int32) - + * @param "CreatedBefore" (optional.Time) - Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. + * @param "CreatedAfter" (optional.Time) - Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. + * @param "WithTotalResultSize" (optional.Bool) - When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. + * @param "IncludeOld" (optional.Bool) - When this flag is set to false, the state without the change will not be returned. The default value is true. @return InlineResponse20025 */ @@ -4159,6 +4164,11 @@ type GetChangesOpts struct { PageSize optional.Int32 Skip optional.Int32 Sort optional.String + ApplicationId optional.Int32 + CreatedBefore optional.Time + CreatedAfter optional.Time + WithTotalResultSize optional.Bool + IncludeOld optional.Bool } func (a *ManagementApiService) GetChanges(ctx context.Context, localVarOptionals *GetChangesOpts) (InlineResponse20025, *http.Response, error) { @@ -4186,6 +4196,21 @@ func (a *ManagementApiService) GetChanges(ctx context.Context, localVarOptionals if localVarOptionals != nil && localVarOptionals.Sort.IsSet() { localVarQueryParams.Add("sort", parameterToString(localVarOptionals.Sort.Value(), "")) } + if localVarOptionals != nil && localVarOptionals.ApplicationId.IsSet() { + localVarQueryParams.Add("applicationId", parameterToString(localVarOptionals.ApplicationId.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.CreatedBefore.IsSet() { + localVarQueryParams.Add("createdBefore", parameterToString(localVarOptionals.CreatedBefore.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.CreatedAfter.IsSet() { + localVarQueryParams.Add("createdAfter", parameterToString(localVarOptionals.CreatedAfter.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.WithTotalResultSize.IsSet() { + localVarQueryParams.Add("withTotalResultSize", parameterToString(localVarOptionals.WithTotalResultSize.Value(), "")) + } + if localVarOptionals != nil && localVarOptionals.IncludeOld.IsSet() { + localVarQueryParams.Add("includeOld", parameterToString(localVarOptionals.IncludeOld.Value(), "")) + } // to determine the Content-Type header localVarHttpContentTypes := []string{"application/json"} diff --git a/configuration.go b/configuration.go index a0988fde..41417db2 100644 --- a/configuration.go +++ b/configuration.go @@ -62,7 +62,7 @@ func NewConfiguration() *Configuration { cfg := &Configuration{ BasePath: "https://localhost", DefaultHeader: make(map[string]string), - UserAgent: "Swagger-Codegen/1.2.0/go", + UserAgent: "Swagger-Codegen/1.3.0/go", } return cfg } diff --git a/docs/Application.md b/docs/Application.md index 57c4a3b7..43314965 100644 --- a/docs/Application.md +++ b/docs/Application.md @@ -9,12 +9,12 @@ Name | Type | Description | Notes **AccountId** | **int32** | The ID of the account that owns this entity. | [default to null] **Name** | **string** | The name of this application. | [default to null] **Description** | **string** | A longer description of the application. | [optional] [default to null] -**Key** | **string** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) | [default to null] **Timezone** | **string** | A string containing an IANA timezone descriptor. | [default to null] **Currency** | **string** | A string describing a default currency for new customer sessions. | [default to null] **CaseSensitivity** | **string** | A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. | [optional] [default to null] **Attributes** | [***interface{}**](interface{}.md) | Arbitrary properties associated with this campaign | [optional] [default to null] **Limits** | [**[]LimitConfig**](LimitConfig.md) | Default limits for campaigns created in this application | [optional] [default to null] +**Key** | **string** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) | [default to null] **LoyaltyPrograms** | [**[]LoyaltyProgram**](LoyaltyProgram.md) | An array containing all the loyalty programs to which this application is subscribed | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Campaign.md b/docs/Campaign.md index ef1f89fe..5bee82df 100644 --- a/docs/Campaign.md +++ b/docs/Campaign.md @@ -22,6 +22,8 @@ Name | Type | Description | Notes **CouponRedemptionCount** | **int32** | Number of coupons redeemed in the campaign. | [optional] [default to null] **ReferralRedemptionCount** | **int32** | Number of referral codes redeemed in the campaign. | [optional] [default to null] **DiscountCount** | **int32** | Total amount of discounts redeemed in the campaign. | [optional] [default to null] +**DiscountEffectCount** | **int32** | Total number of times discounts were redeemed in this campaign. | [optional] [default to null] +**CouponCreationCount** | **int32** | Total number of coupons created by rules in this campaign. | [optional] [default to null] **LastActivity** | [**time.Time**](time.Time.md) | Timestamp of the most recent event received by this campaign. | [optional] [default to null] **Updated** | [**time.Time**](time.Time.md) | Timestamp of the most recent update to the campaign or any of its elements. | [optional] [default to null] **CreatedBy** | **string** | Name of the user who created this campaign if available. | [optional] [default to null] diff --git a/docs/InlineResponse20025.md b/docs/InlineResponse20025.md index e0a868c5..4219fd67 100644 --- a/docs/InlineResponse20025.md +++ b/docs/InlineResponse20025.md @@ -3,7 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**TotalResultSize** | **int32** | | [default to null] +**TotalResultSize** | **int32** | | [optional] [default to null] +**HasMore** | **bool** | | [optional] [default to null] **Data** | [**[]Change**](Change.md) | | [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/IntegrationState.md b/docs/IntegrationState.md index 54a8c5b3..67d37459 100644 --- a/docs/IntegrationState.md +++ b/docs/IntegrationState.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **Profile** | [***CustomerProfile**](CustomerProfile.md) | | [default to null] **Event** | [***Event**](Event.md) | | [default to null] **Loyalty** | [***Loyalty**](Loyalty.md) | | [optional] [default to null] +**Coupon** | [***Coupon**](Coupon.md) | | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ManagementApi.md b/docs/ManagementApi.md index f4e916e1..116ad2ab 100644 --- a/docs/ManagementApi.md +++ b/docs/ManagementApi.md @@ -1335,6 +1335,11 @@ Name | Type | Description | Notes **pageSize** | **optional.Int32**| The number of items to include in this response. When omitted, the maximum value of 1000 will be used. | **skip** | **optional.Int32**| Skips the given number of items when paging through large result sets. | **sort** | **optional.String**| The field by which results should be sorted. Sorting defaults to ascending order, prefix the field name with `-` to sort in descending order. | + **applicationId** | **optional.Int32**| | + **createdBefore** | **optional.Time**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. | + **createdAfter** | **optional.Time**| Filter results comparing the parameter value, expected to be an RFC3339 timestamp string, to the change creation timestamp. | + **withTotalResultSize** | **optional.Bool**| When this flag is set, the result will include the total size of the result, across all pages. This might decrease performance on large data sets. With this flag set to true, hasMore will be be true whenever there is a next page. totalResultSize will always be zero. With this flag set to false, hasMore will always be set to false. totalResultSize will contain the total number of results for this query. | + **includeOld** | **optional.Bool**| When this flag is set to false, the state without the change will not be returned. The default value is true. | ### Return type diff --git a/docs/NewApplication.md b/docs/NewApplication.md index 8350e8b2..8d474021 100644 --- a/docs/NewApplication.md +++ b/docs/NewApplication.md @@ -5,12 +5,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **string** | The name of this application. | [default to null] **Description** | **string** | A longer description of the application. | [optional] [default to null] -**Key** | **string** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) | [default to null] **Timezone** | **string** | A string containing an IANA timezone descriptor. | [default to null] **Currency** | **string** | A string describing a default currency for new customer sessions. | [default to null] **CaseSensitivity** | **string** | A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. | [optional] [default to null] **Attributes** | [***interface{}**](interface{}.md) | Arbitrary properties associated with this campaign | [optional] [default to null] **Limits** | [**[]LimitConfig**](LimitConfig.md) | Default limits for campaigns created in this application | [optional] [default to null] +**Key** | **string** | Hex key for HMAC-signing API calls as coming from this application (16 hex digits) | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/NewSamlConnection.md b/docs/NewSamlConnection.md new file mode 100644 index 00000000..300b00cb --- /dev/null +++ b/docs/NewSamlConnection.md @@ -0,0 +1,17 @@ +# NewSamlConnection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | ID of the SAML service. | [default to null] +**Enabled** | **bool** | Determines if this SAML connection active. | [default to null] +**Issuer** | **string** | Identity Provider Entity ID. | [default to null] +**SignOnURL** | **string** | Single Sign-On URL. | [default to null] +**SignOutURL** | **string** | Single Sign-Out URL. | [optional] [default to null] +**MetadataURL** | **string** | Metadata URL. | [optional] [default to null] +**X509certificate** | **string** | X.509 Certificate. | [default to null] +**Audience** | **string** | The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SamlConnection.md b/docs/SamlConnection.md new file mode 100644 index 00000000..dbdbe99d --- /dev/null +++ b/docs/SamlConnection.md @@ -0,0 +1,21 @@ +# SamlConnection + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | | [default to null] +**Created** | [**time.Time**](time.Time.md) | Unix timestamp indicating when the session was first created. | [default to null] +**AccountId** | **int32** | The ID of the account that owns this SAML Service. | [default to null] +**AssertionConsumerServiceURL** | **string** | The location where the SAML assertion is sent with a HTTP POST. | [default to null] +**Name** | **string** | ID of the SAML service. | [default to null] +**Enabled** | **bool** | Determines if this SAML connection active. | [default to null] +**Issuer** | **string** | Identity Provider Entity ID. | [default to null] +**SignOnURL** | **string** | Single Sign-On URL. | [default to null] +**SignOutURL** | **string** | Single Sign-Out URL. | [optional] [default to null] +**MetadataURL** | **string** | Metadata URL. | [optional] [default to null] +**X509certificate** | **string** | X.509 Certificate. | [default to null] +**Audience** | **string** | The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. | [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpdateApplication.md b/docs/UpdateApplication.md new file mode 100644 index 00000000..5e51e839 --- /dev/null +++ b/docs/UpdateApplication.md @@ -0,0 +1,16 @@ +# UpdateApplication + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of this application. | [default to null] +**Description** | **string** | A longer description of the application. | [optional] [default to null] +**Timezone** | **string** | A string containing an IANA timezone descriptor. | [default to null] +**Currency** | **string** | A string describing a default currency for new customer sessions. | [default to null] +**CaseSensitivity** | **string** | A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. | [optional] [default to null] +**Attributes** | [***interface{}**](interface{}.md) | Arbitrary properties associated with this campaign | [optional] [default to null] +**Limits** | [**[]LimitConfig**](LimitConfig.md) | Default limits for campaigns created in this application | [optional] [default to null] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/User.md b/docs/User.md index 3efcf90f..3ebf41b8 100644 --- a/docs/User.md +++ b/docs/User.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **LatestFeature** | **string** | Latest feature the user has been notified. | [optional] [default to null] **Roles** | **[]int32** | Contains a list of all roles a user is a memeber of | [optional] [default to null] **ApplicationNotificationSubscriptions** | [***interface{}**](interface{}.md) | | [optional] [default to null] +**AuthMethod** | **string** | The Authentication method for this user | [optional] [default to null] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/model_application.go b/model_application.go index e6e6764e..d2e155ae 100644 --- a/model_application.go +++ b/model_application.go @@ -27,8 +27,6 @@ type Application struct { Name string `json:"name"` // A longer description of the application. Description string `json:"description,omitempty"` - // Hex key for HMAC-signing API calls as coming from this application (16 hex digits) - Key string `json:"key"` // A string containing an IANA timezone descriptor. Timezone string `json:"timezone"` // A string describing a default currency for new customer sessions. @@ -39,6 +37,8 @@ type Application struct { Attributes *interface{} `json:"attributes,omitempty"` // Default limits for campaigns created in this application Limits []LimitConfig `json:"limits,omitempty"` + // Hex key for HMAC-signing API calls as coming from this application (16 hex digits) + Key string `json:"key"` // An array containing all the loyalty programs to which this application is subscribed LoyaltyPrograms []LoyaltyProgram `json:"loyaltyPrograms"` } diff --git a/model_campaign.go b/model_campaign.go index 1dc11687..604e6d1f 100644 --- a/model_campaign.go +++ b/model_campaign.go @@ -51,6 +51,10 @@ type Campaign struct { ReferralRedemptionCount int32 `json:"referralRedemptionCount,omitempty"` // Total amount of discounts redeemed in the campaign. DiscountCount int32 `json:"discountCount,omitempty"` + // Total number of times discounts were redeemed in this campaign. + DiscountEffectCount int32 `json:"discountEffectCount,omitempty"` + // Total number of coupons created by rules in this campaign. + CouponCreationCount int32 `json:"couponCreationCount,omitempty"` // Timestamp of the most recent event received by this campaign. LastActivity time.Time `json:"lastActivity,omitempty"` // Timestamp of the most recent update to the campaign or any of its elements. diff --git a/model_inline_response_200_25.go b/model_inline_response_200_25.go index 37364956..dae349d8 100644 --- a/model_inline_response_200_25.go +++ b/model_inline_response_200_25.go @@ -10,6 +10,7 @@ package talon type InlineResponse20025 struct { - TotalResultSize int32 `json:"totalResultSize"` + TotalResultSize int32 `json:"totalResultSize,omitempty"` + HasMore bool `json:"hasMore,omitempty"` Data []Change `json:"data"` } diff --git a/model_integration_state.go b/model_integration_state.go index 51d60071..03c2a0a6 100644 --- a/model_integration_state.go +++ b/model_integration_state.go @@ -15,4 +15,5 @@ type IntegrationState struct { Profile *CustomerProfile `json:"profile"` Event *Event `json:"event"` Loyalty *Loyalty `json:"loyalty,omitempty"` + Coupon *Coupon `json:"coupon,omitempty"` } diff --git a/model_new_application.go b/model_new_application.go index af4d6215..9f44d688 100644 --- a/model_new_application.go +++ b/model_new_application.go @@ -9,13 +9,12 @@ package talon +// type NewApplication struct { // The name of this application. Name string `json:"name"` // A longer description of the application. Description string `json:"description,omitempty"` - // Hex key for HMAC-signing API calls as coming from this application (16 hex digits) - Key string `json:"key"` // A string containing an IANA timezone descriptor. Timezone string `json:"timezone"` // A string describing a default currency for new customer sessions. @@ -26,4 +25,6 @@ type NewApplication struct { Attributes *interface{} `json:"attributes,omitempty"` // Default limits for campaigns created in this application Limits []LimitConfig `json:"limits,omitempty"` + // Hex key for HMAC-signing API calls as coming from this application (16 hex digits) + Key string `json:"key,omitempty"` } diff --git a/model_new_saml_connection.go b/model_new_saml_connection.go new file mode 100644 index 00000000..25e9222b --- /dev/null +++ b/model_new_saml_connection.go @@ -0,0 +1,30 @@ +/* + * Talon.One API + * + * The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package talon + +// A new SAML 2.0 connection. +type NewSamlConnection struct { + // ID of the SAML service. + Name string `json:"name"` + // Determines if this SAML connection active. + Enabled bool `json:"enabled"` + // Identity Provider Entity ID. + Issuer string `json:"issuer"` + // Single Sign-On URL. + SignOnURL string `json:"signOnURL"` + // Single Sign-Out URL. + SignOutURL string `json:"signOutURL,omitempty"` + // Metadata URL. + MetadataURL string `json:"metadataURL,omitempty"` + // X.509 Certificate. + X509certificate string `json:"x509certificate"` + // The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. + Audience string `json:"audience,omitempty"` +} diff --git a/model_saml_connection.go b/model_saml_connection.go new file mode 100644 index 00000000..f032e5c4 --- /dev/null +++ b/model_saml_connection.go @@ -0,0 +1,41 @@ +/* + * Talon.One API + * + * The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package talon + +import ( + "time" +) + +// +type SamlConnection struct { + Id int32 `json:"id"` + // Unix timestamp indicating when the session was first created. + Created time.Time `json:"created"` + // The ID of the account that owns this SAML Service. + AccountId int32 `json:"accountId"` + // The location where the SAML assertion is sent with a HTTP POST. + AssertionConsumerServiceURL string `json:"assertionConsumerServiceURL"` + // ID of the SAML service. + Name string `json:"name"` + // Determines if this SAML connection active. + Enabled bool `json:"enabled"` + // Identity Provider Entity ID. + Issuer string `json:"issuer"` + // Single Sign-On URL. + SignOnURL string `json:"signOnURL"` + // Single Sign-Out URL. + SignOutURL string `json:"signOutURL,omitempty"` + // Metadata URL. + MetadataURL string `json:"metadataURL,omitempty"` + // X.509 Certificate. + X509certificate string `json:"x509certificate"` + // The application-defined unique identifier that is the intended audience of the SAML assertion. This is most often the SP Entity ID of your application. When not specified, the ACS URL will be used. + Audience string `json:"audience"` +} diff --git a/model_update_application.go b/model_update_application.go new file mode 100644 index 00000000..dd582db1 --- /dev/null +++ b/model_update_application.go @@ -0,0 +1,27 @@ +/* + * Talon.One API + * + * The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. ### Where is the API? The API is available at the same hostname as these docs. For example, if you are reading this page at `https://mycompany.talon.one/docs/api/`, the URL for the [updateCustomerProfile][] operation is `https://mycompany.talon.one/v1/customer_profiles/id` [updateCustomerProfile]: #operation--v1-customer_profiles--integrationId--put + * + * API version: 1.0.0 + * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git) + */ + +package talon + +type UpdateApplication struct { + // The name of this application. + Name string `json:"name"` + // A longer description of the application. + Description string `json:"description,omitempty"` + // A string containing an IANA timezone descriptor. + Timezone string `json:"timezone"` + // A string describing a default currency for new customer sessions. + Currency string `json:"currency"` + // A string indicating how should campaigns in this application deal with case sensitivity on coupon codes. + CaseSensitivity string `json:"caseSensitivity,omitempty"` + // Arbitrary properties associated with this campaign + Attributes *interface{} `json:"attributes,omitempty"` + // Default limits for campaigns created in this application + Limits []LimitConfig `json:"limits,omitempty"` +} diff --git a/model_user.go b/model_user.go index 7bb752c4..a15098c4 100644 --- a/model_user.go +++ b/model_user.go @@ -40,4 +40,6 @@ type User struct { // Contains a list of all roles a user is a memeber of Roles []int32 `json:"roles,omitempty"` ApplicationNotificationSubscriptions *interface{} `json:"applicationNotificationSubscriptions,omitempty"` + // The Authentication method for this user + AuthMethod string `json:"authMethod,omitempty"` }