From 3d6647fe4ef6a6abcdc9d5b82ab59cdbcc41e737 Mon Sep 17 00:00:00 2001 From: NathanFallet Date: Fri, 23 Oct 2026 05:02:37 +0100 Subject: [PATCH] feat: regenerate with the platform fields of an item Co-Authored-By: Claude Sonnet 5.5 --- .spec-sha256 | 2 +- .../sdk/generated/api/ItemsApi.java | 16 +- .../sdk/generated/model/Item.java | 381 ++++++++++++++++- .../sdk/generated/model/ItemAttribute.java | 184 +++++++++ .../generated/model/ItemCreateRequest.java | 385 +++++++++++++++++- .../sdk/generated/model/ItemCustomField.java | 184 +++++++++ .../sdk/generated/model/ItemEnumValue.java | 184 +++++++++ .../generated/model/ItemUpdateRequest.java | 385 +++++++++++++++++- 8 files changed, 1705 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/controlresell/sdk/generated/model/ItemAttribute.java create mode 100644 src/main/java/com/controlresell/sdk/generated/model/ItemCustomField.java create mode 100644 src/main/java/com/controlresell/sdk/generated/model/ItemEnumValue.java diff --git a/.spec-sha256 b/.spec-sha256 index 903fef4..fa982ec 100644 --- a/.spec-sha256 +++ b/.spec-sha256 @@ -1 +1 @@ -8c6a3b8bfecad67daa21d1361057c24f2e063b17c13afdcc93e7f71806011003 +41311cb64247613fcc1634a63a1804e344c71873d665fc58af33e053a5f919f1 diff --git a/src/main/java/com/controlresell/sdk/generated/api/ItemsApi.java b/src/main/java/com/controlresell/sdk/generated/api/ItemsApi.java index 0fe2a27..56abe6d 100644 --- a/src/main/java/com/controlresell/sdk/generated/api/ItemsApi.java +++ b/src/main/java/com/controlresell/sdk/generated/api/ItemsApi.java @@ -174,7 +174,7 @@ private File prepareDownloadFile(HttpResponse response) throws IOEx /** * Create an item in the seller's stock - * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write` and an `Idempotency-Key`. + * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write` and an `Idempotency-Key`. * @param idempotencyKey 1 to 255 characters, unique per write: a retry with the same key and the same request answers the first response again (`Idempotent-Replayed: true`), without running the write twice. (required) * @param itemCreateRequest (required) * @return Item @@ -186,7 +186,7 @@ public Item createItem(@jakarta.annotation.Nonnull String idempotencyKey, @jakar /** * Create an item in the seller's stock - * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write` and an `Idempotency-Key`. + * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write` and an `Idempotency-Key`. * @param idempotencyKey 1 to 255 characters, unique per write: a retry with the same key and the same request answers the first response again (`Idempotent-Replayed: true`), without running the write twice. (required) * @param itemCreateRequest (required) * @param headers Optional headers to include in the request @@ -200,7 +200,7 @@ public Item createItem(@jakarta.annotation.Nonnull String idempotencyKey, @jakar /** * Create an item in the seller's stock - * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write` and an `Idempotency-Key`. + * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write` and an `Idempotency-Key`. * @param idempotencyKey 1 to 255 characters, unique per write: a retry with the same key and the same request answers the first response again (`Idempotent-Replayed: true`), without running the write twice. (required) * @param itemCreateRequest (required) * @return ApiResponse<Item> @@ -212,7 +212,7 @@ public ApiResponse createItemWithHttpInfo(@jakarta.annotation.Nonnull Stri /** * Create an item in the seller's stock - * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write` and an `Idempotency-Key`. + * Creates one item in the seller's ControlResell stock, unsold unless `sold` says otherwise, without publishing it: publish it with `POST /items/{id}/publish`. Only `name` is required. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write` and an `Idempotency-Key`. * @param idempotencyKey 1 to 255 characters, unique per write: a retry with the same key and the same request answers the first response again (`Idempotent-Replayed: true`), without running the write twice. (required) * @param itemCreateRequest (required) * @param headers Optional headers to include in the request @@ -1219,7 +1219,7 @@ private HttpRequest.Builder republishItemRequestBuilder(@jakarta.annotation.Nonn /** * Change an item of the seller's stock - * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, `photoIds`, `colorIds` nor `labels`: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write`. + * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, nor a list: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write`. * @param id The item's identifier, a number. (required) * @param itemUpdateRequest (required) * @return Item @@ -1231,7 +1231,7 @@ public Item updateItem(@jakarta.annotation.Nonnull Long id, @jakarta.annotation. /** * Change an item of the seller's stock - * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, `photoIds`, `colorIds` nor `labels`: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write`. + * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, nor a list: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write`. * @param id The item's identifier, a number. (required) * @param itemUpdateRequest (required) * @param headers Optional headers to include in the request @@ -1245,7 +1245,7 @@ public Item updateItem(@jakarta.annotation.Nonnull Long id, @jakarta.annotation. /** * Change an item of the seller's stock - * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, `photoIds`, `colorIds` nor `labels`: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write`. + * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, nor a list: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write`. * @param id The item's identifier, a number. (required) * @param itemUpdateRequest (required) * @return ApiResponse<Item> @@ -1257,7 +1257,7 @@ public ApiResponse updateItemWithHttpInfo(@jakarta.annotation.Nonnull Long /** * Change an item of the seller's stock - * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, `photoIds`, `colorIds` nor `labels`: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. Requires `items:write`. + * Changes one item of the seller's stock with a JSON merge patch: a field left out keeps its value, a field set to `null` is cleared (not `name`, `sold`, nor a list: send `[]` to empty a list), a list replaces the whole list. It changes the item in ControlResell only, not its listings on the marketplaces. The amounts are `{amount, currency}` in the item's currency (EUR for a new item; another currency is refused with `422 currency_mismatch`). `photoIds` are files already in the seller's library: another seller's, or an unknown one, is `404 photo_not_found`. A label the seller does not have yet is created. The fields a marketplace asks for are written with the item: `packageSizeId`, `materialIds`, `measurementLength` and `measurementWidth` (centimeters), `enumValues` (the category's enumerated fields, `{enumKey, enumValue}`, one entry per picked value), `attributes` (its free-text fields, `{fieldKey, value}`, one per key) and `customFields` (the seller's own fields, `{fieldId, value}`); each list replaces the item's whole list. A place (`purchasePlaceId`, `sellingPlaceId`) or a custom field of another seller, or an unknown one, is `404 place_not_found` or `404 field_not_found`. `categoryId`, `sizeId` and `state` are ids from 1 (`0` is a 400, `null` clears them). Keys and enumerated values are trimmed and counted in characters (UTF-16 units), 1 to 100 for a key and 1 to 255 for a value; two entries that differ only by case or accents (as the database compares them) are a 400. At most 100 entries per list, and 65,535 bytes (UTF-8) per free-text value. Read back, `enumValues`, `attributes` and `customFields` are sorted by key (then value, or field id), as plain strings (upper case before lower case). Requires `items:write`. * @param id The item's identifier, a number. (required) * @param itemUpdateRequest (required) * @param headers Optional headers to include in the request diff --git a/src/main/java/com/controlresell/sdk/generated/model/Item.java b/src/main/java/com/controlresell/sdk/generated/model/Item.java index 4e5de6f..8f47be6 100644 --- a/src/main/java/com/controlresell/sdk/generated/model/Item.java +++ b/src/main/java/com/controlresell/sdk/generated/model/Item.java @@ -19,6 +19,9 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.controlresell.sdk.generated.model.ItemAttribute; +import com.controlresell.sdk.generated.model.ItemCustomField; +import com.controlresell.sdk.generated.model.ItemEnumValue; import com.controlresell.sdk.generated.model.ItemPhoto; import com.controlresell.sdk.generated.model.Money; import com.fasterxml.jackson.annotation.JsonInclude; @@ -26,6 +29,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -51,11 +55,20 @@ Item.JSON_PROPERTY_SEX, Item.JSON_PROPERTY_LABELS, Item.JSON_PROPERTY_SOLD, + Item.JSON_PROPERTY_PACKAGE_SIZE_ID, + Item.JSON_PROPERTY_MATERIAL_IDS, + Item.JSON_PROPERTY_MEASUREMENT_LENGTH, + Item.JSON_PROPERTY_MEASUREMENT_WIDTH, + Item.JSON_PROPERTY_ENUM_VALUES, + Item.JSON_PROPERTY_ATTRIBUTES, + Item.JSON_PROPERTY_CUSTOM_FIELDS, Item.JSON_PROPERTY_ESTIMATED_PRICE, Item.JSON_PROPERTY_PURCHASE_PRICE, Item.JSON_PROPERTY_PURCHASE_DATE, + Item.JSON_PROPERTY_PURCHASE_PLACE_ID, Item.JSON_PROPERTY_SELLING_PRICE, Item.JSON_PROPERTY_SELLING_DATE, + Item.JSON_PROPERTY_SELLING_PLACE_ID, Item.JSON_PROPERTY_CREATED_AT, Item.JSON_PROPERTY_UPDATED_AT }) @@ -113,6 +126,34 @@ public class Item { @jakarta.annotation.Nonnull private Boolean sold; + public static final String JSON_PROPERTY_PACKAGE_SIZE_ID = "packageSizeId"; + @jakarta.annotation.Nullable + private Long packageSizeId; + + public static final String JSON_PROPERTY_MATERIAL_IDS = "materialIds"; + @jakarta.annotation.Nonnull + private List materialIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_MEASUREMENT_LENGTH = "measurementLength"; + @jakarta.annotation.Nullable + private BigDecimal measurementLength; + + public static final String JSON_PROPERTY_MEASUREMENT_WIDTH = "measurementWidth"; + @jakarta.annotation.Nullable + private BigDecimal measurementWidth; + + public static final String JSON_PROPERTY_ENUM_VALUES = "enumValues"; + @jakarta.annotation.Nonnull + private List enumValues = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @jakarta.annotation.Nonnull + private List attributes = new ArrayList<>(); + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "customFields"; + @jakarta.annotation.Nonnull + private List customFields = new ArrayList<>(); + public static final String JSON_PROPERTY_ESTIMATED_PRICE = "estimatedPrice"; @jakarta.annotation.Nullable private Money estimatedPrice; @@ -125,6 +166,10 @@ public class Item { @jakarta.annotation.Nullable private OffsetDateTime purchaseDate; + public static final String JSON_PROPERTY_PURCHASE_PLACE_ID = "purchasePlaceId"; + @jakarta.annotation.Nullable + private Long purchasePlaceId; + public static final String JSON_PROPERTY_SELLING_PRICE = "sellingPrice"; @jakarta.annotation.Nullable private Money sellingPrice; @@ -133,6 +178,10 @@ public class Item { @jakarta.annotation.Nullable private OffsetDateTime sellingDate; + public static final String JSON_PROPERTY_SELLING_PLACE_ID = "sellingPlaceId"; + @jakarta.annotation.Nullable + private Long sellingPlaceId; + public static final String JSON_PROPERTY_CREATED_AT = "createdAt"; @jakarta.annotation.Nonnull private OffsetDateTime createdAt; @@ -480,6 +529,206 @@ public void setSold(@jakarta.annotation.Nonnull Boolean sold) { } + public Item packageSizeId(@jakarta.annotation.Nullable Long packageSizeId) { + this.packageSizeId = packageSizeId; + return this; + } + + /** + * Get packageSizeId + * @return packageSizeId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PACKAGE_SIZE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPackageSizeId() { + return packageSizeId; + } + + + @JsonProperty(value = JSON_PROPERTY_PACKAGE_SIZE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPackageSizeId(@jakarta.annotation.Nullable Long packageSizeId) { + this.packageSizeId = packageSizeId; + } + + + public Item materialIds(@jakarta.annotation.Nonnull List materialIds) { + this.materialIds = materialIds; + return this; + } + + public Item addMaterialIdsItem(Long materialIdsItem) { + if (this.materialIds == null) { + this.materialIds = new ArrayList<>(); + } + this.materialIds.add(materialIdsItem); + return this; + } + + /** + * Get materialIds + * @return materialIds + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_MATERIAL_IDS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getMaterialIds() { + return materialIds; + } + + + @JsonProperty(value = JSON_PROPERTY_MATERIAL_IDS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setMaterialIds(@jakarta.annotation.Nonnull List materialIds) { + this.materialIds = materialIds; + } + + + public Item measurementLength(@jakarta.annotation.Nullable BigDecimal measurementLength) { + this.measurementLength = measurementLength; + return this; + } + + /** + * Get measurementLength + * @return measurementLength + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_LENGTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMeasurementLength() { + return measurementLength; + } + + + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_LENGTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeasurementLength(@jakarta.annotation.Nullable BigDecimal measurementLength) { + this.measurementLength = measurementLength; + } + + + public Item measurementWidth(@jakarta.annotation.Nullable BigDecimal measurementWidth) { + this.measurementWidth = measurementWidth; + return this; + } + + /** + * Get measurementWidth + * @return measurementWidth + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMeasurementWidth() { + return measurementWidth; + } + + + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeasurementWidth(@jakarta.annotation.Nullable BigDecimal measurementWidth) { + this.measurementWidth = measurementWidth; + } + + + public Item enumValues(@jakarta.annotation.Nonnull List enumValues) { + this.enumValues = enumValues; + return this; + } + + public Item addEnumValuesItem(ItemEnumValue enumValuesItem) { + if (this.enumValues == null) { + this.enumValues = new ArrayList<>(); + } + this.enumValues.add(enumValuesItem); + return this; + } + + /** + * Get enumValues + * @return enumValues + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUES, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getEnumValues() { + return enumValues; + } + + + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUES, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnumValues(@jakarta.annotation.Nonnull List enumValues) { + this.enumValues = enumValues; + } + + + public Item attributes(@jakarta.annotation.Nonnull List attributes) { + this.attributes = attributes; + return this; + } + + public Item addAttributesItem(ItemAttribute attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getAttributes() { + return attributes; + } + + + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setAttributes(@jakarta.annotation.Nonnull List attributes) { + this.attributes = attributes; + } + + + public Item customFields(@jakarta.annotation.Nonnull List customFields) { + this.customFields = customFields; + return this; + } + + public Item addCustomFieldsItem(ItemCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * Get customFields + * @return customFields + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_CUSTOM_FIELDS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOM_FIELDS, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setCustomFields(@jakarta.annotation.Nonnull List customFields) { + this.customFields = customFields; + } + + public Item estimatedPrice(@jakarta.annotation.Nullable Money estimatedPrice) { this.estimatedPrice = estimatedPrice; return this; @@ -552,6 +801,30 @@ public void setPurchaseDate(@jakarta.annotation.Nullable OffsetDateTime purchase } + public Item purchasePlaceId(@jakarta.annotation.Nullable Long purchasePlaceId) { + this.purchasePlaceId = purchasePlaceId; + return this; + } + + /** + * Get purchasePlaceId + * @return purchasePlaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PURCHASE_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPurchasePlaceId() { + return purchasePlaceId; + } + + + @JsonProperty(value = JSON_PROPERTY_PURCHASE_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurchasePlaceId(@jakarta.annotation.Nullable Long purchasePlaceId) { + this.purchasePlaceId = purchasePlaceId; + } + + public Item sellingPrice(@jakarta.annotation.Nullable Money sellingPrice) { this.sellingPrice = sellingPrice; return this; @@ -600,6 +873,30 @@ public void setSellingDate(@jakarta.annotation.Nullable OffsetDateTime sellingDa } + public Item sellingPlaceId(@jakarta.annotation.Nullable Long sellingPlaceId) { + this.sellingPlaceId = sellingPlaceId; + return this; + } + + /** + * Get sellingPlaceId + * @return sellingPlaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SELLING_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSellingPlaceId() { + return sellingPlaceId; + } + + + @JsonProperty(value = JSON_PROPERTY_SELLING_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSellingPlaceId(@jakarta.annotation.Nullable Long sellingPlaceId) { + this.sellingPlaceId = sellingPlaceId; + } + + public Item createdAt(@jakarta.annotation.Nonnull OffsetDateTime createdAt) { this.createdAt = createdAt; return this; @@ -673,18 +970,27 @@ public boolean equals(Object o) { Objects.equals(this.sex, item.sex) && Objects.equals(this.labels, item.labels) && Objects.equals(this.sold, item.sold) && + Objects.equals(this.packageSizeId, item.packageSizeId) && + Objects.equals(this.materialIds, item.materialIds) && + Objects.equals(this.measurementLength, item.measurementLength) && + Objects.equals(this.measurementWidth, item.measurementWidth) && + Objects.equals(this.enumValues, item.enumValues) && + Objects.equals(this.attributes, item.attributes) && + Objects.equals(this.customFields, item.customFields) && Objects.equals(this.estimatedPrice, item.estimatedPrice) && Objects.equals(this.purchasePrice, item.purchasePrice) && Objects.equals(this.purchaseDate, item.purchaseDate) && + Objects.equals(this.purchasePlaceId, item.purchasePlaceId) && Objects.equals(this.sellingPrice, item.sellingPrice) && Objects.equals(this.sellingDate, item.sellingDate) && + Objects.equals(this.sellingPlaceId, item.sellingPlaceId) && Objects.equals(this.createdAt, item.createdAt) && Objects.equals(this.updatedAt, item.updatedAt); } @Override public int hashCode() { - return Objects.hash(id, name, sku, description, photos, categoryId, brandId, sizeId, colorIds, state, sex, labels, sold, estimatedPrice, purchasePrice, purchaseDate, sellingPrice, sellingDate, createdAt, updatedAt); + return Objects.hash(id, name, sku, description, photos, categoryId, brandId, sizeId, colorIds, state, sex, labels, sold, packageSizeId, materialIds, measurementLength, measurementWidth, enumValues, attributes, customFields, estimatedPrice, purchasePrice, purchaseDate, purchasePlaceId, sellingPrice, sellingDate, sellingPlaceId, createdAt, updatedAt); } @Override @@ -704,11 +1010,20 @@ public String toString() { sb.append(" sex: ").append(toIndentedString(sex)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" sold: ").append(toIndentedString(sold)).append("\n"); + sb.append(" packageSizeId: ").append(toIndentedString(packageSizeId)).append("\n"); + sb.append(" materialIds: ").append(toIndentedString(materialIds)).append("\n"); + sb.append(" measurementLength: ").append(toIndentedString(measurementLength)).append("\n"); + sb.append(" measurementWidth: ").append(toIndentedString(measurementWidth)).append("\n"); + sb.append(" enumValues: ").append(toIndentedString(enumValues)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" estimatedPrice: ").append(toIndentedString(estimatedPrice)).append("\n"); sb.append(" purchasePrice: ").append(toIndentedString(purchasePrice)).append("\n"); sb.append(" purchaseDate: ").append(toIndentedString(purchaseDate)).append("\n"); + sb.append(" purchasePlaceId: ").append(toIndentedString(purchasePlaceId)).append("\n"); sb.append(" sellingPrice: ").append(toIndentedString(sellingPrice)).append("\n"); sb.append(" sellingDate: ").append(toIndentedString(sellingDate)).append("\n"); + sb.append(" sellingPlaceId: ").append(toIndentedString(sellingPlaceId)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append("}"); @@ -833,6 +1148,60 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%ssold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSold())))); } + // add `packageSizeId` to the URL query string + if (getPackageSizeId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spackageSizeId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPackageSizeId())))); + } + + // add `materialIds` to the URL query string + if (getMaterialIds() != null) { + for (int i = 0; i < getMaterialIds().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%smaterialIds%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMaterialIds().get(i))))); + } + } + + // add `measurementLength` to the URL query string + if (getMeasurementLength() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smeasurementLength%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMeasurementLength())))); + } + + // add `measurementWidth` to the URL query string + if (getMeasurementWidth() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smeasurementWidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMeasurementWidth())))); + } + + // add `enumValues` to the URL query string + if (getEnumValues() != null) { + for (int i = 0; i < getEnumValues().size(); i++) { + if (getEnumValues().get(i) != null) { + joiner.add(getEnumValues().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%senumValues%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (int i = 0; i < getAttributes().size(); i++) { + if (getAttributes().get(i) != null) { + joiner.add(getAttributes().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sattributes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `customFields` to the URL query string + if (getCustomFields() != null) { + for (int i = 0; i < getCustomFields().size(); i++) { + if (getCustomFields().get(i) != null) { + joiner.add(getCustomFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scustomFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `estimatedPrice` to the URL query string if (getEstimatedPrice() != null) { joiner.add(getEstimatedPrice().toUrlQueryString(prefix + "estimatedPrice" + suffix)); @@ -848,6 +1217,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spurchaseDate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPurchaseDate())))); } + // add `purchasePlaceId` to the URL query string + if (getPurchasePlaceId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spurchasePlaceId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPurchasePlaceId())))); + } + // add `sellingPrice` to the URL query string if (getSellingPrice() != null) { joiner.add(getSellingPrice().toUrlQueryString(prefix + "sellingPrice" + suffix)); @@ -858,6 +1232,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%ssellingDate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSellingDate())))); } + // add `sellingPlaceId` to the URL query string + if (getSellingPlaceId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%ssellingPlaceId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSellingPlaceId())))); + } + // add `createdAt` to the URL query string if (getCreatedAt() != null) { joiner.add(String.format(java.util.Locale.ROOT, "%screatedAt%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getCreatedAt())))); diff --git a/src/main/java/com/controlresell/sdk/generated/model/ItemAttribute.java b/src/main/java/com/controlresell/sdk/generated/model/ItemAttribute.java new file mode 100644 index 0000000..a404095 --- /dev/null +++ b/src/main/java/com/controlresell/sdk/generated/model/ItemAttribute.java @@ -0,0 +1,184 @@ +/* + * ControlResell public API + * The public API of ControlResell. Every error answers `{\"error\": {\"code\", \"message\", \"params\", \"requestId\"}}`; a `POST` takes an `Idempotency-Key` header. + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.controlresell.sdk.generated.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.controlresell.sdk.generated.ApiClient; +/** + * ItemAttribute + */ +@JsonPropertyOrder({ + ItemAttribute.JSON_PROPERTY_FIELD_KEY, + ItemAttribute.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0") +public class ItemAttribute { + public static final String JSON_PROPERTY_FIELD_KEY = "fieldKey"; + @jakarta.annotation.Nonnull + private String fieldKey; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull + private String value; + + public ItemAttribute() { + } + + public ItemAttribute fieldKey(@jakarta.annotation.Nonnull String fieldKey) { + this.fieldKey = fieldKey; + return this; + } + + /** + * Get fieldKey + * @return fieldKey + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_FIELD_KEY, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getFieldKey() { + return fieldKey; + } + + + @JsonProperty(value = JSON_PROPERTY_FIELD_KEY, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFieldKey(@jakarta.annotation.Nonnull String fieldKey) { + this.fieldKey = fieldKey; + } + + + public ItemAttribute value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + + /** + * Return true if this ItemAttribute object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ItemAttribute itemAttribute = (ItemAttribute) o; + return Objects.equals(this.fieldKey, itemAttribute.fieldKey) && + Objects.equals(this.value, itemAttribute.value); + } + + @Override + public int hashCode() { + return Objects.hash(fieldKey, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ItemAttribute {\n"); + sb.append(" fieldKey: ").append(toIndentedString(fieldKey)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fieldKey` to the URL query string + if (getFieldKey() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sfieldKey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFieldKey())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/com/controlresell/sdk/generated/model/ItemCreateRequest.java b/src/main/java/com/controlresell/sdk/generated/model/ItemCreateRequest.java index c4c3ac1..3087cee 100644 --- a/src/main/java/com/controlresell/sdk/generated/model/ItemCreateRequest.java +++ b/src/main/java/com/controlresell/sdk/generated/model/ItemCreateRequest.java @@ -19,12 +19,16 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.controlresell.sdk.generated.model.ItemAttribute; +import com.controlresell.sdk.generated.model.ItemCustomField; +import com.controlresell.sdk.generated.model.ItemEnumValue; import com.controlresell.sdk.generated.model.Money; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -50,11 +54,20 @@ ItemCreateRequest.JSON_PROPERTY_SEX, ItemCreateRequest.JSON_PROPERTY_LABELS, ItemCreateRequest.JSON_PROPERTY_SOLD, + ItemCreateRequest.JSON_PROPERTY_PACKAGE_SIZE_ID, + ItemCreateRequest.JSON_PROPERTY_MATERIAL_IDS, + ItemCreateRequest.JSON_PROPERTY_MEASUREMENT_LENGTH, + ItemCreateRequest.JSON_PROPERTY_MEASUREMENT_WIDTH, + ItemCreateRequest.JSON_PROPERTY_ENUM_VALUES, + ItemCreateRequest.JSON_PROPERTY_ATTRIBUTES, + ItemCreateRequest.JSON_PROPERTY_CUSTOM_FIELDS, ItemCreateRequest.JSON_PROPERTY_ESTIMATED_PRICE, ItemCreateRequest.JSON_PROPERTY_PURCHASE_PRICE, ItemCreateRequest.JSON_PROPERTY_PURCHASE_DATE, + ItemCreateRequest.JSON_PROPERTY_PURCHASE_PLACE_ID, ItemCreateRequest.JSON_PROPERTY_SELLING_PRICE, - ItemCreateRequest.JSON_PROPERTY_SELLING_DATE + ItemCreateRequest.JSON_PROPERTY_SELLING_DATE, + ItemCreateRequest.JSON_PROPERTY_SELLING_PLACE_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0") public class ItemCreateRequest { @@ -106,6 +119,34 @@ public class ItemCreateRequest { @jakarta.annotation.Nullable private Boolean sold; + public static final String JSON_PROPERTY_PACKAGE_SIZE_ID = "packageSizeId"; + @jakarta.annotation.Nullable + private Long packageSizeId; + + public static final String JSON_PROPERTY_MATERIAL_IDS = "materialIds"; + @jakarta.annotation.Nullable + private List materialIds = new ArrayList<>(); + + public static final String JSON_PROPERTY_MEASUREMENT_LENGTH = "measurementLength"; + @jakarta.annotation.Nullable + private BigDecimal measurementLength; + + public static final String JSON_PROPERTY_MEASUREMENT_WIDTH = "measurementWidth"; + @jakarta.annotation.Nullable + private BigDecimal measurementWidth; + + public static final String JSON_PROPERTY_ENUM_VALUES = "enumValues"; + @jakarta.annotation.Nullable + private List enumValues = new ArrayList<>(); + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @jakarta.annotation.Nullable + private List attributes = new ArrayList<>(); + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "customFields"; + @jakarta.annotation.Nullable + private List customFields = new ArrayList<>(); + public static final String JSON_PROPERTY_ESTIMATED_PRICE = "estimatedPrice"; @jakarta.annotation.Nullable private Money estimatedPrice; @@ -118,6 +159,10 @@ public class ItemCreateRequest { @jakarta.annotation.Nullable private OffsetDateTime purchaseDate; + public static final String JSON_PROPERTY_PURCHASE_PLACE_ID = "purchasePlaceId"; + @jakarta.annotation.Nullable + private Long purchasePlaceId; + public static final String JSON_PROPERTY_SELLING_PRICE = "sellingPrice"; @jakarta.annotation.Nullable private Money sellingPrice; @@ -126,6 +171,10 @@ public class ItemCreateRequest { @jakarta.annotation.Nullable private OffsetDateTime sellingDate; + public static final String JSON_PROPERTY_SELLING_PLACE_ID = "sellingPlaceId"; + @jakarta.annotation.Nullable + private Long sellingPlaceId; + public ItemCreateRequest() { } @@ -441,6 +490,206 @@ public void setSold(@jakarta.annotation.Nullable Boolean sold) { } + public ItemCreateRequest packageSizeId(@jakarta.annotation.Nullable Long packageSizeId) { + this.packageSizeId = packageSizeId; + return this; + } + + /** + * Get packageSizeId + * @return packageSizeId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PACKAGE_SIZE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPackageSizeId() { + return packageSizeId; + } + + + @JsonProperty(value = JSON_PROPERTY_PACKAGE_SIZE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPackageSizeId(@jakarta.annotation.Nullable Long packageSizeId) { + this.packageSizeId = packageSizeId; + } + + + public ItemCreateRequest materialIds(@jakarta.annotation.Nullable List materialIds) { + this.materialIds = materialIds; + return this; + } + + public ItemCreateRequest addMaterialIdsItem(Long materialIdsItem) { + if (this.materialIds == null) { + this.materialIds = new ArrayList<>(); + } + this.materialIds.add(materialIdsItem); + return this; + } + + /** + * Get materialIds + * @return materialIds + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MATERIAL_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMaterialIds() { + return materialIds; + } + + + @JsonProperty(value = JSON_PROPERTY_MATERIAL_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaterialIds(@jakarta.annotation.Nullable List materialIds) { + this.materialIds = materialIds; + } + + + public ItemCreateRequest measurementLength(@jakarta.annotation.Nullable BigDecimal measurementLength) { + this.measurementLength = measurementLength; + return this; + } + + /** + * Get measurementLength + * @return measurementLength + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_LENGTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMeasurementLength() { + return measurementLength; + } + + + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_LENGTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeasurementLength(@jakarta.annotation.Nullable BigDecimal measurementLength) { + this.measurementLength = measurementLength; + } + + + public ItemCreateRequest measurementWidth(@jakarta.annotation.Nullable BigDecimal measurementWidth) { + this.measurementWidth = measurementWidth; + return this; + } + + /** + * Get measurementWidth + * @return measurementWidth + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMeasurementWidth() { + return measurementWidth; + } + + + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeasurementWidth(@jakarta.annotation.Nullable BigDecimal measurementWidth) { + this.measurementWidth = measurementWidth; + } + + + public ItemCreateRequest enumValues(@jakarta.annotation.Nullable List enumValues) { + this.enumValues = enumValues; + return this; + } + + public ItemCreateRequest addEnumValuesItem(ItemEnumValue enumValuesItem) { + if (this.enumValues == null) { + this.enumValues = new ArrayList<>(); + } + this.enumValues.add(enumValuesItem); + return this; + } + + /** + * Get enumValues + * @return enumValues + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnumValues() { + return enumValues; + } + + + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumValues(@jakarta.annotation.Nullable List enumValues) { + this.enumValues = enumValues; + } + + + public ItemCreateRequest attributes(@jakarta.annotation.Nullable List attributes) { + this.attributes = attributes; + return this; + } + + public ItemCreateRequest addAttributesItem(ItemAttribute attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttributes() { + return attributes; + } + + + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(@jakarta.annotation.Nullable List attributes) { + this.attributes = attributes; + } + + + public ItemCreateRequest customFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public ItemCreateRequest addCustomFieldsItem(ItemCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * Get customFields + * @return customFields + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CUSTOM_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOM_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + public ItemCreateRequest estimatedPrice(@jakarta.annotation.Nullable Money estimatedPrice) { this.estimatedPrice = estimatedPrice; return this; @@ -513,6 +762,30 @@ public void setPurchaseDate(@jakarta.annotation.Nullable OffsetDateTime purchase } + public ItemCreateRequest purchasePlaceId(@jakarta.annotation.Nullable Long purchasePlaceId) { + this.purchasePlaceId = purchasePlaceId; + return this; + } + + /** + * Get purchasePlaceId + * @return purchasePlaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PURCHASE_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPurchasePlaceId() { + return purchasePlaceId; + } + + + @JsonProperty(value = JSON_PROPERTY_PURCHASE_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurchasePlaceId(@jakarta.annotation.Nullable Long purchasePlaceId) { + this.purchasePlaceId = purchasePlaceId; + } + + public ItemCreateRequest sellingPrice(@jakarta.annotation.Nullable Money sellingPrice) { this.sellingPrice = sellingPrice; return this; @@ -561,6 +834,30 @@ public void setSellingDate(@jakarta.annotation.Nullable OffsetDateTime sellingDa } + public ItemCreateRequest sellingPlaceId(@jakarta.annotation.Nullable Long sellingPlaceId) { + this.sellingPlaceId = sellingPlaceId; + return this; + } + + /** + * Get sellingPlaceId + * @return sellingPlaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SELLING_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSellingPlaceId() { + return sellingPlaceId; + } + + + @JsonProperty(value = JSON_PROPERTY_SELLING_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSellingPlaceId(@jakarta.annotation.Nullable Long sellingPlaceId) { + this.sellingPlaceId = sellingPlaceId; + } + + /** * Return true if this ItemCreateRequest object is equal to o. */ @@ -585,16 +882,25 @@ public boolean equals(Object o) { Objects.equals(this.sex, itemCreateRequest.sex) && Objects.equals(this.labels, itemCreateRequest.labels) && Objects.equals(this.sold, itemCreateRequest.sold) && + Objects.equals(this.packageSizeId, itemCreateRequest.packageSizeId) && + Objects.equals(this.materialIds, itemCreateRequest.materialIds) && + Objects.equals(this.measurementLength, itemCreateRequest.measurementLength) && + Objects.equals(this.measurementWidth, itemCreateRequest.measurementWidth) && + Objects.equals(this.enumValues, itemCreateRequest.enumValues) && + Objects.equals(this.attributes, itemCreateRequest.attributes) && + Objects.equals(this.customFields, itemCreateRequest.customFields) && Objects.equals(this.estimatedPrice, itemCreateRequest.estimatedPrice) && Objects.equals(this.purchasePrice, itemCreateRequest.purchasePrice) && Objects.equals(this.purchaseDate, itemCreateRequest.purchaseDate) && + Objects.equals(this.purchasePlaceId, itemCreateRequest.purchasePlaceId) && Objects.equals(this.sellingPrice, itemCreateRequest.sellingPrice) && - Objects.equals(this.sellingDate, itemCreateRequest.sellingDate); + Objects.equals(this.sellingDate, itemCreateRequest.sellingDate) && + Objects.equals(this.sellingPlaceId, itemCreateRequest.sellingPlaceId); } @Override public int hashCode() { - return Objects.hash(name, sku, description, photoIds, categoryId, brandId, sizeId, colorIds, state, sex, labels, sold, estimatedPrice, purchasePrice, purchaseDate, sellingPrice, sellingDate); + return Objects.hash(name, sku, description, photoIds, categoryId, brandId, sizeId, colorIds, state, sex, labels, sold, packageSizeId, materialIds, measurementLength, measurementWidth, enumValues, attributes, customFields, estimatedPrice, purchasePrice, purchaseDate, purchasePlaceId, sellingPrice, sellingDate, sellingPlaceId); } @Override @@ -613,11 +919,20 @@ public String toString() { sb.append(" sex: ").append(toIndentedString(sex)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" sold: ").append(toIndentedString(sold)).append("\n"); + sb.append(" packageSizeId: ").append(toIndentedString(packageSizeId)).append("\n"); + sb.append(" materialIds: ").append(toIndentedString(materialIds)).append("\n"); + sb.append(" measurementLength: ").append(toIndentedString(measurementLength)).append("\n"); + sb.append(" measurementWidth: ").append(toIndentedString(measurementWidth)).append("\n"); + sb.append(" enumValues: ").append(toIndentedString(enumValues)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" estimatedPrice: ").append(toIndentedString(estimatedPrice)).append("\n"); sb.append(" purchasePrice: ").append(toIndentedString(purchasePrice)).append("\n"); sb.append(" purchaseDate: ").append(toIndentedString(purchaseDate)).append("\n"); + sb.append(" purchasePlaceId: ").append(toIndentedString(purchasePlaceId)).append("\n"); sb.append(" sellingPrice: ").append(toIndentedString(sellingPrice)).append("\n"); sb.append(" sellingDate: ").append(toIndentedString(sellingDate)).append("\n"); + sb.append(" sellingPlaceId: ").append(toIndentedString(sellingPlaceId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -736,6 +1051,60 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%ssold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSold())))); } + // add `packageSizeId` to the URL query string + if (getPackageSizeId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spackageSizeId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPackageSizeId())))); + } + + // add `materialIds` to the URL query string + if (getMaterialIds() != null) { + for (int i = 0; i < getMaterialIds().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%smaterialIds%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMaterialIds().get(i))))); + } + } + + // add `measurementLength` to the URL query string + if (getMeasurementLength() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smeasurementLength%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMeasurementLength())))); + } + + // add `measurementWidth` to the URL query string + if (getMeasurementWidth() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smeasurementWidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMeasurementWidth())))); + } + + // add `enumValues` to the URL query string + if (getEnumValues() != null) { + for (int i = 0; i < getEnumValues().size(); i++) { + if (getEnumValues().get(i) != null) { + joiner.add(getEnumValues().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%senumValues%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (int i = 0; i < getAttributes().size(); i++) { + if (getAttributes().get(i) != null) { + joiner.add(getAttributes().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sattributes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `customFields` to the URL query string + if (getCustomFields() != null) { + for (int i = 0; i < getCustomFields().size(); i++) { + if (getCustomFields().get(i) != null) { + joiner.add(getCustomFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scustomFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `estimatedPrice` to the URL query string if (getEstimatedPrice() != null) { joiner.add(getEstimatedPrice().toUrlQueryString(prefix + "estimatedPrice" + suffix)); @@ -751,6 +1120,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spurchaseDate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPurchaseDate())))); } + // add `purchasePlaceId` to the URL query string + if (getPurchasePlaceId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spurchasePlaceId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPurchasePlaceId())))); + } + // add `sellingPrice` to the URL query string if (getSellingPrice() != null) { joiner.add(getSellingPrice().toUrlQueryString(prefix + "sellingPrice" + suffix)); @@ -761,6 +1135,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%ssellingDate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSellingDate())))); } + // add `sellingPlaceId` to the URL query string + if (getSellingPlaceId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%ssellingPlaceId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSellingPlaceId())))); + } + return joiner.toString(); } } diff --git a/src/main/java/com/controlresell/sdk/generated/model/ItemCustomField.java b/src/main/java/com/controlresell/sdk/generated/model/ItemCustomField.java new file mode 100644 index 0000000..ab62f08 --- /dev/null +++ b/src/main/java/com/controlresell/sdk/generated/model/ItemCustomField.java @@ -0,0 +1,184 @@ +/* + * ControlResell public API + * The public API of ControlResell. Every error answers `{\"error\": {\"code\", \"message\", \"params\", \"requestId\"}}`; a `POST` takes an `Idempotency-Key` header. + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.controlresell.sdk.generated.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.controlresell.sdk.generated.ApiClient; +/** + * ItemCustomField + */ +@JsonPropertyOrder({ + ItemCustomField.JSON_PROPERTY_FIELD_ID, + ItemCustomField.JSON_PROPERTY_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0") +public class ItemCustomField { + public static final String JSON_PROPERTY_FIELD_ID = "fieldId"; + @jakarta.annotation.Nonnull + private Long fieldId; + + public static final String JSON_PROPERTY_VALUE = "value"; + @jakarta.annotation.Nonnull + private String value; + + public ItemCustomField() { + } + + public ItemCustomField fieldId(@jakarta.annotation.Nonnull Long fieldId) { + this.fieldId = fieldId; + return this; + } + + /** + * Get fieldId + * @return fieldId + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_FIELD_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public Long getFieldId() { + return fieldId; + } + + + @JsonProperty(value = JSON_PROPERTY_FIELD_ID, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setFieldId(@jakarta.annotation.Nonnull Long fieldId) { + this.fieldId = fieldId; + } + + + public ItemCustomField value(@jakarta.annotation.Nonnull String value) { + this.value = value; + return this; + } + + /** + * Get value + * @return value + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getValue() { + return value; + } + + + @JsonProperty(value = JSON_PROPERTY_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setValue(@jakarta.annotation.Nonnull String value) { + this.value = value; + } + + + /** + * Return true if this ItemCustomField object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ItemCustomField itemCustomField = (ItemCustomField) o; + return Objects.equals(this.fieldId, itemCustomField.fieldId) && + Objects.equals(this.value, itemCustomField.value); + } + + @Override + public int hashCode() { + return Objects.hash(fieldId, value); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ItemCustomField {\n"); + sb.append(" fieldId: ").append(toIndentedString(fieldId)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `fieldId` to the URL query string + if (getFieldId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%sfieldId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getFieldId())))); + } + + // add `value` to the URL query string + if (getValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%svalue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getValue())))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/com/controlresell/sdk/generated/model/ItemEnumValue.java b/src/main/java/com/controlresell/sdk/generated/model/ItemEnumValue.java new file mode 100644 index 0000000..11e0690 --- /dev/null +++ b/src/main/java/com/controlresell/sdk/generated/model/ItemEnumValue.java @@ -0,0 +1,184 @@ +/* + * ControlResell public API + * The public API of ControlResell. Every error answers `{\"error\": {\"code\", \"message\", \"params\", \"requestId\"}}`; a `POST` takes an `Idempotency-Key` header. + * + * The version of the OpenAPI document: 1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package com.controlresell.sdk.generated.model; + +import java.net.URLEncoder; +import java.nio.charset.StandardCharsets; +import java.util.StringJoiner; +import java.util.Objects; +import java.util.Map; +import java.util.HashMap; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonTypeName; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; + + +import com.controlresell.sdk.generated.ApiClient; +/** + * ItemEnumValue + */ +@JsonPropertyOrder({ + ItemEnumValue.JSON_PROPERTY_ENUM_KEY, + ItemEnumValue.JSON_PROPERTY_ENUM_VALUE +}) +@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0") +public class ItemEnumValue { + public static final String JSON_PROPERTY_ENUM_KEY = "enumKey"; + @jakarta.annotation.Nonnull + private String enumKey; + + public static final String JSON_PROPERTY_ENUM_VALUE = "enumValue"; + @jakarta.annotation.Nonnull + private String enumValue; + + public ItemEnumValue() { + } + + public ItemEnumValue enumKey(@jakarta.annotation.Nonnull String enumKey) { + this.enumKey = enumKey; + return this; + } + + /** + * Get enumKey + * @return enumKey + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ENUM_KEY, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEnumKey() { + return enumKey; + } + + + @JsonProperty(value = JSON_PROPERTY_ENUM_KEY, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnumKey(@jakarta.annotation.Nonnull String enumKey) { + this.enumKey = enumKey; + } + + + public ItemEnumValue enumValue(@jakarta.annotation.Nonnull String enumValue) { + this.enumValue = enumValue; + return this; + } + + /** + * Get enumValue + * @return enumValue + */ + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getEnumValue() { + return enumValue; + } + + + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUE, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setEnumValue(@jakarta.annotation.Nonnull String enumValue) { + this.enumValue = enumValue; + } + + + /** + * Return true if this ItemEnumValue object is equal to o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ItemEnumValue itemEnumValue = (ItemEnumValue) o; + return Objects.equals(this.enumKey, itemEnumValue.enumKey) && + Objects.equals(this.enumValue, itemEnumValue.enumValue); + } + + @Override + public int hashCode() { + return Objects.hash(enumKey, enumValue); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ItemEnumValue {\n"); + sb.append(" enumKey: ").append(toIndentedString(enumKey)).append("\n"); + sb.append(" enumValue: ").append(toIndentedString(enumValue)).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(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + /** + * Convert the instance into URL query string. + * + * @return URL query string + */ + public String toUrlQueryString() { + return toUrlQueryString(null); + } + + /** + * Convert the instance into URL query string. + * + * @param prefix prefix of the query string + * @return URL query string + */ + public String toUrlQueryString(String prefix) { + String suffix = ""; + String containerSuffix = ""; + String containerPrefix = ""; + if (prefix == null) { + // style=form, explode=true, e.g. /pet?name=cat&type=manx + prefix = ""; + } else { + // deepObject style e.g. /pet?id[name]=cat&id[type]=manx + prefix = prefix + "["; + suffix = "]"; + containerSuffix = "]"; + containerPrefix = "["; + } + + StringJoiner joiner = new StringJoiner("&"); + + // add `enumKey` to the URL query string + if (getEnumKey() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senumKey%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnumKey())))); + } + + // add `enumValue` to the URL query string + if (getEnumValue() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%senumValue%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getEnumValue())))); + } + + return joiner.toString(); + } +} + diff --git a/src/main/java/com/controlresell/sdk/generated/model/ItemUpdateRequest.java b/src/main/java/com/controlresell/sdk/generated/model/ItemUpdateRequest.java index 24c3707..c4a938d 100644 --- a/src/main/java/com/controlresell/sdk/generated/model/ItemUpdateRequest.java +++ b/src/main/java/com/controlresell/sdk/generated/model/ItemUpdateRequest.java @@ -19,12 +19,16 @@ import java.util.Objects; import java.util.Map; import java.util.HashMap; +import com.controlresell.sdk.generated.model.ItemAttribute; +import com.controlresell.sdk.generated.model.ItemCustomField; +import com.controlresell.sdk.generated.model.ItemEnumValue; import com.controlresell.sdk.generated.model.Money; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonTypeName; import com.fasterxml.jackson.annotation.JsonValue; +import java.math.BigDecimal; import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; @@ -50,11 +54,20 @@ ItemUpdateRequest.JSON_PROPERTY_SEX, ItemUpdateRequest.JSON_PROPERTY_LABELS, ItemUpdateRequest.JSON_PROPERTY_SOLD, + ItemUpdateRequest.JSON_PROPERTY_PACKAGE_SIZE_ID, + ItemUpdateRequest.JSON_PROPERTY_MATERIAL_IDS, + ItemUpdateRequest.JSON_PROPERTY_MEASUREMENT_LENGTH, + ItemUpdateRequest.JSON_PROPERTY_MEASUREMENT_WIDTH, + ItemUpdateRequest.JSON_PROPERTY_ENUM_VALUES, + ItemUpdateRequest.JSON_PROPERTY_ATTRIBUTES, + ItemUpdateRequest.JSON_PROPERTY_CUSTOM_FIELDS, ItemUpdateRequest.JSON_PROPERTY_ESTIMATED_PRICE, ItemUpdateRequest.JSON_PROPERTY_PURCHASE_PRICE, ItemUpdateRequest.JSON_PROPERTY_PURCHASE_DATE, + ItemUpdateRequest.JSON_PROPERTY_PURCHASE_PLACE_ID, ItemUpdateRequest.JSON_PROPERTY_SELLING_PRICE, - ItemUpdateRequest.JSON_PROPERTY_SELLING_DATE + ItemUpdateRequest.JSON_PROPERTY_SELLING_DATE, + ItemUpdateRequest.JSON_PROPERTY_SELLING_PLACE_ID }) @jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.26.0") public class ItemUpdateRequest { @@ -106,6 +119,34 @@ public class ItemUpdateRequest { @jakarta.annotation.Nullable private Boolean sold; + public static final String JSON_PROPERTY_PACKAGE_SIZE_ID = "packageSizeId"; + @jakarta.annotation.Nullable + private Long packageSizeId; + + public static final String JSON_PROPERTY_MATERIAL_IDS = "materialIds"; + @jakarta.annotation.Nullable + private List materialIds; + + public static final String JSON_PROPERTY_MEASUREMENT_LENGTH = "measurementLength"; + @jakarta.annotation.Nullable + private BigDecimal measurementLength; + + public static final String JSON_PROPERTY_MEASUREMENT_WIDTH = "measurementWidth"; + @jakarta.annotation.Nullable + private BigDecimal measurementWidth; + + public static final String JSON_PROPERTY_ENUM_VALUES = "enumValues"; + @jakarta.annotation.Nullable + private List enumValues; + + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + @jakarta.annotation.Nullable + private List attributes; + + public static final String JSON_PROPERTY_CUSTOM_FIELDS = "customFields"; + @jakarta.annotation.Nullable + private List customFields; + public static final String JSON_PROPERTY_ESTIMATED_PRICE = "estimatedPrice"; @jakarta.annotation.Nullable private Money estimatedPrice; @@ -118,6 +159,10 @@ public class ItemUpdateRequest { @jakarta.annotation.Nullable private OffsetDateTime purchaseDate; + public static final String JSON_PROPERTY_PURCHASE_PLACE_ID = "purchasePlaceId"; + @jakarta.annotation.Nullable + private Long purchasePlaceId; + public static final String JSON_PROPERTY_SELLING_PRICE = "sellingPrice"; @jakarta.annotation.Nullable private Money sellingPrice; @@ -126,6 +171,10 @@ public class ItemUpdateRequest { @jakarta.annotation.Nullable private OffsetDateTime sellingDate; + public static final String JSON_PROPERTY_SELLING_PLACE_ID = "sellingPlaceId"; + @jakarta.annotation.Nullable + private Long sellingPlaceId; + public ItemUpdateRequest() { } @@ -441,6 +490,206 @@ public void setSold(@jakarta.annotation.Nullable Boolean sold) { } + public ItemUpdateRequest packageSizeId(@jakarta.annotation.Nullable Long packageSizeId) { + this.packageSizeId = packageSizeId; + return this; + } + + /** + * Get packageSizeId + * @return packageSizeId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PACKAGE_SIZE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPackageSizeId() { + return packageSizeId; + } + + + @JsonProperty(value = JSON_PROPERTY_PACKAGE_SIZE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPackageSizeId(@jakarta.annotation.Nullable Long packageSizeId) { + this.packageSizeId = packageSizeId; + } + + + public ItemUpdateRequest materialIds(@jakarta.annotation.Nullable List materialIds) { + this.materialIds = materialIds; + return this; + } + + public ItemUpdateRequest addMaterialIdsItem(Long materialIdsItem) { + if (this.materialIds == null) { + this.materialIds = new ArrayList<>(); + } + this.materialIds.add(materialIdsItem); + return this; + } + + /** + * Get materialIds + * @return materialIds + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MATERIAL_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getMaterialIds() { + return materialIds; + } + + + @JsonProperty(value = JSON_PROPERTY_MATERIAL_IDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMaterialIds(@jakarta.annotation.Nullable List materialIds) { + this.materialIds = materialIds; + } + + + public ItemUpdateRequest measurementLength(@jakarta.annotation.Nullable BigDecimal measurementLength) { + this.measurementLength = measurementLength; + return this; + } + + /** + * Get measurementLength + * @return measurementLength + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_LENGTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMeasurementLength() { + return measurementLength; + } + + + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_LENGTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeasurementLength(@jakarta.annotation.Nullable BigDecimal measurementLength) { + this.measurementLength = measurementLength; + } + + + public ItemUpdateRequest measurementWidth(@jakarta.annotation.Nullable BigDecimal measurementWidth) { + this.measurementWidth = measurementWidth; + return this; + } + + /** + * Get measurementWidth + * @return measurementWidth + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public BigDecimal getMeasurementWidth() { + return measurementWidth; + } + + + @JsonProperty(value = JSON_PROPERTY_MEASUREMENT_WIDTH, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setMeasurementWidth(@jakarta.annotation.Nullable BigDecimal measurementWidth) { + this.measurementWidth = measurementWidth; + } + + + public ItemUpdateRequest enumValues(@jakarta.annotation.Nullable List enumValues) { + this.enumValues = enumValues; + return this; + } + + public ItemUpdateRequest addEnumValuesItem(ItemEnumValue enumValuesItem) { + if (this.enumValues == null) { + this.enumValues = new ArrayList<>(); + } + this.enumValues.add(enumValuesItem); + return this; + } + + /** + * Get enumValues + * @return enumValues + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getEnumValues() { + return enumValues; + } + + + @JsonProperty(value = JSON_PROPERTY_ENUM_VALUES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setEnumValues(@jakarta.annotation.Nullable List enumValues) { + this.enumValues = enumValues; + } + + + public ItemUpdateRequest attributes(@jakarta.annotation.Nullable List attributes) { + this.attributes = attributes; + return this; + } + + public ItemUpdateRequest addAttributesItem(ItemAttribute attributesItem) { + if (this.attributes == null) { + this.attributes = new ArrayList<>(); + } + this.attributes.add(attributesItem); + return this; + } + + /** + * Get attributes + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getAttributes() { + return attributes; + } + + + @JsonProperty(value = JSON_PROPERTY_ATTRIBUTES, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setAttributes(@jakarta.annotation.Nullable List attributes) { + this.attributes = attributes; + } + + + public ItemUpdateRequest customFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + return this; + } + + public ItemUpdateRequest addCustomFieldsItem(ItemCustomField customFieldsItem) { + if (this.customFields == null) { + this.customFields = new ArrayList<>(); + } + this.customFields.add(customFieldsItem); + return this; + } + + /** + * Get customFields + * @return customFields + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_CUSTOM_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getCustomFields() { + return customFields; + } + + + @JsonProperty(value = JSON_PROPERTY_CUSTOM_FIELDS, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setCustomFields(@jakarta.annotation.Nullable List customFields) { + this.customFields = customFields; + } + + public ItemUpdateRequest estimatedPrice(@jakarta.annotation.Nullable Money estimatedPrice) { this.estimatedPrice = estimatedPrice; return this; @@ -513,6 +762,30 @@ public void setPurchaseDate(@jakarta.annotation.Nullable OffsetDateTime purchase } + public ItemUpdateRequest purchasePlaceId(@jakarta.annotation.Nullable Long purchasePlaceId) { + this.purchasePlaceId = purchasePlaceId; + return this; + } + + /** + * Get purchasePlaceId + * @return purchasePlaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_PURCHASE_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getPurchasePlaceId() { + return purchasePlaceId; + } + + + @JsonProperty(value = JSON_PROPERTY_PURCHASE_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setPurchasePlaceId(@jakarta.annotation.Nullable Long purchasePlaceId) { + this.purchasePlaceId = purchasePlaceId; + } + + public ItemUpdateRequest sellingPrice(@jakarta.annotation.Nullable Money sellingPrice) { this.sellingPrice = sellingPrice; return this; @@ -561,6 +834,30 @@ public void setSellingDate(@jakarta.annotation.Nullable OffsetDateTime sellingDa } + public ItemUpdateRequest sellingPlaceId(@jakarta.annotation.Nullable Long sellingPlaceId) { + this.sellingPlaceId = sellingPlaceId; + return this; + } + + /** + * Get sellingPlaceId + * @return sellingPlaceId + */ + @jakarta.annotation.Nullable + @JsonProperty(value = JSON_PROPERTY_SELLING_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Long getSellingPlaceId() { + return sellingPlaceId; + } + + + @JsonProperty(value = JSON_PROPERTY_SELLING_PLACE_ID, required = false) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public void setSellingPlaceId(@jakarta.annotation.Nullable Long sellingPlaceId) { + this.sellingPlaceId = sellingPlaceId; + } + + /** * Return true if this ItemUpdateRequest object is equal to o. */ @@ -585,16 +882,25 @@ public boolean equals(Object o) { Objects.equals(this.sex, itemUpdateRequest.sex) && Objects.equals(this.labels, itemUpdateRequest.labels) && Objects.equals(this.sold, itemUpdateRequest.sold) && + Objects.equals(this.packageSizeId, itemUpdateRequest.packageSizeId) && + Objects.equals(this.materialIds, itemUpdateRequest.materialIds) && + Objects.equals(this.measurementLength, itemUpdateRequest.measurementLength) && + Objects.equals(this.measurementWidth, itemUpdateRequest.measurementWidth) && + Objects.equals(this.enumValues, itemUpdateRequest.enumValues) && + Objects.equals(this.attributes, itemUpdateRequest.attributes) && + Objects.equals(this.customFields, itemUpdateRequest.customFields) && Objects.equals(this.estimatedPrice, itemUpdateRequest.estimatedPrice) && Objects.equals(this.purchasePrice, itemUpdateRequest.purchasePrice) && Objects.equals(this.purchaseDate, itemUpdateRequest.purchaseDate) && + Objects.equals(this.purchasePlaceId, itemUpdateRequest.purchasePlaceId) && Objects.equals(this.sellingPrice, itemUpdateRequest.sellingPrice) && - Objects.equals(this.sellingDate, itemUpdateRequest.sellingDate); + Objects.equals(this.sellingDate, itemUpdateRequest.sellingDate) && + Objects.equals(this.sellingPlaceId, itemUpdateRequest.sellingPlaceId); } @Override public int hashCode() { - return Objects.hash(name, sku, description, photoIds, categoryId, brandId, sizeId, colorIds, state, sex, labels, sold, estimatedPrice, purchasePrice, purchaseDate, sellingPrice, sellingDate); + return Objects.hash(name, sku, description, photoIds, categoryId, brandId, sizeId, colorIds, state, sex, labels, sold, packageSizeId, materialIds, measurementLength, measurementWidth, enumValues, attributes, customFields, estimatedPrice, purchasePrice, purchaseDate, purchasePlaceId, sellingPrice, sellingDate, sellingPlaceId); } @Override @@ -613,11 +919,20 @@ public String toString() { sb.append(" sex: ").append(toIndentedString(sex)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" sold: ").append(toIndentedString(sold)).append("\n"); + sb.append(" packageSizeId: ").append(toIndentedString(packageSizeId)).append("\n"); + sb.append(" materialIds: ").append(toIndentedString(materialIds)).append("\n"); + sb.append(" measurementLength: ").append(toIndentedString(measurementLength)).append("\n"); + sb.append(" measurementWidth: ").append(toIndentedString(measurementWidth)).append("\n"); + sb.append(" enumValues: ").append(toIndentedString(enumValues)).append("\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" customFields: ").append(toIndentedString(customFields)).append("\n"); sb.append(" estimatedPrice: ").append(toIndentedString(estimatedPrice)).append("\n"); sb.append(" purchasePrice: ").append(toIndentedString(purchasePrice)).append("\n"); sb.append(" purchaseDate: ").append(toIndentedString(purchaseDate)).append("\n"); + sb.append(" purchasePlaceId: ").append(toIndentedString(purchasePlaceId)).append("\n"); sb.append(" sellingPrice: ").append(toIndentedString(sellingPrice)).append("\n"); sb.append(" sellingDate: ").append(toIndentedString(sellingDate)).append("\n"); + sb.append(" sellingPlaceId: ").append(toIndentedString(sellingPlaceId)).append("\n"); sb.append("}"); return sb.toString(); } @@ -736,6 +1051,60 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%ssold%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSold())))); } + // add `packageSizeId` to the URL query string + if (getPackageSizeId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spackageSizeId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPackageSizeId())))); + } + + // add `materialIds` to the URL query string + if (getMaterialIds() != null) { + for (int i = 0; i < getMaterialIds().size(); i++) { + joiner.add(String.format(java.util.Locale.ROOT, "%smaterialIds%s%s=%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix), + ApiClient.urlEncode(ApiClient.valueToString(getMaterialIds().get(i))))); + } + } + + // add `measurementLength` to the URL query string + if (getMeasurementLength() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smeasurementLength%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMeasurementLength())))); + } + + // add `measurementWidth` to the URL query string + if (getMeasurementWidth() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%smeasurementWidth%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getMeasurementWidth())))); + } + + // add `enumValues` to the URL query string + if (getEnumValues() != null) { + for (int i = 0; i < getEnumValues().size(); i++) { + if (getEnumValues().get(i) != null) { + joiner.add(getEnumValues().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%senumValues%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `attributes` to the URL query string + if (getAttributes() != null) { + for (int i = 0; i < getAttributes().size(); i++) { + if (getAttributes().get(i) != null) { + joiner.add(getAttributes().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%sattributes%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + + // add `customFields` to the URL query string + if (getCustomFields() != null) { + for (int i = 0; i < getCustomFields().size(); i++) { + if (getCustomFields().get(i) != null) { + joiner.add(getCustomFields().get(i).toUrlQueryString(String.format(java.util.Locale.ROOT, "%scustomFields%s%s", prefix, suffix, + "".equals(suffix) ? "" : String.format(java.util.Locale.ROOT, "%s%d%s", containerPrefix, i, containerSuffix)))); + } + } + } + // add `estimatedPrice` to the URL query string if (getEstimatedPrice() != null) { joiner.add(getEstimatedPrice().toUrlQueryString(prefix + "estimatedPrice" + suffix)); @@ -751,6 +1120,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%spurchaseDate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPurchaseDate())))); } + // add `purchasePlaceId` to the URL query string + if (getPurchasePlaceId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%spurchasePlaceId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getPurchasePlaceId())))); + } + // add `sellingPrice` to the URL query string if (getSellingPrice() != null) { joiner.add(getSellingPrice().toUrlQueryString(prefix + "sellingPrice" + suffix)); @@ -761,6 +1135,11 @@ public String toUrlQueryString(String prefix) { joiner.add(String.format(java.util.Locale.ROOT, "%ssellingDate%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSellingDate())))); } + // add `sellingPlaceId` to the URL query string + if (getSellingPlaceId() != null) { + joiner.add(String.format(java.util.Locale.ROOT, "%ssellingPlaceId%s=%s", prefix, suffix, ApiClient.urlEncode(ApiClient.valueToString(getSellingPlaceId())))); + } + return joiner.toString(); } }