Class: Recras::CombinationItem
- Inherits:
-
Object
- Object
- Recras::CombinationItem
- Extended by:
- Recras
- Defined in:
- lib/recras/combination_item.rb
Overview
links to ‘arrangement_regels’ in the API recras.github.io/docs/endpoints/arrangementen.html
Constant Summary
Constants included from Recras
Instance Attribute Summary collapse
-
#begins_at ⇒ Object
Returns the value of attribute begins_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#ends_at ⇒ Object
Returns the value of attribute ends_at.
- #id ⇒ Object
-
#json ⇒ Object
Returns the value of attribute json.
-
#location_id ⇒ Object
Returns the value of attribute location_id.
-
#minimum ⇒ Object
Returns the value of attribute minimum.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number_of_people ⇒ Object
Returns the value of attribute number_of_people.
-
#price ⇒ Object
Returns the value of attribute price.
-
#product_id ⇒ Object
Returns the value of attribute product_id.
Class Method Summary collapse
-
.attribute_mapping ⇒ Object
translates the mapping between the Recras API and the terms used in this gem.
- .plural_name ⇒ Object
Instance Method Summary collapse
-
#initialize(args = nil) ⇒ CombinationItem
constructor
Initializer to transform a
Hash
into an Client object.
Methods included from Recras
make_request, new_from_json, object_mappings, parse_json, url, version
Constructor Details
#initialize(args = nil) ⇒ CombinationItem
Initializer to transform a Hash
into an Client object
23 24 25 26 27 28 29 30 |
# File 'lib/recras/combination_item.rb', line 23 def initialize(args=nil) required_args = [] return if args.nil? args.each do |k,v| instance_variable_set("@#{k}", v) unless v.nil? end set_values_from_json end |
Instance Attribute Details
#begins_at ⇒ Object
Returns the value of attribute begins_at.
11 12 13 |
# File 'lib/recras/combination_item.rb', line 11 def begins_at @begins_at end |
#description ⇒ Object
Returns the value of attribute description.
14 15 16 |
# File 'lib/recras/combination_item.rb', line 14 def description @description end |
#ends_at ⇒ Object
Returns the value of attribute ends_at.
12 13 14 |
# File 'lib/recras/combination_item.rb', line 12 def ends_at @ends_at end |
#id ⇒ Object
The is a required parameter.
9 10 11 |
# File 'lib/recras/combination_item.rb', line 9 def id @id end |
#json ⇒ Object
Returns the value of attribute json.
19 20 21 |
# File 'lib/recras/combination_item.rb', line 19 def json @json end |
#location_id ⇒ Object
Returns the value of attribute location_id.
10 11 12 |
# File 'lib/recras/combination_item.rb', line 10 def location_id @location_id end |
#minimum ⇒ Object
Returns the value of attribute minimum.
18 19 20 |
# File 'lib/recras/combination_item.rb', line 18 def minimum @minimum end |
#name ⇒ Object
Returns the value of attribute name.
13 14 15 |
# File 'lib/recras/combination_item.rb', line 13 def name @name end |
#number_of_people ⇒ Object
Returns the value of attribute number_of_people.
15 16 17 |
# File 'lib/recras/combination_item.rb', line 15 def number_of_people @number_of_people end |
#price ⇒ Object
Returns the value of attribute price.
17 18 19 |
# File 'lib/recras/combination_item.rb', line 17 def price @price end |
#product_id ⇒ Object
Returns the value of attribute product_id.
16 17 18 |
# File 'lib/recras/combination_item.rb', line 16 def product_id @product_id end |
Class Method Details
.attribute_mapping ⇒ Object
translates the mapping between the Recras API and the terms used in this gem
38 39 40 |
# File 'lib/recras/combination_item.rb', line 38 def self.attribute_mapping [["id", "id"],["locatie_id", "location_id"],["begin", "begins_at@@time"],["eind", "ends_at@@time"], ["beschrijving", "description"], ["verkoop", "price@@float"], ["aantal_personen", "number_of_people"], ["product_id", "product_id"]] end |
.plural_name ⇒ Object
32 33 34 |
# File 'lib/recras/combination_item.rb', line 32 def self.plural_name "combination_items" end |