-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix customer history retrieval and internal list item support
Signed-off-by: Jan N. Klug <[email protected]>
- Loading branch information
Showing
7 changed files
with
192 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...java/org/smarthomej/binding/amazonechocontrol/internal/dto/push/PushListItemChangeTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright (c) 2021-2023 Contributors to the SmartHome/J project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.smarthomej.binding.amazonechocontrol.internal.dto.push; | ||
|
||
/** | ||
* The {@link PushListItemChangeTO} encapsulates a PUSH_LIST_ITEM_CHANGE message | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
public class PushListItemChangeTO { | ||
public String listId; | ||
public String listItemId; | ||
public int version; | ||
public String eventName; | ||
public String destinationUserId; | ||
} |
39 changes: 39 additions & 0 deletions
39
.../main/java/org/smarthomej/binding/amazonechocontrol/internal/dto/response/ListItemTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* Copyright (c) 2021-2023 Contributors to the SmartHome/J project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.smarthomej.binding.amazonechocontrol.internal.dto.response; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
|
||
/** | ||
* The {@link ListItemTO} encapsulates a single list item | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
public class ListItemTO { | ||
public String listId; | ||
public boolean shoppingListItem; | ||
public String customerId; | ||
public long createdDateTime; | ||
public boolean completed; | ||
public String id; | ||
public String value; | ||
public int version; | ||
public long updatedDateTime; | ||
|
||
@Override | ||
public @NonNull String toString() { | ||
return "ListItemTO{listId='" + listId + "', shoppingListItem=" + shoppingListItem + ", customerId='" | ||
+ customerId + "', createdDateTime=" + createdDateTime + ", completed=" + completed + ", id='" + id | ||
+ "', value='" + value + "', version=" + version + ", updatedDateTime=" + updatedDateTime + "}"; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...java/org/smarthomej/binding/amazonechocontrol/internal/dto/response/NamedListsInfoTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* Copyright (c) 2021-2023 Contributors to the SmartHome/J project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.smarthomej.binding.amazonechocontrol.internal.dto.response; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
|
||
/** | ||
* The {@link NamedListsInfoTO} encapsulates the response of /api/namedLists/listId | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
public class NamedListsInfoTO { | ||
public List<String> listIds; | ||
public long updatedDate; | ||
public String type; | ||
public int version; | ||
public boolean defaultList; | ||
public boolean archived; | ||
public String itemId; | ||
public long createdDate; | ||
public Object listReorderVersion; | ||
public Object originalAudioId; | ||
public String customerId; | ||
public String name; | ||
public Object nbestItems; | ||
|
||
@Override | ||
public @NonNull String toString() { | ||
return "NamedListsInfoTO{listIds=" + listIds + ", updatedDate=" + updatedDate + ", type='" + type | ||
+ "', version=" + version + ", defaultList=" + defaultList + ", archived=" + archived + ", itemId='" | ||
+ itemId + "', createdDate=" + createdDate + ", listReorderVersion=" + listReorderVersion | ||
+ ", originalAudioId=" + originalAudioId + ", customerId='" + customerId + "', name=" + name | ||
+ ", nbestItems=" + nbestItems + "}"; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
...ava/org/smarthomej/binding/amazonechocontrol/internal/dto/response/NamedListsItemsTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* Copyright (c) 2021-2023 Contributors to the SmartHome/J project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.smarthomej.binding.amazonechocontrol.internal.dto.response; | ||
|
||
import java.util.List; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
|
||
/** | ||
* The {@link NamedListsItemsTO} encapsulate the response of /api/namedLists/listId/items | ||
* | ||
* @author Jan N. Klug - Initial contribution | ||
*/ | ||
public class NamedListsItemsTO { | ||
public Object listReorderVersion; | ||
public List<ListItemTO> list; | ||
|
||
@Override | ||
public @NonNull String toString() { | ||
return "NamedListsItemsTO{listReorderVersion=" + listReorderVersion + ", list=" + list + "}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters