Skip to content

Commit 255ade1

Browse files
authored
Add product type back (#766)
1 parent 71b8213 commit 255ade1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/spotifyaio/models.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,13 @@ class Category(DataClassORJSONMixin):
525525
icons: list[Image]
526526

527527

528+
class ProductType(StrEnum):
529+
"""Product type."""
530+
531+
PREMIUM = "premium"
532+
FREE = "free"
533+
534+
528535
@dataclass
529536
class BaseUserProfile(DataClassORJSONMixin):
530537
"""Base user profile model."""
@@ -540,6 +547,8 @@ class BaseUserProfile(DataClassORJSONMixin):
540547
class UserProfile(BaseUserProfile):
541548
"""User profile model."""
542549

550+
product: ProductType
551+
543552

544553
@dataclass
545554
class SimplifiedShow(DataClassORJSONMixin):

tests/__snapshots__/test_spotify.ambr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4246,6 +4246,7 @@
42464246
}),
42474247
]),
42484248
'object_type': 'user',
4249+
'product': <ProductType.PREMIUM: 'premium'>,
42494250
'uri': 'spotify:user:1112264649',
42504251
'user_id': '1112264649',
42514252
})

0 commit comments

Comments
 (0)