Class: DataFoodConsortium::Connector::Order
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::Order
- Includes:
- VirtualAssembly::Semantizer::SemanticObject
- Defined in:
- lib/datafoodconsortium/connector/order.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize(semanticId, number: "", date: "", saleSession: nil, lines: [], client: nil) ⇒ Order
constructor
A new instance of Order.
Constructor Details
#initialize(semanticId, number: "", date: "", saleSession: nil, lines: [], client: nil) ⇒ Order
Returns a new instance of Order.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/datafoodconsortium/connector/order.rb', line 54 def initialize(semanticId, number: "", date: "", saleSession: nil, lines: [], client: nil) super(semanticId) @number = number @date = date @saleSession = saleSession @lines = lines @client = client self.semanticType = "dfc-b:Order" registerSemanticProperty("dfc-b:orderNumber") { self.number } registerSemanticProperty("dfc-b:date") { self.date } registerSemanticProperty("dfc-b:belongsTo") { self.saleSession } registerSemanticProperty("dfc-b:hasPart") { self.lines } registerSemanticProperty("dfc-b:orderedBy") { self.client } end |
Instance Attribute Details
#client ⇒ IAgent
46 47 48 |
# File 'lib/datafoodconsortium/connector/order.rb', line 46 def client @client end |
#date ⇒ String
37 38 39 |
# File 'lib/datafoodconsortium/connector/order.rb', line 37 def date @date end |
#lines ⇒ IOrderLine
43 44 45 |
# File 'lib/datafoodconsortium/connector/order.rb', line 43 def lines @lines end |
#number ⇒ String
34 35 36 |
# File 'lib/datafoodconsortium/connector/order.rb', line 34 def number @number end |
#saleSession ⇒ ISaleSession
40 41 42 |
# File 'lib/datafoodconsortium/connector/order.rb', line 40 def saleSession @saleSession end |