-
Notifications
You must be signed in to change notification settings - Fork 481
Open
Description
Issue summary
Before opening this issue, I have:
- Upgraded to the latest version of the package
shopify_apiversion: 14.8.0- Ruby version: 3.4.1
- Operating system: OS X
- Set
log_level: :debugin my configuration, if applicable - Found a reliable way to reproduce the problem that indicates it's a problem with the package
- Looked for similar issues in this repository
- Checked that this isn't an issue with a Shopify API
- If it is, please create a post in the Shopify community forums or report it to Shopify Partner Support
When calling ShopifyAPI::Customer.search the result is an ShopifyAPI::Clients::HttpResponse object. This is pretty different than other API's, most (all?) of which seem to return resource objects
Expected behavior
Returned value should be an array of Customer Objects
Actual behavior
It's an HTTPResponse Object
Steps to reproduce the problem
Demonstrating a call:
3.4.1 :049 > ShopifyAPI::Customer.search(query: "email:tim@example.com")
=>
#<ShopifyAPI::Clients::HttpResponse:0x000000012c452bd0
@api_call_limit={request_count: 1, bucket_size: 40},
@body=
{"customers" =>
[{"id" => 7209130524768,
"email" => "tim@example.com",So as a client I have to do this:
ShopifyAPI::Customer.search(query: "email:tim@example.com").body["customers"].map { ShopifyAPI::Customer.new(from_hash: it) }Debug logs
// Paste any relevant logs here
Metadata
Metadata
Assignees
Labels
No labels