bjjb / ebayr

A small library to help using the eBay Trading API with Ruby
MIT License
60 stars 49 forks source link

How can I sumbit multi node in a same name? #3

Closed pepsin closed 11 years ago

pepsin commented 11 years ago

Like this:

shippings.each do |s|
      :ShippingServiceOptions => {
        :ShippingServicePriority => 1,
        :ShippingService => s.name,
        :ShippingServiceCost => s.cost
      }
 end

obviously if in hash the same key will be overwrite by the latest. How can I solve this problem? Or I should add a dirty hack myself?

bjjb commented 11 years ago

@pepsin Please give more background about what you're trying to do.

pepsin commented 11 years ago

I am publishing items to ebay using ebayr, it's a simple and elegant gem. But there's a catch, my items needs to offer multiple shipping service, when the XML is build by Hash, and with the key should all have the same name "ShippingServiceOptions", there seems no way to offer the multiple shipping.

pepsin commented 11 years ago

Ok, I will let you know if it fail, thanks.

pepsin commented 11 years ago

Works Fine. Thanks.

bjjb commented 11 years ago

:bow: . Thanks for testing!