Skip to content

Commit bac5412

Browse files
authored
v4.0.0: Integration API V2 (#13)
- Replace code generator to [OpenAPITools generator@v.4.2.3](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.2.3) - Add our new v2 integration api endpoint for customer sessions. Read more here: https://developers.talon.one/Getting-Started/APIV2 - Add v2-related management endpoints for managing [AdditionalCosts](https://developers.talon.one/Getting-Started/APIV2#additional-costs) ### ⚠️ Breaking Change: Please Notice the new distinction between `integration_auth` and `api_key_v1` authentication strategies **From version 4.0.0 onwards, the `integration_auth` strategy will be use for [legacy HMAC authentication](https://developers.talon.one/Integration-API/Authentication#-deprecated-hmac-authentication) only (in deprecation process).** For the correct usage of this strategy, please consult [this](https://github.com/talon-one/TalonOneJavaSdk/blob/d8e100cb74e7dfa74c24e543d468cfe275745ea0/README.md#v1) piece of code in the README file. If until today you used the `integration_auth` while initiating your `ApiClient` instance and set the api-key and prefix as [advised before](https://github.com/talon-one/TalonOneJavaSdk/blob/v3.5.0/README.md#integration-api): ```java ApiClient iApiClient = new ApiClient("integration_auth"); IntegrationApi iApi = new IntegrationApi(iApiClient ); // Setup: basePath, apiKeyPrefix and apiKey iApi.getApiClient().setBasePath("https://mycompany.talon.one"); iApi.getApiClient().setApiKeyPrefix("ApiKey-v1"); iApi.getApiClient().setApiKey("dbc644d33aa74d582bd9479c59e16f970fe13bf34a208c39d6c7fa7586968468"); // ... ``` **Please notice that you will have to pass the `api_key_v1` strategy from now on, the rest of the code could be used as before:** ```diff - ApiClient iApiClient = new ApiClient("integration_auth"); + ApiClient iApiClient = new ApiClient("api_key_v1"); // ... no change ```
1 parent 635728a commit bac5412

File tree

630 files changed

+37292
-10010
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

630 files changed

+37292
-10010
lines changed

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
unset
1+
4.2.3

.travis.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
#
2-
# Generated by: https://openapi-generator.tech
2+
# Generated by OpenAPI Generator: https://openapi-generator.tech
3+
#
4+
# Ref: https://docs.travis-ci.com/user/languages/java/
35
#
46
language: java
57
jdk:
6-
- oraclejdk8
7-
- oraclejdk7
8+
- openjdk12
9+
- openjdk11
10+
- openjdk10
11+
- openjdk9
12+
- openjdk8
813
before_install:
914
# ensure gradlew has proper permission
1015
- chmod a+x ./gradlew
1116
script:
1217
# test using maven
13-
- mvn test
14-
# uncomment below to test using gradle
15-
# - gradle test
16-
# uncomment below to test using sbt
18+
#- mvn test
19+
# test using gradle
20+
- gradle test
21+
# test using sbt
1722
# - sbt test

README.md

Lines changed: 127 additions & 12 deletions
Large diffs are not rendered by default.

build.gradle

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
apply plugin: 'idea'
22
apply plugin: 'eclipse'
3+
apply plugin: 'java'
34

45
group = 'one.talon'
5-
version = '3.5.0'
6+
version = '4.0.0'
67

78
buildscript {
89
repositories {
10+
maven { url "https://repo1.maven.org/maven2" }
911
jcenter()
1012
}
1113
dependencies {
@@ -17,7 +19,9 @@ buildscript {
1719
repositories {
1820
jcenter()
1921
}
20-
22+
sourceSets {
23+
main.java.srcDirs = ['src/main/java']
24+
}
2125

2226
if(hasProperty('target') && target == 'android') {
2327

@@ -94,12 +98,17 @@ if(hasProperty('target') && target == 'android') {
9498
}
9599

96100
dependencies {
97-
compile 'io.swagger:swagger-annotations:1.5.17'
98-
compile 'com.squareup.okhttp:okhttp:2.7.5'
99-
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
100-
compile 'com.google.code.gson:gson:2.8.1'
101-
compile 'io.gsonfire:gson-fire:1.8.0'
102-
compile group: 'org.apache.oltu.oauth2', name: 'org.apache.oltu.oauth2.client', version: '1.0.1'
103-
compile 'org.threeten:threetenbp:1.3.5'
104-
testCompile 'junit:junit:4.12'
101+
compile 'io.swagger:swagger-annotations:1.5.22'
102+
compile "com.google.code.findbugs:jsr305:3.0.2"
103+
compile 'com.squareup.okhttp3:okhttp:3.14.2'
104+
compile 'com.squareup.okhttp3:logging-interceptor:3.14.2'
105+
compile 'com.google.code.gson:gson:2.8.5'
106+
compile 'io.gsonfire:gson-fire:1.8.3'
107+
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
108+
compile 'org.threeten:threetenbp:1.4.0'
109+
testCompile 'junit:junit:4.13'
110+
}
111+
112+
javadoc {
113+
options.tags = [ "http.response.details:a:Http Response Details" ]
105114
}

build.sbt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "one.talon",
44
name := "talon-one-client",
5-
version := "3.5.0",
5+
version := "4.0.0",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
javacOptions in compile ++= Seq("-Xlint:deprecation"),
99
publishArtifact in (Compile, packageDoc) := false,
1010
resolvers += Resolver.mavenLocal,
1111
libraryDependencies ++= Seq(
12-
"io.swagger" % "swagger-annotations" % "1.5.17",
13-
"com.squareup.okhttp" % "okhttp" % "2.7.5",
14-
"com.squareup.okhttp" % "logging-interceptor" % "2.7.5",
15-
"com.google.code.gson" % "gson" % "2.8.1",
16-
"org.threeten" % "threetenbp" % "1.3.5" % "compile",
17-
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
18-
"junit" % "junit" % "4.12" % "test",
12+
"io.swagger" % "swagger-annotations" % "1.5.22",
13+
"com.squareup.okhttp3" % "okhttp" % "3.14.2",
14+
"com.squareup.okhttp3" % "logging-interceptor" % "3.14.2",
15+
"com.google.code.gson" % "gson" % "2.8.5",
16+
"org.apache.commons" % "commons-lang3" % "3.9",
17+
"org.threeten" % "threetenbp" % "1.4.0" % "compile",
18+
"io.gsonfire" % "gson-fire" % "1.8.3" % "compile",
19+
"javax.annotation" % "jsr250-api" % "1.0" % "compile",
20+
"junit" % "junit" % "4.13" % "test",
1921
"com.novocode" % "junit-interface" % "0.10" % "test"
2022
)
2123
)

docs/APIError.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

2+
23
# APIError
34

45
## Properties
6+
57
Name | Type | Description | Notes
68
------------ | ------------- | ------------- | -------------
79
**title** | **String** | Short description of the problem. |

docs/AcceptCouponEffectProps.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
# AcceptCouponEffectProps
4+
5+
The properties specific to the \"acceptCoupon\" effect. This gets triggered whenever the coupon is valid and all other conditions in the rules of its campaign are met.
6+
## Properties
7+
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**value** | **String** | The coupon code that was accepted |
11+
12+
13+

docs/AcceptReferralEffectProps.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
# AcceptReferralEffectProps
4+
5+
The properties specific to the \"acceptReferral\" effect. TThis gets triggered whenever the referral code is valid and all other conditions in the rules of its campaign are met.
6+
## Properties
7+
8+
Name | Type | Description | Notes
9+
------------ | ------------- | ------------- | -------------
10+
**value** | **String** | The referral code that was accepted |
11+
12+
13+

docs/AccessLogEntry.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11

2+
23
# AccessLogEntry
34

5+
Log of application accesses
46
## Properties
7+
58
Name | Type | Description | Notes
69
------------ | ------------- | ------------- | -------------
710
**uuid** | **String** | UUID reference of request |

docs/Account.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11

2+
23
# Account
34

5+
46
## Properties
7+
58
Name | Type | Description | Notes
69
------------ | ------------- | ------------- | -------------
710
**id** | **Integer** | Unique ID for this entity. |
811
**created** | [**OffsetDateTime**](OffsetDateTime.md) | The exact moment this entity was created. |
912
**modified** | [**OffsetDateTime**](OffsetDateTime.md) | The exact moment this entity was last modified. |
1013
**companyName** | **String** | |
1114
**domainName** | **String** | Subdomain Name for yourcompany.talon.one |
12-
**state** | [**StateEnum**](#StateEnum) | State of the account (trial, active, trial_expired) |
15+
**state** | [**StateEnum**](#StateEnum) | State of the account (active, deactivated) |
1316
**billingEmail** | **String** | The billing email address associated with your company account. |
1417
**planName** | **String** | The name of your booked plan. | [optional]
1518
**planExpires** | [**OffsetDateTime**](OffsetDateTime.md) | The point in time at which your current plan expires. | [optional]
@@ -24,13 +27,13 @@ Name | Type | Description | Notes
2427
**attributes** | [**Object**](.md) | Arbitrary properties associated with this campaign | [optional]
2528

2629

27-
<a name="StateEnum"></a>
30+
2831
## Enum: StateEnum
32+
2933
Name | Value
3034
---- | -----
31-
TRIAL | &quot;trial&quot;
3235
ACTIVE | &quot;active&quot;
33-
TRIAL_EXPIRED | &quot;trial_expired&quot;
36+
DEACTIVATED | &quot;deactivated&quot;
3437

3538

3639

0 commit comments

Comments
 (0)