Skip to content

Issue/70 property access#73

Open
bogdanadrianmarc wants to merge 23 commits intomainfrom
issue/70-property-access
Open

Issue/70 property access#73
bogdanadrianmarc wants to merge 23 commits intomainfrom
issue/70-property-access

Conversation

@bogdanadrianmarc
Copy link
Copy Markdown
Contributor

This PR addresses issue #70 by changing how property access works in sapi-client-ruby. path_first and path_all retain their original functionality, while direct property access such as calling resource methods directly (for example instead of doing path_all('jurisdictionDetail') one can do jurisdictionDetail as a method call) will return the value if that property is in the API returned JSON, nil if the property is not in the returned JSON but is in the model spec, or raise a MethodMissing exception if none of the above evaluates to true

@bogdanadrianmarc bogdanadrianmarc self-assigned this Mar 11, 2026
@bogdanadrianmarc bogdanadrianmarc marked this pull request as draft March 11, 2026 16:16
@bogdanadrianmarc bogdanadrianmarc marked this pull request as ready for review March 13, 2026 19:32
@bogdanadrianmarc
Copy link
Copy Markdown
Contributor Author

Thanks @ajtucker for fixing the logic on this! I added some code as well for the edge case where the property is not in the data or model and the camel case property is not in the data but present in the model

@ajtucker ajtucker linked an issue Mar 27, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spike: property access

2 participants