Shopify / Shopify/shopify-api-ruby
CustomerAddress.all doesn't return results
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 1.1k
- Forks
- 484
- PR merge metrics
- No merged PRs in 30d
Description
Issue summary
CustomerAddress.all doesn't return results, using Rest API with a private app.
Expected behavior
Returns list with customer's addresses.
Actual behavior
Returns empty list for a customer with an address.
Steps to reproduce the problem
- Create a customer with an address on Shopify.
- Initialise gem with private app config:
ShopifyAPI::Context.setup(
api_key: "",
host_name:"",
scope: "",
session_storage: ShopifyAPI::Auth::FileSessionStorage.new,
is_embedded: false,
is_private: true,
api_version: Rails.application.credentials.shopify.api_version!,
api_secret_key: Rails.application.credentials.shopify.password!,
private_shop: "#{Rails.application.credentials.shopify.shop_name!}.myshopify.com"
)
- Perform
ShopifyAPI::CustomerAddress.all(customer_id: x)and receive[] - Perform
ShopifyAPI::Customer.find(id: x).addressesand confirm the customer actually has an address.
Specifications
shopify_apiversion: 10.1.0- Shopify API version used: 2022-04
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the discrepancy between ShopifyAPI::CustomerAddress.all(customer_id: x) and ShopifyAPI::Customer.find(id: x).addresses using the reported private-app configuration and API version. Trace the CustomerAddress.all request and compare it with the customer addresses response; done means the collection returns the customer's existing addresses, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100