Class: DataFoodConsortium::Connector::Order

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(semanticId, number: "", date: "", saleSession: nil, lines: [], client: nil) ⇒ Order

Returns a new instance of Order.

Parameters:

  • semanticId (String)
  • number (String) (defaults to: "")
  • date (String) (defaults to: "")
  • saleSession (ISaleSession) (defaults to: nil)
  • lines (IOrderLine) (defaults to: [])
  • client (IAgent) (defaults to: nil)


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

#clientIAgent

Returns:

  • (IAgent)


46
47
48
# File 'lib/datafoodconsortium/connector/order.rb', line 46

def client
  @client
end

#dateString

Returns:

  • (String)


37
38
39
# File 'lib/datafoodconsortium/connector/order.rb', line 37

def date
  @date
end

#linesIOrderLine

Returns:

  • (IOrderLine)


43
44
45
# File 'lib/datafoodconsortium/connector/order.rb', line 43

def lines
  @lines
end

#numberString

Returns:

  • (String)


34
35
36
# File 'lib/datafoodconsortium/connector/order.rb', line 34

def number
  @number
end

#saleSessionISaleSession

Returns:

  • (ISaleSession)


40
41
42
# File 'lib/datafoodconsortium/connector/order.rb', line 40

def saleSession
  @saleSession
end