Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing the taxes_included property on a ShopifyAPI::Shop object returns a Sorbet TypeError #1170

Open
raphaelfeitoza opened this issue Jun 13, 2023 · 0 comments
Assignees

Comments

@raphaelfeitoza
Copy link

Issue summary

Accessing the taxes_included property on a ShopifyAPI::Shop object returns a Sorbet TypeError due to a mismatch between the auto-generated type on the ShopifyAPI::Shop class and what gets returned in the body of the response

  • shopify_api version: 13.0.0
  • Ruby version: 3.2.2
  • Operating system: macOS
[12] pry(#<ShopRepository>)> shopify_shop.taxes_included
TypeError: Return value: Expected type T.nilable(String), got type FalseClass
Caller: (pry):10

Expected behavior

ShopifyAPI::Shop.all.first.taxes_included should return nillable boolean.

From the documentation: taxes_included: Whether applicable taxes are included in product prices. Valid values: true or null.

Actual behavior

ShopifyAPI::Shop.all.first.taxes_included returns a Sorbet type error: TypeError: Return value: Expected type T.nilable(String), got type FalseClass

Steps to reproduce the problem

  1. retrieve an Shop object through the auto-generated REST API resource class: shop = ShopifyAPI::Shop.all.first
  2. try to access the arguments property: shop.taxes_included
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

No branches or pull requests

2 participants