Class: Gemgento::API::SOAP::StockNotification

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

Class Method Summary collapse

Class Method Details

.add(product_id, product_name, product_url, name, email, phone) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/gemgento/api/soap/stock_notification.rb', line 6

def self.add(product_id, product_name, product_url, name, email, phone)
  message = {
      product_id: product_id,
      product_name: product_name,
      product_url: product_url,
      name: name,
      email: email,
      phone: phone
  }
  response = MagentoApi.create_call(:stocknotification_add, message)

  if response.success?
    return true
  else
    return response.body[:faultstring]
  end
end