require_relative '../resource' module Tickethub class Channel::Order < Resource path '/channel/orders' require_relative 'customer' require_relative 'booking' require_relative 'payment' require_relative 'customer' require_relative 'session' require_relative 'answer' require_relative '../address' collection :bookings, Channel::Booking collection :payments, Channel::Payment collection :answers, Channel::Answer association :customer, Channel::Customer association :session, Channel::Session association :address, Tickethub::Address attribute :total, type: :money attribute :balance, type: :money attribute :currency, type: :currency attribute :booked_at, type: :datetime attribute :expires_at, type: :datetime attribute :confirmed_at, type: :datetime attribute :created_at, type: :datetime attribute :updated_at, type: :datetime def confirm(params = {}) self.load @endpoint[:confirm].post(params) end end end