Class: ShakeTheCounter::PriceType
- Inherits:
-
Object
- Object
- ShakeTheCounter::PriceType
- Defined in:
- lib/shake_the_counter/price_type.rb
Overview
Sets up a PriceType
Instance Attribute Summary collapse
-
#full_address_required ⇒ Object
Returns the value of attribute full_address_required.
-
#key ⇒ Object
Returns the value of attribute key.
-
#name ⇒ Object
Returns the value of attribute name.
-
#phone_number_required ⇒ Object
Returns the value of attribute phone_number_required.
-
#price ⇒ Object
Returns the value of attribute price.
-
#price_key ⇒ Object
Returns the value of attribute price_key.
-
#product_code ⇒ Object
Returns the value of attribute product_code.
-
#raw_data ⇒ Object
Returns the value of attribute raw_data.
-
#requires_capacity_slot ⇒ Object
Returns the value of attribute requires_capacity_slot.
-
#section ⇒ Object
Returns the value of attribute section.
-
#ticket_valid_from ⇒ Object
Returns the value of attribute ticket_valid_from.
-
#ticket_valid_to ⇒ Object
Returns the value of attribute ticket_valid_to.
Instance Method Summary collapse
-
#initialize(args = {}, section: nil) ⇒ PriceType
constructor
Sets up a new price type.
Constructor Details
#initialize(args = {}, section: nil) ⇒ PriceType
Sets up a new price type
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/shake_the_counter/price_type.rb', line 22 def initialize(args={}, section: nil) self.section = section self.key = args["PriceTypeKey"] self.price_key = args["PriceKey"] self.name = args["PriceTypeName"] self.ticket_valid_from = DateTime.parse(args["TicketValidFrom"]) self.ticket_valid_to = DateTime.parse(args["TicketValidTo"]) self.phone_number_required = args["PhoneNumberRequired"] self.full_address_required = args["FullAddressRequired"] self.price = args["Price"].to_f self.requires_capacity_slot = args["RequiresCapacitySlot"] self.raw_data = args end |
Instance Attribute Details
#full_address_required ⇒ Object
Returns the value of attribute full_address_required.
13 14 15 |
# File 'lib/shake_the_counter/price_type.rb', line 13 def full_address_required @full_address_required end |
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/shake_the_counter/price_type.rb', line 6 def key @key end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'lib/shake_the_counter/price_type.rb', line 9 def name @name end |
#phone_number_required ⇒ Object
Returns the value of attribute phone_number_required.
12 13 14 |
# File 'lib/shake_the_counter/price_type.rb', line 12 def phone_number_required @phone_number_required end |
#price ⇒ Object
Returns the value of attribute price.
14 15 16 |
# File 'lib/shake_the_counter/price_type.rb', line 14 def price @price end |
#price_key ⇒ Object
Returns the value of attribute price_key.
7 8 9 |
# File 'lib/shake_the_counter/price_type.rb', line 7 def price_key @price_key end |
#product_code ⇒ Object
Returns the value of attribute product_code.
8 9 10 |
# File 'lib/shake_the_counter/price_type.rb', line 8 def product_code @product_code end |
#raw_data ⇒ Object
Returns the value of attribute raw_data.
18 19 20 |
# File 'lib/shake_the_counter/price_type.rb', line 18 def raw_data @raw_data end |
#requires_capacity_slot ⇒ Object
Returns the value of attribute requires_capacity_slot.
15 16 17 |
# File 'lib/shake_the_counter/price_type.rb', line 15 def requires_capacity_slot @requires_capacity_slot end |
#section ⇒ Object
Returns the value of attribute section.
17 18 19 |
# File 'lib/shake_the_counter/price_type.rb', line 17 def section @section end |
#ticket_valid_from ⇒ Object
Returns the value of attribute ticket_valid_from.
10 11 12 |
# File 'lib/shake_the_counter/price_type.rb', line 10 def ticket_valid_from @ticket_valid_from end |
#ticket_valid_to ⇒ Object
Returns the value of attribute ticket_valid_to.
11 12 13 |
# File 'lib/shake_the_counter/price_type.rb', line 11 def ticket_valid_to @ticket_valid_to end |