Sha256: 61366d77237c4aaa63f1a4e9e0f36a57af11bf43efaf9accf696cbf1055a7d80
Contents?: true
Size: 1.66 KB
Versions: 1
Compression:
Stored size: 1.66 KB
Contents
# ----------------------------------------------------------------------- # Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved. # ----------------------------------------------------------------------- require 'App42_Ruby_API/App42Response' # # # This Catalogue object is the value object which contains the properties of # Catalogue. # # module App42 module Shopping class Catalogue < App42Response attr_accessor :name, :description, :categoryList @name @description @categoryList = Array.new end class Category attr_accessor :name, :description, :itemList @name @description @itemList = Array.new # # This is a constructor that takes no parameter # # def initialize(catalogue) catalogue.categoryList.push(self) end # # Returns the Cart Response in JSON format. # # @return the response in JSON format. # def to_s return "name : #{@name}" + "description : #{@description}"; end end class Item attr_accessor :itemId, :name, :description, :url, :price, :tinyUrl @itemId @name @description @url @price @tinyUrl # # This is a constructor that takes no parameter # def initialize(category) category.itemList.push(self) end # # Returns the Cart Response in JSON format. # # @return the response in JSON format. # # def toString return "itemId : #{@itemId}" + "name : #{@name}" + "description : #{@description}" + "url : #{@url}" + "price : #{@price}"; end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
App42_Ruby_API-0.8.4 | lib/shopping/Catalogue.rb |