Class: ShakeTheCounter::Reservation

Inherits:
Object
  • Object
show all
Defined in:
lib/shake_the_counter/reservation.rb

Overview

Describes a reservation

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args = {}) ⇒ Reservation

Sets up a new reservation



35
36
37
38
39
40
# File 'lib/shake_the_counter/reservation.rb', line 35

def initialize(args={})
	args.each do |key, value|
		instance_variable_set("@#{key.underscore}", value)
	end
  self.raw_data = args
end

Instance Attribute Details

#affiliateObject

Returns the value of attribute affiliate.



8
9
10
# File 'lib/shake_the_counter/reservation.rb', line 8

def affiliate
  @affiliate
end

#basket_keyObject

Returns the value of attribute basket_key.



13
14
15
# File 'lib/shake_the_counter/reservation.rb', line 13

def basket_key
  @basket_key
end

#confirmed_dateObject

Returns the value of attribute confirmed_date.



19
20
21
# File 'lib/shake_the_counter/reservation.rb', line 19

def confirmed_date
  @confirmed_date
end

#contact_keyObject

Returns the value of attribute contact_key.



7
8
9
# File 'lib/shake_the_counter/reservation.rb', line 7

def contact_key
  @contact_key
end

#currencyObject

Returns the value of attribute currency.



10
11
12
# File 'lib/shake_the_counter/reservation.rb', line 10

def currency
  @currency
end

#currency_codeObject

Returns the value of attribute currency_code.



12
13
14
# File 'lib/shake_the_counter/reservation.rb', line 12

def currency_code
  @currency_code
end

#discountObject

Returns the value of attribute discount.



26
27
28
# File 'lib/shake_the_counter/reservation.rb', line 26

def discount
  @discount
end

#discount_titleObject

Returns the value of attribute discount_title.



28
29
30
# File 'lib/shake_the_counter/reservation.rb', line 28

def discount_title
  @discount_title
end

#external_reservation_numberObject

Returns the value of attribute external_reservation_number.



11
12
13
# File 'lib/shake_the_counter/reservation.rb', line 11

def external_reservation_number
  @external_reservation_number
end

#is_blockedObject

Returns the value of attribute is_blocked.



29
30
31
# File 'lib/shake_the_counter/reservation.rb', line 29

def is_blocked
  @is_blocked
end

#is_confirmedObject

Returns the value of attribute is_confirmed.



27
28
29
# File 'lib/shake_the_counter/reservation.rb', line 27

def is_confirmed
  @is_confirmed
end

#is_paidObject

Returns the value of attribute is_paid.



25
26
27
# File 'lib/shake_the_counter/reservation.rb', line 25

def is_paid
  @is_paid
end

#nr_of_ticketsObject

Returns the value of attribute nr_of_tickets.



6
7
8
# File 'lib/shake_the_counter/reservation.rb', line 6

def nr_of_tickets
  @nr_of_tickets
end

#original_ticket_amountObject

Returns the value of attribute original_ticket_amount.



18
19
20
# File 'lib/shake_the_counter/reservation.rb', line 18

def original_ticket_amount
  @original_ticket_amount
end

#payment_costsObject

Returns the value of attribute payment_costs.



24
25
26
# File 'lib/shake_the_counter/reservation.rb', line 24

def payment_costs
  @payment_costs
end

#payment_methodObject

Returns the value of attribute payment_method.



23
24
25
# File 'lib/shake_the_counter/reservation.rb', line 23

def payment_method
  @payment_method
end

#raw_dataObject

Returns the value of attribute raw_data.



31
32
33
# File 'lib/shake_the_counter/reservation.rb', line 31

def raw_data
  @raw_data
end

#reservation_costs_per_ticketObject

Returns the value of attribute reservation_costs_per_ticket.



20
21
22
# File 'lib/shake_the_counter/reservation.rb', line 20

def reservation_costs_per_ticket
  @reservation_costs_per_ticket
end

#reservation_costs_per_transactionObject

Returns the value of attribute reservation_costs_per_transaction.



22
23
24
# File 'lib/shake_the_counter/reservation.rb', line 22

def reservation_costs_per_transaction
  @reservation_costs_per_transaction
end

#reservation_dateObject

Returns the value of attribute reservation_date.



17
18
19
# File 'lib/shake_the_counter/reservation.rb', line 17

def reservation_date
  @reservation_date
end

#reservation_keyObject

Returns the value of attribute reservation_key.



5
6
7
# File 'lib/shake_the_counter/reservation.rb', line 5

def reservation_key
  @reservation_key
end

#reservation_numberObject

Returns the value of attribute reservation_number.



9
10
11
# File 'lib/shake_the_counter/reservation.rb', line 9

def reservation_number
  @reservation_number
end

#statusObject

Returns the value of attribute status.



15
16
17
# File 'lib/shake_the_counter/reservation.rb', line 15

def status
  @status
end

#ticket_amountObject

Returns the value of attribute ticket_amount.



16
17
18
# File 'lib/shake_the_counter/reservation.rb', line 16

def ticket_amount
  @ticket_amount
end

#tickets_urlObject

Returns the value of attribute tickets_url.



21
22
23
# File 'lib/shake_the_counter/reservation.rb', line 21

def tickets_url
  @tickets_url
end

#total_amountObject

Returns the value of attribute total_amount.



14
15
16
# File 'lib/shake_the_counter/reservation.rb', line 14

def total_amount
  @total_amount
end

Instance Method Details

#keyObject



42
43
44
# File 'lib/shake_the_counter/reservation.rb', line 42

def key
	reservation_key
end