Skip to content

Commit

Permalink
v3.2.3: SessionId property of Event object returned from integratio…
Browse files Browse the repository at this point in the history
…n API is optional (#9)
  • Loading branch information
altJake authored Sep 11, 2019
1 parent d7228d2 commit 959c302
Show file tree
Hide file tree
Showing 11 changed files with 217 additions and 60 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>one.talon</groupId>
<artifactId>talon-one-client</artifactId>
<version>3.2.2</version>
<version>3.2.3</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -49,7 +49,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
compile "one.talon:talon-one-client:3.2.2"
compile "one.talon:talon-one-client:3.2.3"
```

### Others
Expand All @@ -62,7 +62,7 @@ mvn clean package

Then manually install the following JARs:

* `target/talon-one-client-3.2.2.jar`
* `target/talon-one-client-3.2.3.jar`
* `target/lib/*.jar`

## Getting Started
Expand Down Expand Up @@ -331,6 +331,7 @@ Class | Method | HTTP request | Description
- [InlineResponse2008](docs/InlineResponse2008.md)
- [InlineResponse2009](docs/InlineResponse2009.md)
- [IntegrationEntity](docs/IntegrationEntity.md)
- [IntegrationEvent](docs/IntegrationEvent.md)
- [IntegrationProfileEntity](docs/IntegrationProfileEntity.md)
- [IntegrationState](docs/IntegrationState.md)
- [LedgerEntry](docs/LedgerEntry.md)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apply plugin: 'idea'
apply plugin: 'eclipse'

group = 'one.talon'
version = '3.2.2'
version = '3.2.3'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "one.talon",
name := "talon-one-client",
version := "3.2.2",
version := "3.2.3",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
2 changes: 1 addition & 1 deletion docs/Event.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Name | Type | Description | Notes
**created** | [**OffsetDateTime**](OffsetDateTime.md) | The exact moment this entity was created. |
**applicationId** | **Integer** | The ID of the application that owns this entity. |
**profileId** | **String** | ID of the customers profile as used within this Talon.One account. May be omitted or set to the empty string if the customer does not yet have a known profile ID. | [optional]
**sessionId** | **String** | The ID of the session that this event occurred in. |
**type** | **String** | A string representing the event. Must not be a reserved event name. |
**attributes** | [**Object**](.md) | Arbitrary additional JSON data associated with the event. |
**sessionId** | **String** | The ID of the session that this event occurred in. | [optional]
**effects** | **List&lt;Object&gt;** | An array of \&quot;effects\&quot; that must be applied in response to this event. Example effects include &#x60;addItemToCart&#x60; or &#x60;setDiscount&#x60;. |
**ledgerEntries** | [**List&lt;LedgerEntry&gt;**](LedgerEntry.md) | Ledger entries for the event. |
**meta** | [**Meta**](Meta.md) | | [optional]
Expand Down
12 changes: 12 additions & 0 deletions docs/IntegrationEvent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# IntegrationEvent

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**profileId** | **String** | ID of the customers profile as used within this Talon.One account. May be omitted or set to the empty string if the customer does not yet have a known profile ID. | [optional]
**type** | **String** | A string representing the event. Must not be a reserved event name. |
**attributes** | [**Object**](.md) | Arbitrary additional JSON data associated with the event. |



2 changes: 1 addition & 1 deletion docs/NewEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**profileId** | **String** | ID of the customers profile as used within this Talon.One account. May be omitted or set to the empty string if the customer does not yet have a known profile ID. | [optional]
**sessionId** | **String** | The ID of the session that this event occurred in. |
**type** | **String** | A string representing the event. Must not be a reserved event name. |
**attributes** | [**Object**](.md) | Arbitrary additional JSON data associated with the event. |
**sessionId** | **String** | The ID of the session that this event occurred in. |



2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>talon-one-client</artifactId>
<packaging>jar</packaging>
<name>talon-one-client</name>
<version>3.2.2</version>
<version>3.2.3</version>
<url>https://github.com/talon-one/maven-artefacts</url>
<description>Talon.One unified JAVA SDK. It allows for programatic access to the integration and management API with their respective authentication strategies</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/one/talon/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/3.2.2/java");
setUserAgent("OpenAPI-Generator/3.2.3/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
50 changes: 25 additions & 25 deletions src/main/java/one/talon/model/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ public class Event {
@SerializedName(SERIALIZED_NAME_PROFILE_ID)
private String profileId;

public static final String SERIALIZED_NAME_SESSION_ID = "sessionId";
@SerializedName(SERIALIZED_NAME_SESSION_ID)
private String sessionId;

public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;
Expand All @@ -63,6 +59,10 @@ public class Event {
@SerializedName(SERIALIZED_NAME_ATTRIBUTES)
private Object attributes = null;

public static final String SERIALIZED_NAME_SESSION_ID = "sessionId";
@SerializedName(SERIALIZED_NAME_SESSION_ID)
private String sessionId;

public static final String SERIALIZED_NAME_EFFECTS = "effects";
@SerializedName(SERIALIZED_NAME_EFFECTS)
private List<Object> effects = new ArrayList<Object>();
Expand Down Expand Up @@ -147,24 +147,6 @@ public void setProfileId(String profileId) {
this.profileId = profileId;
}

public Event sessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}

/**
* The ID of the session that this event occurred in.
* @return sessionId
**/
@ApiModelProperty(required = true, value = "The ID of the session that this event occurred in.")
public String getSessionId() {
return sessionId;
}

public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}

public Event type(String type) {
this.type = type;
return this;
Expand Down Expand Up @@ -201,6 +183,24 @@ public void setAttributes(Object attributes) {
this.attributes = attributes;
}

public Event sessionId(String sessionId) {
this.sessionId = sessionId;
return this;
}

/**
* The ID of the session that this event occurred in.
* @return sessionId
**/
@ApiModelProperty(value = "The ID of the session that this event occurred in.")
public String getSessionId() {
return sessionId;
}

public void setSessionId(String sessionId) {
this.sessionId = sessionId;
}

public Event effects(List<Object> effects) {
this.effects = effects;
return this;
Expand Down Expand Up @@ -279,17 +279,17 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.created, event.created) &&
Objects.equals(this.applicationId, event.applicationId) &&
Objects.equals(this.profileId, event.profileId) &&
Objects.equals(this.sessionId, event.sessionId) &&
Objects.equals(this.type, event.type) &&
Objects.equals(this.attributes, event.attributes) &&
Objects.equals(this.sessionId, event.sessionId) &&
Objects.equals(this.effects, event.effects) &&
Objects.equals(this.ledgerEntries, event.ledgerEntries) &&
Objects.equals(this.meta, event.meta);
}

@Override
public int hashCode() {
return Objects.hash(id, created, applicationId, profileId, sessionId, type, attributes, effects, ledgerEntries, meta);
return Objects.hash(id, created, applicationId, profileId, type, attributes, sessionId, effects, ledgerEntries, meta);
}


Expand All @@ -302,9 +302,9 @@ public String toString() {
sb.append(" created: ").append(toIndentedString(created)).append("\n");
sb.append(" applicationId: ").append(toIndentedString(applicationId)).append("\n");
sb.append(" profileId: ").append(toIndentedString(profileId)).append("\n");
sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append(" sessionId: ").append(toIndentedString(sessionId)).append("\n");
sb.append(" effects: ").append(toIndentedString(effects)).append("\n");
sb.append(" ledgerEntries: ").append(toIndentedString(ledgerEntries)).append("\n");
sb.append(" meta: ").append(toIndentedString(meta)).append("\n");
Expand Down
144 changes: 144 additions & 0 deletions src/main/java/one/talon/model/IntegrationEvent.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
/*
* 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
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package one.talon.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;

/**
*
*/
@ApiModel(description = "")

public class IntegrationEvent {
public static final String SERIALIZED_NAME_PROFILE_ID = "profileId";
@SerializedName(SERIALIZED_NAME_PROFILE_ID)
private String profileId;

public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;

public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes";
@SerializedName(SERIALIZED_NAME_ATTRIBUTES)
private Object attributes = null;

public IntegrationEvent profileId(String profileId) {
this.profileId = profileId;
return this;
}

/**
* ID of the customers profile as used within this Talon.One account. May be omitted or set to the empty string if the customer does not yet have a known profile ID.
* @return profileId
**/
@ApiModelProperty(value = "ID of the customers profile as used within this Talon.One account. May be omitted or set to the empty string if the customer does not yet have a known profile ID.")
public String getProfileId() {
return profileId;
}

public void setProfileId(String profileId) {
this.profileId = profileId;
}

public IntegrationEvent type(String type) {
this.type = type;
return this;
}

/**
* A string representing the event. Must not be a reserved event name.
* @return type
**/
@ApiModelProperty(required = true, value = "A string representing the event. Must not be a reserved event name.")
public String getType() {
return type;
}

public void setType(String type) {
this.type = type;
}

public IntegrationEvent attributes(Object attributes) {
this.attributes = attributes;
return this;
}

/**
* Arbitrary additional JSON data associated with the event.
* @return attributes
**/
@ApiModelProperty(required = true, value = "Arbitrary additional JSON data associated with the event.")
public Object getAttributes() {
return attributes;
}

public void setAttributes(Object attributes) {
this.attributes = attributes;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IntegrationEvent integrationEvent = (IntegrationEvent) o;
return Objects.equals(this.profileId, integrationEvent.profileId) &&
Objects.equals(this.type, integrationEvent.type) &&
Objects.equals(this.attributes, integrationEvent.attributes);
}

@Override
public int hashCode() {
return Objects.hash(profileId, type, attributes);
}


@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IntegrationEvent {\n");

sb.append(" profileId: ").append(toIndentedString(profileId)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}

}

Loading

0 comments on commit 959c302

Please sign in to comment.