merge-api / merge-python-client

The Python SDK for accessing various Merge Unified APIs
Other
6 stars 10 forks source link

Expand object not using value. #60

Closed uriafranko closed 6 months ago

uriafranko commented 9 months ago

When using the Expand enum it sends to the URL the written name of the object OpportunitiesListRequestExpand.STAGE instead of just "stage"

dsinghvi commented 9 months ago

@uriafranko do you have a sample code snippet from the SDK ? I think there is a problem with how the enum is being stringified.

helgi-empower commented 7 months ago

I am running into the same issue. Here is a very simple case

response1 = client.hris.employees.list(expand=EmployeesListRequestExpand.COMPANY)
response1.results[0].company  # returns a string

response2 = client.hris.employees.list(expand="company")
response2.results[0].company  # returns a company object

This issue is not isolated to the expand parameter since show_enum_origins behaves the same.

dsinghvi commented 6 months ago

@helgi-empower this should be fixed in the latest SDK! If you're still running into an issue let us know. For context, Merge uses Fern to generate SDKs and you can see this changelog where the bug was fixed in our Python generator.