Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ If you use Maven, we also host [Maven Artifacts](https://github.com/talon-one/ma

Building the API client library requires:

1. Java 1.7+
1. Java 21+
2. Maven/Gradle

## Installation
Expand All @@ -35,7 +35,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>one.talon</groupId>
<artifactId>talon-one-client</artifactId>
<version>13.0.0</version>
<version>13.1.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -45,7 +45,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:13.0.0"
compile "one.talon:talon-one-client:13.1.0"
```

### Others
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'eclipse'
apply plugin: 'java'

group = 'one.talon'
version = '13.0.0'
version = '13.1.0'

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 := "13.0.0",
version := "13.1.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
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>13.0.0</version>
<version>13.1.0</version>
<url>https://github.com/talon-one/maven-artefacts</url>
<description>Talon.One unified JAVA SDK. It allows for programmatic 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 @@ -132,7 +132,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/13.0.0/java");
setUserAgent("OpenAPI-Generator/13.1.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
164 changes: 160 additions & 4 deletions src/main/java/one/talon/model/CartItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import one.talon.model.AdditionalCost;
import one.talon.model.PriceDetail;
import one.talon.model.Product;
import org.threeten.bp.OffsetDateTime;

/**
* CartItem
Expand Down Expand Up @@ -99,6 +102,26 @@ public class CartItem {
@SerializedName(SERIALIZED_NAME_CATALOG_ITEM_I_D)
private Long catalogItemID;

public static final String SERIALIZED_NAME_SELECTED_PRICE_TYPE = "selectedPriceType";
@SerializedName(SERIALIZED_NAME_SELECTED_PRICE_TYPE)
private String selectedPriceType;

public static final String SERIALIZED_NAME_ADJUSTMENT_REFERENCE_ID = "adjustmentReferenceId";
@SerializedName(SERIALIZED_NAME_ADJUSTMENT_REFERENCE_ID)
private UUID adjustmentReferenceId;

public static final String SERIALIZED_NAME_ADJUSTMENT_EFFECTIVE_FROM = "adjustmentEffectiveFrom";
@SerializedName(SERIALIZED_NAME_ADJUSTMENT_EFFECTIVE_FROM)
private OffsetDateTime adjustmentEffectiveFrom;

public static final String SERIALIZED_NAME_ADJUSTMENT_EFFECTIVE_UNTIL = "adjustmentEffectiveUntil";
@SerializedName(SERIALIZED_NAME_ADJUSTMENT_EFFECTIVE_UNTIL)
private OffsetDateTime adjustmentEffectiveUntil;

public static final String SERIALIZED_NAME_PRICES = "prices";
@SerializedName(SERIALIZED_NAME_PRICES)
private Map<String, PriceDetail> prices = null;


public CartItem name(String name) {

Expand Down Expand Up @@ -459,11 +482,11 @@ public CartItem catalogItemID(Long catalogItemID) {
}

/**
* The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-a-cart-item-catalog).
* The catalog item ID.
* @return catalogItemID
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "The [catalog item ID](https://docs.talon.one/docs/product/account/dev-tools/managing-cart-item-catalogs/#synchronizing-a-cart-item-catalog).")
@ApiModelProperty(value = "The catalog item ID.")

public Long getCatalogItemID() {
return catalogItemID;
Expand All @@ -475,6 +498,129 @@ public void setCatalogItemID(Long catalogItemID) {
}


public CartItem selectedPriceType(String selectedPriceType) {

this.selectedPriceType = selectedPriceType;
return this;
}

/**
* The selected price type for this cart item (e.g. the price for members only).
* @return selectedPriceType
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "member", value = "The selected price type for this cart item (e.g. the price for members only).")

public String getSelectedPriceType() {
return selectedPriceType;
}


public void setSelectedPriceType(String selectedPriceType) {
this.selectedPriceType = selectedPriceType;
}


public CartItem adjustmentReferenceId(UUID adjustmentReferenceId) {

this.adjustmentReferenceId = adjustmentReferenceId;
return this;
}

/**
* The reference ID of the selected price adjustment for this cart item. Only returned if the selected price resulted from a price adjustment.
* @return adjustmentReferenceId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "68851723-e6fa-488f-ace9-112581e6c19b", value = "The reference ID of the selected price adjustment for this cart item. Only returned if the selected price resulted from a price adjustment.")

public UUID getAdjustmentReferenceId() {
return adjustmentReferenceId;
}


public void setAdjustmentReferenceId(UUID adjustmentReferenceId) {
this.adjustmentReferenceId = adjustmentReferenceId;
}


public CartItem adjustmentEffectiveFrom(OffsetDateTime adjustmentEffectiveFrom) {

this.adjustmentEffectiveFrom = adjustmentEffectiveFrom;
return this;
}

/**
* The date and time from which the price adjustment is effective. Only returned if the selected price resulted from a price adjustment that contains this field.
* @return adjustmentEffectiveFrom
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2021-09-12T10:12:42Z", value = "The date and time from which the price adjustment is effective. Only returned if the selected price resulted from a price adjustment that contains this field.")

public OffsetDateTime getAdjustmentEffectiveFrom() {
return adjustmentEffectiveFrom;
}


public void setAdjustmentEffectiveFrom(OffsetDateTime adjustmentEffectiveFrom) {
this.adjustmentEffectiveFrom = adjustmentEffectiveFrom;
}


public CartItem adjustmentEffectiveUntil(OffsetDateTime adjustmentEffectiveUntil) {

this.adjustmentEffectiveUntil = adjustmentEffectiveUntil;
return this;
}

/**
* The date and time until which the price adjustment is effective. Only returned if the selected price resulted from a price adjustment that contains this field.
* @return adjustmentEffectiveUntil
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "2021-09-12T10:12:42Z", value = "The date and time until which the price adjustment is effective. Only returned if the selected price resulted from a price adjustment that contains this field.")

public OffsetDateTime getAdjustmentEffectiveUntil() {
return adjustmentEffectiveUntil;
}


public void setAdjustmentEffectiveUntil(OffsetDateTime adjustmentEffectiveUntil) {
this.adjustmentEffectiveUntil = adjustmentEffectiveUntil;
}


public CartItem prices(Map<String, PriceDetail> prices) {

this.prices = prices;
return this;
}

public CartItem putPricesItem(String key, PriceDetail pricesItem) {
if (this.prices == null) {
this.prices = new HashMap<String, PriceDetail>();
}
this.prices.put(key, pricesItem);
return this;
}

/**
* A map of keys and values representing the price types and related price adjustment details for this cart item. The keys correspond to the &#x60;priceType&#x60; names.
* @return prices
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "{\"member\":{\"price\":90,\"adjustmentReferenceId\":\"68851723-e6fa-488f-ace9-112581e6c19b\",\"effectiveFrom\":\"2025-05-25T00:00:00Z\",\"effectiveUntil\":\"2025-05-30T00:00:00Z\"},\"base\":{\"price\":100}}", value = "A map of keys and values representing the price types and related price adjustment details for this cart item. The keys correspond to the `priceType` names. ")

public Map<String, PriceDetail> getPrices() {
return prices;
}


public void setPrices(Map<String, PriceDetail> prices) {
this.prices = prices;
}


@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
Expand All @@ -499,12 +645,17 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.position, cartItem.position) &&
Objects.equals(this.attributes, cartItem.attributes) &&
Objects.equals(this.additionalCosts, cartItem.additionalCosts) &&
Objects.equals(this.catalogItemID, cartItem.catalogItemID);
Objects.equals(this.catalogItemID, cartItem.catalogItemID) &&
Objects.equals(this.selectedPriceType, cartItem.selectedPriceType) &&
Objects.equals(this.adjustmentReferenceId, cartItem.adjustmentReferenceId) &&
Objects.equals(this.adjustmentEffectiveFrom, cartItem.adjustmentEffectiveFrom) &&
Objects.equals(this.adjustmentEffectiveUntil, cartItem.adjustmentEffectiveUntil) &&
Objects.equals(this.prices, cartItem.prices);
}

@Override
public int hashCode() {
return Objects.hash(name, sku, quantity, returnedQuantity, remainingQuantity, price, category, product, weight, height, width, length, position, attributes, additionalCosts, catalogItemID);
return Objects.hash(name, sku, quantity, returnedQuantity, remainingQuantity, price, category, product, weight, height, width, length, position, attributes, additionalCosts, catalogItemID, selectedPriceType, adjustmentReferenceId, adjustmentEffectiveFrom, adjustmentEffectiveUntil, prices);
}


Expand All @@ -528,6 +679,11 @@ public String toString() {
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append(" additionalCosts: ").append(toIndentedString(additionalCosts)).append("\n");
sb.append(" catalogItemID: ").append(toIndentedString(catalogItemID)).append("\n");
sb.append(" selectedPriceType: ").append(toIndentedString(selectedPriceType)).append("\n");
sb.append(" adjustmentReferenceId: ").append(toIndentedString(adjustmentReferenceId)).append("\n");
sb.append(" adjustmentEffectiveFrom: ").append(toIndentedString(adjustmentEffectiveFrom)).append("\n");
sb.append(" adjustmentEffectiveUntil: ").append(toIndentedString(adjustmentEffectiveUntil)).append("\n");
sb.append(" prices: ").append(toIndentedString(prices)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
39 changes: 38 additions & 1 deletion src/main/java/one/talon/model/IntegrationEventV2Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public class IntegrationEventV2Request {
@SerializedName(SERIALIZED_NAME_ATTRIBUTES)
private Object attributes;

public static final String SERIALIZED_NAME_LOYALTY_CARDS = "loyaltyCards";
@SerializedName(SERIALIZED_NAME_LOYALTY_CARDS)
private List<String> loyaltyCards = null;

/**
* Gets or Sets responseContent
*/
Expand Down Expand Up @@ -233,6 +237,37 @@ public void setAttributes(Object attributes) {
}


public IntegrationEventV2Request loyaltyCards(List<String> loyaltyCards) {

this.loyaltyCards = loyaltyCards;
return this;
}

public IntegrationEventV2Request addLoyaltyCardsItem(String loyaltyCardsItem) {
if (this.loyaltyCards == null) {
this.loyaltyCards = new ArrayList<String>();
}
this.loyaltyCards.add(loyaltyCardsItem);
return this;
}

/**
* Identifier of the loyalty card used during this event.
* @return loyaltyCards
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[loyalty-card-1]", value = "Identifier of the loyalty card used during this event.")

public List<String> getLoyaltyCards() {
return loyaltyCards;
}


public void setLoyaltyCards(List<String> loyaltyCards) {
this.loyaltyCards = loyaltyCards;
}


public IntegrationEventV2Request responseContent(List<ResponseContentEnum> responseContent) {

this.responseContent = responseContent;
Expand Down Expand Up @@ -278,12 +313,13 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.evaluableCampaignIds, integrationEventV2Request.evaluableCampaignIds) &&
Objects.equals(this.type, integrationEventV2Request.type) &&
Objects.equals(this.attributes, integrationEventV2Request.attributes) &&
Objects.equals(this.loyaltyCards, integrationEventV2Request.loyaltyCards) &&
Objects.equals(this.responseContent, integrationEventV2Request.responseContent);
}

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


Expand All @@ -296,6 +332,7 @@ public String toString() {
sb.append(" evaluableCampaignIds: ").append(toIndentedString(evaluableCampaignIds)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append(" loyaltyCards: ").append(toIndentedString(loyaltyCards)).append("\n");
sb.append(" responseContent: ").append(toIndentedString(responseContent)).append("\n");
sb.append("}");
return sb.toString();
Expand Down
Loading