Hi, there!

I'm building a store using Spree only through its API, to work as my
backend, but I'm not being able to update the address of an Order, as
documented in the order's API:

http://api.spreecommerce.com/v1/orders/#modifying-address-information

After executing the PUT, my Order is still with no address
information... Any clue of what I may be doing wrong?


Regards!
Tiago.

--
You received this message because you are subscribed to the Google Groups "Spree" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Ryan Bigg at Feb 8, 2013 at 10:50 pm
    Could you provide an example of how you make this request?


    On 09/02/2013, at 8:32, Tiago Motta Jorge wrote:

    Hi, there!

    I'm building a store using Spree only through its API, to work as my backend, but I'm not being able to update the address of an Order, as documented in the order's API:

    http://api.spreecommerce.com/v1/orders/#modifying-address-information

    After executing the PUT, my Order is still with no address information... Any clue of what I may be doing wrong?


    Regards!
    Tiago.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tiago Motta Jorge at Feb 9, 2013 at 12:13 pm
    Sure! We are doing this request exactly as explained in the
    documentation (http://api.spreecommerce.com/v1/orders/#modifying-address-information):

    PUT /api/orders/<our Order's
    RXXX>/address?billing_address[firstname]="first
    name"&billing_address[lastname]="last name"&...

    We tried passing only the billing_address, only the shipping_address
    and both, and it didn't work on any of these combinations... We are
    using the Spree's 1-3-stable branch on our Gemfile, with these
    revisions:

    spree => 99f25ccddf1d1198b7c141d89a2a1402f76b5943
    spree_auth_devise => ab03a7a22740b52f96bf0311a1e9f18a99ee02f2

    Should we try updating to a newer revision?

    The Spree's response to this PUT is a "OK", but the address
    information is not changing in the database... Any idea of what we may
    be doing wrong?


    Regards!
    Tiago.

    On Fri, Feb 8, 2013 at 8:50 PM, Ryan Bigg wrote:
    Could you provide an example of how you make this request?



    On 09/02/2013, at 8:32, Tiago Motta Jorge wrote:

    Hi, there!

    I'm building a store using Spree only through its API, to work as my
    backend, but I'm not being able to update the address of an Order, as
    documented in the order's API:

    http://api.spreecommerce.com/v1/orders/#modifying-address-information

    After executing the PUT, my Order is still with no address information...
    Any clue of what I may be doing wrong?


    Regards!
    Tiago.

    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.



    --
    You received this message because you are subscribed to the Google Groups
    "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tiago Motta Jorge at Feb 10, 2013 at 2:17 pm
    Hi, there!

    I found the problem: there is no implementation for the "address" action
    at the Api::OrdersController! I've opened an issue on github about that:
    #2546

    I'll try to fix it and submit a PR.


    Regards!
    Tiago.

    Em sábado, 9 de fevereiro de 2013 21h35min05s UTC-2, Tiago Motta Jorge
    escreveu:
    Sorry, my mistake: the Orders' API is NOT adding addresses to the
    addresses table, neither. It is simply not doing nothing at all.

    Still investigating why...


    Regards,
    Tiago.


    Em sábado, 9 de fevereiro de 2013 21h06min07s UTC-2, Tiago Motta Jorge
    escreveu:
    Some updates on my investigation about this problem:

    (1) There is no test that verifies that an address can be added to an
    Order through the Orders' API. There is only a test that verifies that an
    address can be updated through the Addresses API;

    (2) I found that the address is being inserted into the addresses table,
    but its id is not being added to the orders table;

    So, it appears that we have found a bug! Don't we?


    Regards!
    Tiago.
    --
    You received this message because you are subscribed to the Google Groups "Spree" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupspree-user @
categoriesrubyonrails
postedFeb 8, '13 at 9:32p
activeFeb 10, '13 at 2:17p
posts4
users2
websitespreecommerce.com
irc#RubyOnRails

2 users in discussion

Tiago Motta Jorge: 3 posts Ryan Bigg: 1 post

People

Translate

site design / logo © 2023 Grokbase