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: []) ⇒ SaleSession
constructor
A new instance of SaleSession.
Constructor Details
#initialize(semanticId, beginDate: nil, endDate: nil, quantity: nil, offers: []) ⇒ SaleSession
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 49 def initialize(semanticId, beginDate: nil, endDate: nil, quantity: nil, offers: []) super(semanticId) @beginDate = beginDate @endDate = endDate @quantity = quantity @offers = offers 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=") end |
Instance Attribute Details
#beginDate ⇒ String
33 34 35 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 33 def beginDate @beginDate end |
#endDate ⇒ String
36 37 38 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 36 def endDate @endDate end |
#offers ⇒ IOffer
42 43 44 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 42 def offers @offers end |
#quantity ⇒ Real
39 40 41 |
# File 'lib/datafoodconsortium/connector/sale_session.rb', line 39 def quantity @quantity end |