39 lines
1.8 KiB
Ruby
39 lines
1.8 KiB
Ruby
object @lesson_booking
|
|
|
|
attributes :id, :status, :lesson_type, :payment_style, :recurring, :teacher_id, :description, :lesson_length, :created_at, :user_id, :active, :accepter_id, :canceler_id, :cancel_message, :booked_price, :card_presumed_ok, :no_slots, :posa_card_id, :posa_card_purchased, :remaining_roll_forward_amount_in_cents
|
|
|
|
child(:lesson_booking_slots => :slots) {
|
|
attributes :id, :preferred_day, :day_of_week, :hour, :minute, :slot_type, :pretty_scheduled_start, :message, :pretty_start_time, :proposer_id, :is_student_created?, :is_teacher_created?, :timezone, :pretty_timezone, :from_package
|
|
}
|
|
|
|
child(:default_slot => :default_slot) {
|
|
attributes :id, :preferred_day, :day_of_week, :hour, :minute, :slot_type, :pretty_scheduled_start, :message, :pretty_start_time, :proposer_id, :is_student_created?, :is_teacher_created?, :timezone, :pretty_timezone, :from_package
|
|
}
|
|
|
|
child(:alt_slot => :alt_slot) {
|
|
attributes :id, :preferred_day, :day_of_week, :hour, :minute, :slot_type, :pretty_scheduled_start, :message, :pretty_start_time, :proposer_id, :is_student_created?, :is_teacher_created?, :timezone, :pretty_timezone, :from_package
|
|
}
|
|
|
|
child(:counter_slot => :counter_slot) {
|
|
attributes :id, :preferred_day, :day_of_week, :hour, :minute, :slot_type, :pretty_scheduled_start, :message, :pretty_start_time, :proposer_id, :is_student_created?, :is_teacher_created?, :timezone, :pretty_timezone, :from_package
|
|
}
|
|
|
|
|
|
child(:user => :user) {
|
|
attributes :id, :has_stored_credit_card?, :first_name, :last_name, :photo_url, :name
|
|
}
|
|
|
|
node :teacher do |lesson_booking|
|
|
partial "api_users/show", object: lesson_booking.teacher
|
|
end
|
|
|
|
node :next_lesson do |lesson_booking|
|
|
partial "api_lesson_sessions/show", object: lesson_booking.next_lesson
|
|
end
|
|
|
|
if @lesson_session
|
|
node :focused_lesson do
|
|
partial "api_lesson_sessions/show", object: @lesson_session
|
|
end
|
|
end
|