Class: DataFoodConsortium::Connector::SaleSession
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::SaleSession
- Includes:
- VirtualAssembly::Semantizer::SemanticObject
- Defined in:
- lib/datafoodconsortium/connector/sale_session.rb
Constant Summary collapse
- SEMANTIC_TYPE =
"dfc-b:SaleSession".freeze
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(semanticId, beginDate: nil, endDate: nil, quantity: nil, offers: [], hostingPlaces: []) ⇒ SaleSession
constructor
A new instance of SaleSession.
Constructor Details
#initialize(semanticId, beginDate: nil, endDate: nil, quantity: nil, offers: [], hostingPlaces: []) ⇒ SaleSession
Returns a new instance of SaleSession.
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 55 def initialize(semanticId, beginDate: nil, endDate: nil, quantity: nil, offers: [], hostingPlaces: []) super(semanticId) @beginDate = beginDate @endDate = endDate @quantity = quantity @offers = offers @hostingPlaces = hostingPlaces self.semanticType = "dfc-b:SaleSession" registerSemanticProperty("dfc-b:beginDate", &method("beginDate")).valueSetter = method("beginDate=") registerSemanticProperty("dfc-b:endDate", &method("endDate")).valueSetter = method("endDate=") registerSemanticProperty("dfc-b:quantity", &method("quantity")).valueSetter = method("quantity=") registerSemanticProperty("dfc-b:lists", &method("offers")).valueSetter = method("offers=") registerSemanticProperty("dfc-b:hostedAt", &method("hostingPlaces")).valueSetter = method("hostingPlaces=") end |
Instance Attribute Details
#beginDate ⇒ DateTime
35 36 37 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 35 def beginDate @beginDate end |
#endDate ⇒ DateTime
38 39 40 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 38 def endDate @endDate end |
#hostingPlaces ⇒ IPlace
47 48 49 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 47 def hostingPlaces @hostingPlaces end |
#offers ⇒ IOffer
44 45 46 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 44 def offers @offers end |
#quantity ⇒ Real
41 42 43 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 41 def quantity @quantity end |