class ShakeTheCounter::PriceType

Sets up a PriceType

Attributes

full_address_required[RW]
key[RW]
name[RW]
phone_number_required[RW]
price[RW]
price_key[RW]
product_code[RW]
raw_data[RW]
requires_capacity_slot[RW]
section[RW]
ticket_valid_from[RW]
ticket_valid_to[RW]

Public Class Methods

new(args={}, section: nil) click to toggle source

Sets up a new price type

# 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