Class: DataFoodConsortium::Connector::PaymentMethod

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

Constant Summary collapse

SEMANTIC_TYPE =
"dfc-b:PaymentMethod".freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(semanticId, name: nil, description: nil, price: nil, provider: nil, type: nil) ⇒ PaymentMethod

Returns a new instance of PaymentMethod.

Parameters:

  • semanticId (String)
  • name (String) (defaults to: nil)
  • description (String) (defaults to: nil)
  • price (IPrice) (defaults to: nil)
  • provider (String) (defaults to: nil)
  • type (String) (defaults to: nil)


53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 53

def initialize(semanticId, name: nil, description: nil, price: nil, provider: nil, type: nil)
  super(semanticId)
  @name = name
  @description = description
  @price = price
  @provider = provider
  @type = type
  self.semanticType = "dfc-b:PaymentMethod"
  registerSemanticProperty("dfc-b:name", &method("name")).valueSetter = method("name=")
  registerSemanticProperty("dfc-b:description", &method("description")).valueSetter = method("description=")
  registerSemanticProperty("dfc-b:hasPrice", &method("price")).valueSetter = method("price=")
  registerSemanticProperty("dfc-b:paymentMethodProvider", &method("provider")).valueSetter = method("provider=")
  registerSemanticProperty("dfc-b:paymentMethodType", &method("type")).valueSetter = method("type=")
end

Instance Attribute Details

#descriptionString

Returns:

  • (String)


36
37
38
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 36

def description
  @description
end

#nameString

Returns:

  • (String)


33
34
35
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 33

def name
  @name
end

#priceIPrice

Returns:

  • (IPrice)


39
40
41
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 39

def price
  @price
end

#providerString

Returns:

  • (String)


42
43
44
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 42

def provider
  @provider
end

#typeString

Returns:

  • (String)


45
46
47
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 45

def type
  @type
end