Module: RubyOmx::Items

Defined in:
lib/ruby_omx/items.rb

Instance Method Summary collapse

Instance Method Details

#build_custom_item_info_request(attrs = {}) ⇒ Object

Customer Item Information Request



20
21
22
# File 'lib/ruby_omx/items.rb', line 20

def build_custom_item_info_request(attrs={})
  CustomItemInfoRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))		  
end

#build_inventory_info_request(attrs = {}) ⇒ Object

Inventory Availability



79
80
81
# File 'lib/ruby_omx/items.rb', line 79

def build_inventory_info_request(attrs={})
  InventoryInfoRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))
end

#build_item_info_request(attrs = {}) ⇒ Object

ItemInformationRequest (ITIR100) This request type lists the name, default prices, inventory availability, sub-items, cross-sell items, substitution items, and bundle items for a given item code.



6
7
8
# File 'lib/ruby_omx/items.rb', line 6

def build_item_info_request(attrs={})
  ItemInfoRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))
end

#build_item_price_update_request(attrs = {}) ⇒ Object

Item Price Update Request



50
51
52
# File 'lib/ruby_omx/items.rb', line 50

def build_item_price_update_request(attrs={})
  ItemPriceUpdateRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))
end

#build_item_update_request(attrs = {}) ⇒ Object

Item Update Request



35
36
37
# File 'lib/ruby_omx/items.rb', line 35

def build_item_update_request(attrs={})
  ItemUpdateRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))
end

#build_supplier_item_update_request(attrs = {}) ⇒ Object

Supplier Item Update Request



65
66
67
# File 'lib/ruby_omx/items.rb', line 65

def build_supplier_item_update_request(attrs={})
  SupplierItemUpdateRequest.new(attrs.merge({:udi_auth_token=>@udi_auth_token, :http_biz_id=>@http_biz_id}))
end

#send_custom_item_info_request(attrs = {}) ⇒ Object Also known as: get_custom_item_info



24
25
26
27
28
29
# File 'lib/ruby_omx/items.rb', line 24

def send_custom_item_info_request(attrs={})
  request = build_custom_item_info_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    CustomItemInfoResponse.format(response)
end

#send_inventory_info_request(attrs = {}) ⇒ Object Also known as: fetch_inventory



83
84
85
86
87
88
# File 'lib/ruby_omx/items.rb', line 83

def send_inventory_info_request(attrs={})
  request = build_inventory_info_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    InventoryInfoResponse.format(response)
end

#send_item_info_request(attrs = {}) ⇒ Object Also known as: get_item_info



10
11
12
13
14
15
# File 'lib/ruby_omx/items.rb', line 10

def send_item_info_request(attrs={})
  request = build_item_info_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    ItemInfoResponse.format(response)		  
end

#send_item_price_update_request(attrs = {}) ⇒ Object Also known as: append_item_price



54
55
56
57
58
59
# File 'lib/ruby_omx/items.rb', line 54

def send_item_price_update_request(attrs={})
  request = build_item_price_update_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    ItemPriceUpdateResponse.format(response)		  
end

#send_item_update_request(attrs = {}) ⇒ Object Also known as: append_item



39
40
41
42
43
44
# File 'lib/ruby_omx/items.rb', line 39

def send_item_update_request(attrs={})
  request = build_item_update_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    ItemUpdateResponse.format(response)		  
end

#send_supplier_item_update_request(attrs = {}) ⇒ Object Also known as: append_supplier_item



69
70
71
72
73
74
# File 'lib/ruby_omx/items.rb', line 69

def send_supplier_item_update_request(attrs={})
  request = build_supplier_item_update_request(attrs)
    response = post(request.to_xml.to_s)
    return response if request.raw_xml==true || request.raw_xml==1
    SupplierItemUpdateResponse.format(response)		  
end