Skip to content

Commit

Permalink
Merge pull request #62 from NodeJSmith/fix/member_referrer_and_others
Browse files Browse the repository at this point in the history
Fix/member referrer and others
  • Loading branch information
NodeJSmith authored Nov 13, 2024
2 parents 079da5b + a144cd5 commit d24ed38
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "0.8.0"
current_version = "0.8.1"

parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:-(?P<dev_l>dev)(?P<dev>0|[1-9]\\d*))?"

Expand Down
2 changes: 1 addition & 1 deletion examples/workout_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


async def main():
otf = otf = Otf(USERNAME, PASSWORD)
otf = Otf(USERNAME, PASSWORD)

resp = await otf.get_member_lifetime_stats()
print(resp.model_dump_json(indent=4))
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "otf-api"
version = "0.8.0"
version = "0.8.1"
description = "Python OrangeTheory Fitness API Client"
authors = ["Jessica Smith <[email protected]>"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion src/otf_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .api import Otf
from .auth import OtfUser

__version__ = "0.8.0"
__version__ = "0.8.1"


__all__ = ["Otf", "OtfUser"]
11 changes: 8 additions & 3 deletions src/otf_api/models/member_detail.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from datetime import date, datetime
from typing import Any

from pydantic import Field, field_validator

Expand Down Expand Up @@ -73,6 +74,10 @@ class MemberClassSummary(OtfItemBase):
last_class_studio_visited: int = Field(..., alias="lastClassStudioVisited")


class MemberReferrer(OtfItemBase):
member_referrer_uuid: str = Field(..., alias="memberReferrerUUId")


class MemberDetail(OtfItemBase):
member_id: int = Field(..., alias="memberId")
member_uuid: str = Field(..., alias="memberUUId")
Expand Down Expand Up @@ -101,7 +106,7 @@ class MemberDetail(OtfItemBase):
cc_last4: str = Field(..., alias="ccLast4")
cc_type: str = Field(..., alias="ccType")
gender: str
liability: None
liability: Any
locale: str
weight: int
weight_measure: str = Field(..., alias="weightMeasure")
Expand All @@ -113,7 +118,7 @@ class MemberDetail(OtfItemBase):
year_imported: int = Field(..., alias="yearImported")
is_member_verified: bool = Field(..., alias="isMemberVerified")
lead_prospect: bool = Field(..., alias="leadProspect")
created_by: str = Field(..., alias="createdBy")
created_by: str | None = Field(None, alias="createdBy")
created_date: datetime = Field(..., alias="createdDate")
updated_by: str = Field(..., alias="updatedBy")
updated_date: datetime = Field(..., alias="updatedDate")
Expand All @@ -122,7 +127,7 @@ class MemberDetail(OtfItemBase):
member_credit_card: MemberCreditCard | None = Field(None, alias="memberCreditCard")
home_studio: HomeStudio = Field(..., alias="homeStudio")
member_profile: MemberProfile = Field(..., alias="memberProfile")
member_referrer: None = Field(..., alias="memberReferrer")
member_referrer: None | MemberReferrer = Field(None, alias="memberReferrer")
otf_acs_id: str = Field(..., alias="otfAcsId")
member_class_summary: MemberClassSummary | None = Field(None, alias="memberClassSummary")

Expand Down

0 comments on commit d24ed38

Please sign in to comment.