Skip to content

Commit 527fe20

Browse files
committed
Talon.One Integration API
0 parents  commit 527fe20

File tree

227 files changed

+24296
-0
lines changed

Some content is hidden

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

227 files changed

+24296
-0
lines changed

README.md

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
# swagger-java-client
2+
3+
## Requirements
4+
5+
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
6+
7+
## Installation
8+
9+
To install the API client library to your local Maven repository, simply execute:
10+
11+
```shell
12+
mvn install
13+
```
14+
15+
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
16+
17+
```shell
18+
mvn deploy
19+
```
20+
21+
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
22+
23+
### Maven users
24+
25+
Add this dependency to your project's POM:
26+
27+
```xml
28+
<dependency>
29+
<groupId>io.swagger</groupId>
30+
<artifactId>swagger-java-client</artifactId>
31+
<version>1.0.0</version>
32+
<scope>compile</scope>
33+
</dependency>
34+
```
35+
36+
### Gradle users
37+
38+
Add this dependency to your project's build file:
39+
40+
```groovy
41+
compile "io.swagger:swagger-java-client:1.0.0"
42+
```
43+
44+
### Others
45+
46+
At first generate the JAR by executing:
47+
48+
mvn package
49+
50+
Then manually install the following JARs:
51+
52+
* target/swagger-java-client-1.0.0.jar
53+
* target/lib/*.jar
54+
55+
## Getting Started
56+
57+
Please follow the [installation](#installation) instruction and execute the following Java code:
58+
59+
```java
60+
61+
import io.swagger.client.*;
62+
import io.swagger.client.auth.*;
63+
import io.swagger.client.model.*;
64+
import io.swagger.client.api.IntegrationApiApi;
65+
66+
import java.io.File;
67+
import java.util.*;
68+
69+
public class IntegrationApiApiExample {
70+
71+
public static void main(String[] args) {
72+
ApiClient defaultClient = Configuration.getDefaultApiClient();
73+
74+
// Configure API key authorization: integration_auth
75+
ApiKeyAuth integration_auth = (ApiKeyAuth) defaultClient.getAuthentication("integration_auth");
76+
integration_auth.setApiKey("YOUR API KEY");
77+
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
78+
//integration_auth.setApiKeyPrefix("Token");
79+
80+
IntegrationApiApi apiInstance = new IntegrationApiApi();
81+
NewReferral body = new NewReferral(); // NewReferral |
82+
try {
83+
Referral result = apiInstance.createReferral(body);
84+
System.out.println(result);
85+
} catch (ApiException e) {
86+
System.err.println("Exception when calling IntegrationApiApi#createReferral");
87+
e.printStackTrace();
88+
}
89+
}
90+
}
91+
92+
```
93+
94+
## Documentation for API Endpoints
95+
96+
All URIs are relative to *https://localhost*
97+
98+
Class | Method | HTTP request | Description
99+
------------ | ------------- | ------------- | -------------
100+
*IntegrationApiApi* | [**createReferral**](docs/IntegrationApiApi.md#createReferral) | **POST** /v1/referrals | Create a referral code for an advocate
101+
*IntegrationApiApi* | [**getCustomerProfilesByAttributes**](docs/IntegrationApiApi.md#getCustomerProfilesByAttributes) | **POST** /v1/customer_profiles_search | Get a list of the customer profiles that match the given attributes
102+
*IntegrationApiApi* | [**trackEvent**](docs/IntegrationApiApi.md#trackEvent) | **POST** /v1/events | Track an Event
103+
*IntegrationApiApi* | [**updateCustomerProfile**](docs/IntegrationApiApi.md#updateCustomerProfile) | **PUT** /v1/customer_profiles/{integrationId} | Update a Customer Profile
104+
*IntegrationApiApi* | [**updateCustomerSession**](docs/IntegrationApiApi.md#updateCustomerSession) | **PUT** /v1/customer_sessions/{customerSessionId} | Update a Customer Session
105+
106+
107+
## Documentation for Models
108+
109+
- [APIError](docs/APIError.md)
110+
- [AccessControlList](docs/AccessControlList.md)
111+
- [AccessLogEntry](docs/AccessLogEntry.md)
112+
- [AccountEntity](docs/AccountEntity.md)
113+
- [ApplicationApiHealth](docs/ApplicationApiHealth.md)
114+
- [ApplicationEntity](docs/ApplicationEntity.md)
115+
- [ApplicationProfileEntity](docs/ApplicationProfileEntity.md)
116+
- [ApplicationSessionEntity](docs/ApplicationSessionEntity.md)
117+
- [ApplicationStorageData](docs/ApplicationStorageData.md)
118+
- [Binding](docs/Binding.md)
119+
- [CampaignEntity](docs/CampaignEntity.md)
120+
- [CampaignSetBranchNode](docs/CampaignSetBranchNode.md)
121+
- [CampaignSetLeafNode](docs/CampaignSetLeafNode.md)
122+
- [CampaignSetNode](docs/CampaignSetNode.md)
123+
- [CartItem](docs/CartItem.md)
124+
- [CartItemAdjustment](docs/CartItemAdjustment.md)
125+
- [CodeGeneratorSettings](docs/CodeGeneratorSettings.md)
126+
- [CouponConstraints](docs/CouponConstraints.md)
127+
- [CouponSearch](docs/CouponSearch.md)
128+
- [CouponValue](docs/CouponValue.md)
129+
- [CustomerProfileSearch](docs/CustomerProfileSearch.md)
130+
- [EmailEntity](docs/EmailEntity.md)
131+
- [Entity](docs/Entity.md)
132+
- [ErrorResponse](docs/ErrorResponse.md)
133+
- [ErrorSource](docs/ErrorSource.md)
134+
- [FeatureFlags](docs/FeatureFlags.md)
135+
- [FeatureFlagsBody](docs/FeatureFlagsBody.md)
136+
- [InlineResponse200](docs/InlineResponse200.md)
137+
- [IntegrationEntity](docs/IntegrationEntity.md)
138+
- [IntegrationProfileEntity](docs/IntegrationProfileEntity.md)
139+
- [IntegrationState](docs/IntegrationState.md)
140+
- [LedgerBalance](docs/LedgerBalance.md)
141+
- [LibraryAttribute](docs/LibraryAttribute.md)
142+
- [LimitConfig](docs/LimitConfig.md)
143+
- [LimitEntityEnum](docs/LimitEntityEnum.md)
144+
- [LoyaltyMembership](docs/LoyaltyMembership.md)
145+
- [LoyaltyProgramActivation](docs/LoyaltyProgramActivation.md)
146+
- [MultiApplicationEntity](docs/MultiApplicationEntity.md)
147+
- [MutableEntity](docs/MutableEntity.md)
148+
- [NewAccount](docs/NewAccount.md)
149+
- [NewApiKey](docs/NewApiKey.md)
150+
- [NewApplication](docs/NewApplication.md)
151+
- [NewApplicationStorage](docs/NewApplicationStorage.md)
152+
- [NewApplicationStorageData](docs/NewApplicationStorageData.md)
153+
- [NewApplicationStorageTuple](docs/NewApplicationStorageTuple.md)
154+
- [NewCampaign](docs/NewCampaign.md)
155+
- [NewCustomerProfile](docs/NewCustomerProfile.md)
156+
- [NewInvitation](docs/NewInvitation.md)
157+
- [NewInviteEmail](docs/NewInviteEmail.md)
158+
- [NewLoyaltyProgram](docs/NewLoyaltyProgram.md)
159+
- [NewPassword](docs/NewPassword.md)
160+
- [NewPasswordEmail](docs/NewPasswordEmail.md)
161+
- [NewProductLoyaltyPoints](docs/NewProductLoyaltyPoints.md)
162+
- [NewReferral](docs/NewReferral.md)
163+
- [NewRole](docs/NewRole.md)
164+
- [NewRuleset](docs/NewRuleset.md)
165+
- [Policy](docs/Policy.md)
166+
- [ProductLoyaltyPoints](docs/ProductLoyaltyPoints.md)
167+
- [Rule](docs/Rule.md)
168+
- [Session](docs/Session.md)
169+
- [Tier](docs/Tier.md)
170+
- [Tiers](docs/Tiers.md)
171+
- [UpdateAccount](docs/UpdateAccount.md)
172+
- [UserEntity](docs/UserEntity.md)
173+
- [WebhookLogEntry](docs/WebhookLogEntry.md)
174+
- [Account](docs/Account.md)
175+
- [ApiKey](docs/ApiKey.md)
176+
- [Application](docs/Application.md)
177+
- [ApplicationEvent](docs/ApplicationEvent.md)
178+
- [ApplicationProfile](docs/ApplicationProfile.md)
179+
- [ApplicationSession](docs/ApplicationSession.md)
180+
- [ApplicationStorage](docs/ApplicationStorage.md)
181+
- [ApplicationStorageTuple](docs/ApplicationStorageTuple.md)
182+
- [Campaign](docs/Campaign.md)
183+
- [CampaignAnalytics](docs/CampaignAnalytics.md)
184+
- [CampaignSet](docs/CampaignSet.md)
185+
- [Change](docs/Change.md)
186+
- [Coupon](docs/Coupon.md)
187+
- [CustomerActivityReport](docs/CustomerActivityReport.md)
188+
- [CustomerProfile](docs/CustomerProfile.md)
189+
- [CustomerSession](docs/CustomerSession.md)
190+
- [Event](docs/Event.md)
191+
- [LedgerEntry](docs/LedgerEntry.md)
192+
- [LoginParams](docs/LoginParams.md)
193+
- [LoyaltyProgram](docs/LoyaltyProgram.md)
194+
- [NewCampaignSet](docs/NewCampaignSet.md)
195+
- [NewCoupons](docs/NewCoupons.md)
196+
- [NewCustomerSession](docs/NewCustomerSession.md)
197+
- [NewEvent](docs/NewEvent.md)
198+
- [Referral](docs/Referral.md)
199+
- [Role](docs/Role.md)
200+
- [Ruleset](docs/Ruleset.md)
201+
- [UpdateCoupon](docs/UpdateCoupon.md)
202+
- [UpdateUser](docs/UpdateUser.md)
203+
- [User](docs/User.md)
204+
- [ApiKeyWithUsage](docs/ApiKeyWithUsage.md)
205+
- [NewAccountSignUp](docs/NewAccountSignUp.md)
206+
- [NewUser](docs/NewUser.md)
207+
208+
209+
## Documentation for Authorization
210+
211+
Authentication schemes defined for the API:
212+
### integration_auth
213+
214+
- **Type**: API key
215+
- **API key parameter name**: Content-Signature
216+
- **Location**: HTTP header
217+
218+
219+
## Recommendation
220+
221+
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
222+
223+
## Author
224+
225+
226+

build.gradle

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
apply plugin: 'idea'
2+
apply plugin: 'eclipse'
3+
4+
group = 'io.swagger'
5+
version = '1.0.0'
6+
7+
buildscript {
8+
repositories {
9+
jcenter()
10+
}
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:2.3.+'
13+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
14+
}
15+
}
16+
17+
repositories {
18+
jcenter()
19+
}
20+
21+
22+
if(hasProperty('target') && target == 'android') {
23+
24+
apply plugin: 'com.android.library'
25+
apply plugin: 'com.github.dcendents.android-maven'
26+
27+
android {
28+
compileSdkVersion 25
29+
buildToolsVersion '25.0.2'
30+
defaultConfig {
31+
minSdkVersion 14
32+
targetSdkVersion 25
33+
}
34+
compileOptions {
35+
sourceCompatibility JavaVersion.VERSION_1_7
36+
targetCompatibility JavaVersion.VERSION_1_7
37+
}
38+
39+
// Rename the aar correctly
40+
libraryVariants.all { variant ->
41+
variant.outputs.each { output ->
42+
def outputFile = output.outputFile
43+
if (outputFile != null && outputFile.name.endsWith('.aar')) {
44+
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
45+
output.outputFile = new File(outputFile.parent, fileName)
46+
}
47+
}
48+
}
49+
50+
dependencies {
51+
provided 'javax.annotation:jsr250-api:1.0'
52+
}
53+
}
54+
55+
afterEvaluate {
56+
android.libraryVariants.all { variant ->
57+
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
58+
task.description = "Create jar artifact for ${variant.name}"
59+
task.dependsOn variant.javaCompile
60+
task.from variant.javaCompile.destinationDir
61+
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
62+
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
63+
artifacts.add('archives', task);
64+
}
65+
}
66+
67+
task sourcesJar(type: Jar) {
68+
from android.sourceSets.main.java.srcDirs
69+
classifier = 'sources'
70+
}
71+
72+
artifacts {
73+
archives sourcesJar
74+
}
75+
76+
} else {
77+
78+
apply plugin: 'java'
79+
apply plugin: 'maven'
80+
81+
sourceCompatibility = JavaVersion.VERSION_1_7
82+
targetCompatibility = JavaVersion.VERSION_1_7
83+
84+
install {
85+
repositories.mavenInstaller {
86+
pom.artifactId = 'swagger-java-client'
87+
}
88+
}
89+
90+
task execute(type:JavaExec) {
91+
main = System.getProperty('mainClass')
92+
classpath = sourceSets.main.runtimeClasspath
93+
}
94+
}
95+
96+
dependencies {
97+
compile 'io.swagger:swagger-annotations:1.5.15'
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 'org.threeten:threetenbp:1.3.5'
103+
testCompile 'junit:junit:4.12'
104+
}

build.sbt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
lazy val root = (project in file(".")).
2+
settings(
3+
organization := "io.swagger",
4+
name := "swagger-java-client",
5+
version := "1.0.0",
6+
scalaVersion := "2.11.4",
7+
scalacOptions ++= Seq("-feature"),
8+
javacOptions in compile ++= Seq("-Xlint:deprecation"),
9+
publishArtifact in (Compile, packageDoc) := false,
10+
resolvers += Resolver.mavenLocal,
11+
libraryDependencies ++= Seq(
12+
"io.swagger" % "swagger-annotations" % "1.5.15",
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",
19+
"com.novocode" % "junit-interface" % "0.10" % "test"
20+
)
21+
)

docs/APIError.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
2+
# APIError
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**title** | **String** | Short description of the problem. |
8+
**details** | **String** | Longer description of this specific instance of the problem. | [optional]
9+
**source** | [**ErrorSource**](ErrorSource.md) | |
10+
11+
12+

docs/AccessControlList.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
# AccessControlList
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
8+
9+

docs/AccessLogEntry.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
# AccessLogEntry
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**uuid** | **String** | UUID reference of request |
8+
**status** | **Integer** | HTTP status code of response |
9+
**method** | **String** | HTTP method of request |
10+
**requestUri** | **String** | target URI of request |
11+
**time** | [**OffsetDateTime**](OffsetDateTime.md) | timestamp of request |
12+
**requestPayload** | **String** | payload of request |
13+
**responsePayload** | **String** | payload of response |
14+
15+
16+

0 commit comments

Comments
 (0)