Class: DataFoodConsortium::Connector::PaymentMethod
- Inherits:
-
Object
- Object
- DataFoodConsortium::Connector::PaymentMethod
- 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
-
#initialize(semanticId, name: nil, description: nil, price: nil, provider: nil, type: nil) ⇒ PaymentMethod
constructor
A new instance of PaymentMethod.
Constructor Details
#initialize(semanticId, name: nil, description: nil, price: nil, provider: nil, type: nil) ⇒ PaymentMethod
Returns a new instance of PaymentMethod.
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
#description ⇒ String
36 37 38 |
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 36 def description @description end |
#name ⇒ String
33 34 35 |
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 33 def name @name end |
#price ⇒ IPrice
39 40 41 |
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 39 def price @price end |
#provider ⇒ String
42 43 44 |
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 42 def provider @provider end |
#type ⇒ String
45 46 47 |
# File 'lib/datafoodconsortium/connector/payment_method.rb', line 45 def type @type end |