Class: Gemgento::API::SOAP::Checkout::Shipping

Inherits:
Object
  • Object
show all
Defined in:
lib/gemgento/api/soap/checkout/shipping.rb

Class Method Summary collapse

Class Method Details

.list(quote) ⇒ Gemgento::MagentoResponse

Retrieve a list of shipping methods for a Quote from Magento.

Parameters:

Returns:



11
12
13
14
15
16
17
# File 'lib/gemgento/api/soap/checkout/shipping.rb', line 11

def self.list(quote)
  message = {
      quote_id: quote.magento_id,
      store_id: quote.store.magento_id
  }
  MagentoApi.create_call(:shopping_cart_shipping_list, message)
end

.method(quote, shipping_method) ⇒ Gemgento::MagentoResponse

Set the Quote shipping method in Magento.

Parameters:

Returns:



24
25
26
27
28
29
30
31
# File 'lib/gemgento/api/soap/checkout/shipping.rb', line 24

def self.method(quote, shipping_method)
  message = {
      quote_id: quote.magento_id,
      method: shipping_method,
      store_id: quote.store.magento_id
  }
  MagentoApi.create_call(:shopping_cart_shipping_method, message)
end