Shopify / Shopify/shopify-api-ruby

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

Open
#1,170 0 comments 0 reactions 1 assignee View on GitHub

@mllemango is already working on this.

Since Sep 13, 2023.

Dominant language
Ruby
Stars
1.1k
Forks
484
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.