Customer.search returns HTTPResponse instead of array of Customer object
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Comienza en el punto de entrada ShopifyAPI::Customer.search y sigue cómo se devuelve su respuesta en comparación con las API de otros recursos. Reproduce la consulta mostrada en el issue y verifica que el resultado sea un array de objetos Customer, no un objeto HttpResponse.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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:[email protected]")
=>
#<ShopifyAPI::Clients::HttpResponse:0x000000012c452bd0
@api_call_limit={request_count: 1, bucket_size: 40},
@body=
{"customers" =>
[{"id" => 7209130524768,
"email" => "[email protected]",
So as a client I have to do this:
ShopifyAPI::Customer.search(query: "email:[email protected]").body["customers"].map { ShopifyAPI::Customer.new(from_hash: it) }
Debug logs
// Paste any relevant logs here
- Lenguaje dominante
- Ruby
- Estrellas
- 1.1k
- Forks
- 484
- Merge medio
- 4 h 38 min
- PR fusionados (30 d)
- 1
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Shopify/shopify-api-ruby
-
devtools-gardener
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Shopify/shopify-api-ruby#1456 · 3 reacciones ·
-
devtools-gardener
Dificultad 3/5 1-2 días Aptitud para principiantes 67/100
Shopify/shopify-api-ruby#1461 · 1 comentario ·
-
automated
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Shopify/shopify-api-ruby#1460 ·
-
devtools-gardener
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Shopify/shopify-api-ruby#1455 ·
-
devtools-gardener
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Shopify/shopify-api-ruby#1453 · 1 comentario ·
Todos los issues de Shopify/shopify-api-ruby
Issues similares
-
area/web interface
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
chef/mixlib-shellout#287 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día