require_relative '../resource' module Tickethub class Reseller::Order < Resource path '/reseller/orders' require_relative 'customer' require_relative 'booking' require_relative 'payment' require_relative 'discount' require_relative 'customer' require_relative 'user' require_relative 'answer' require_relative '../address' collection :bookings, Reseller::Booking collection :payments, Reseller::Payment collection :answers, Reseller::Answer collection :discounts, Reseller::Discount association :customer, Reseller::Customer association :user, Reseller::User association :address, Tickethub::Address attribute :total, type: :money attribute :balance, type: :money attribute :discount, type: :money attribute :currency, type: :currency 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