Sha256: a4119cac056574fa5492f91ac8a05e1ecbad9b5605a3ed030616ff20e79693fa

Contents?: true

Size: 1.1 KB

Versions: 40

Compression:

Stored size: 1.1 KB

Contents

require_relative '../resource'

module Tickethub
  class Channel::Booking < Resource
    path '/channel/bookings'

    require_relative 'order'
    require_relative 'answer'
    require_relative 'product'
    require_relative 'variant'
    require_relative 'purchase'
    require_relative 'discount'
    require_relative 'fee'
    require_relative 'tier'
    require_relative 'ticket'

    collection :answers, Channel::Answer
    collection :purchases, Channel::Purchase
    collection :fees, Channel::Fee
    collection :tiers, Channel::Tier
    collection :tickets, Channel::Ticket
    collection :discounts, Channel::Discount

    association :order, Channel::Order
    association :product, Channel::Product
    association :variant, Channel::Variant

    attribute :expires_on, type: :date
    attribute :valid_from, type: :datetime

    attribute :amount, type: :money
    attribute :discount, type: :money
    attribute :tax, type: :money
    attribute :total, type: :money

    attribute :created_at, type: :datetime
    attribute :updated_at, type: :datetime
    attribute :cancelled_at, type: :datetime
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
tickethub-0.3.100 lib/tickethub/channel/booking.rb
tickethub-0.3.99 lib/tickethub/channel/booking.rb
tickethub-0.3.98 lib/tickethub/channel/booking.rb
tickethub-0.3.97 lib/tickethub/channel/booking.rb
tickethub-0.3.96 lib/tickethub/channel/booking.rb
tickethub-0.3.95 lib/tickethub/channel/booking.rb
tickethub-0.3.94 lib/tickethub/channel/booking.rb
tickethub-0.3.93 lib/tickethub/channel/booking.rb
tickethub-0.3.92 lib/tickethub/channel/booking.rb
tickethub-0.3.91 lib/tickethub/channel/booking.rb
tickethub-0.3.90 lib/tickethub/channel/booking.rb
tickethub-0.3.89 lib/tickethub/channel/booking.rb
tickethub-0.3.88 lib/tickethub/channel/booking.rb
tickethub-0.3.87 lib/tickethub/channel/booking.rb
tickethub-0.3.86 lib/tickethub/channel/booking.rb
tickethub-0.3.85 lib/tickethub/channel/booking.rb
tickethub-0.3.84 lib/tickethub/channel/booking.rb
tickethub-0.3.82 lib/tickethub/channel/booking.rb
tickethub-0.3.81 lib/tickethub/channel/booking.rb
tickethub-0.3.80 lib/tickethub/channel/booking.rb