Class: DataFoodConsortium::Connector::SaleSession

Inherits:
Object
  • Object
show all
Includes:
VirtualAssembly::Semantizer::SemanticObject
Defined in:
lib/datafoodconsortium/connector/sale_session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(semanticId, beginDate: "", endDate: "", quantity: 0.0, offers: []) ⇒ SaleSession

Returns a new instance of SaleSession.

Parameters:

  • semanticId (String)
  • beginDate (String) (defaults to: "")
  • endDate (String) (defaults to: "")
  • quantity (Real) (defaults to: 0.0)
  • offers (IOffer) (defaults to: [])


48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 48

def initialize(semanticId, beginDate: "", endDate: "", quantity: 0.0, offers: [])
	super(semanticId)
	@beginDate = beginDate
	@endDate = endDate
	@quantity = quantity
	@offers = offers
	self.semanticType = "dfc-b:SaleSession"
	registerSemanticProperty("dfc-b:beginDate") { self.beginDate }
	registerSemanticProperty("dfc-b:endDate") { self.endDate }
	registerSemanticProperty("dfc-b:quantity") { self.quantity }
	registerSemanticProperty("dfc-b:lists") { self.offers }
end

Instance Attribute Details

#beginDateString

Returns:

  • (String)


32
33
34
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 32

def beginDate
  @beginDate
end

#endDateString

Returns:

  • (String)


35
36
37
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 35

def endDate
  @endDate
end

#offersIOffer

Returns:

  • (IOffer)


41
42
43
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 41

def offers
  @offers
end

#quantityReal

Returns:

  • (Real)


38
39
40
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 38

def quantity
  @quantity
end