Skip to content

Commit c3b4dd2

Browse files
authored
Merge pull request #93 from ParclLabs/seller-param
Seller param
2 parents 4c79a41 + 773c193 commit c3b4dd2

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
### v1.16.0
2+
- Added the `entity_seller_name` parameter to the `property_v2.search` endpoint
3+
14
### v1.15.2
25
- Update `property_v2.search` to fix limit logic bug.
36

parcllabs/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "1.15.2"
1+
VERSION = "1.16.0"

parcllabs/schemas/schemas.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ class PropertyV2RetrieveParams(BaseModel):
101101
owner_name: list[str] | None = Field(
102102
default=None, description="List of owner names to filter by"
103103
)
104+
entity_seller_name: list[str] | None = Field(
105+
default=None, description="List of entity seller names to filter by"
106+
)
104107
is_investor_owned: bool | None = Field(
105108
default=None, description="Whether to filter by investor owned"
106109
)
@@ -169,6 +172,14 @@ def validate_owner_names(cls, v: list[str] | None) -> list[str] | None:
169172
return [name.upper() for name in v]
170173
return v
171174

175+
@field_validator("entity_seller_name")
176+
@classmethod
177+
def validate_entity_seller_names(cls, v: list[str] | None) -> list[str] | None:
178+
"""Validate entity seller names and convert to uppercase."""
179+
if v is not None:
180+
return [name.upper() for name in v]
181+
return v
182+
172183
@field_validator(
173184
"min_record_added_date",
174185
"max_record_added_date",

parcllabs/services/properties/property_v2.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,12 @@ def _build_owner_filters(self, params: PropertyV2RetrieveParams) -> dict[str, An
412412
if params.owner_name:
413413
owner_filters["owner_name"] = [owner_name.upper() for owner_name in params.owner_name]
414414

415+
# Handle entity seller names
416+
if params.entity_seller_name:
417+
owner_filters["entity_seller_name"] = [
418+
entity_seller_name.upper() for entity_seller_name in params.entity_seller_name
419+
]
420+
415421
# Handle boolean parameters
416422
if params.is_current_owner is not None:
417423
owner_filters["is_current_owner"] = self.simple_bool_validator(params.is_current_owner)
@@ -482,6 +488,7 @@ def retrieve(
482488
max_record_updated_date: str | None = None,
483489
is_current_owner: bool | None = None,
484490
owner_name: list[str] | None = None,
491+
entity_seller_name: list[str] | None = None,
485492
is_investor_owned: bool | None = None,
486493
is_owner_occupied: bool | None = None,
487494
current_on_market_flag: bool | None = None,
@@ -525,6 +532,7 @@ def retrieve(
525532
max_record_updated_date: Maximum record updated date to filter by.
526533
is_current_owner: Whether to filter by current owner.
527534
owner_name: List of owner names to filter by.
535+
entity_seller_name: List of entity seller names to filter by.
528536
is_investor_owned: Whether to filter by investor owned.
529537
is_owner_occupied: Whether to filter by owner occupied.
530538
current_on_market_flag: Whether to filter by current_on_market flag.
@@ -569,6 +577,7 @@ def retrieve(
569577
max_record_updated_date=max_record_updated_date,
570578
is_current_owner=is_current_owner,
571579
owner_name=owner_name,
580+
entity_seller_name=entity_seller_name,
572581
is_investor_owned=is_investor_owned,
573582
is_owner_occupied=is_owner_occupied,
574583
current_on_market_flag=current_on_market_flag,

0 commit comments

Comments
 (0)