Sha256: 975a1e98f967ae7d26f726a728ec46c625f01a2b100104e18c575b8835cf336b

Contents?: true

Size: 1.05 KB

Versions: 19

Compression:

Stored size: 1.05 KB

Contents

require_relative '../resource'

module Tickethub
  class Supplier::Booking < Resource
    path '/supplier/bookings'

    require_relative 'booking/ticket'
    require_relative 'booking/voucher'

    require_relative 'rate'
    require_relative 'order'
    require_relative 'answer'
    require_relative 'product'
    require_relative 'variant'
    require_relative 'message'
    require_relative 'fee'

    collection :answers, Supplier::Answer
    collection :messages, Supplier::Message
    collection :fees, Supplier::Fee

    association :order, Supplier::Order
    association :rate, Supplier::Rate
    association :coupon, Supplier::Coupon
    association :product, Supplier::Product
    association :variant, Supplier::Variant

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

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

    def notify
      @endpoint[:notify].post
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
tickethub-0.2.10 lib/tickethub/supplier/booking.rb
tickethub-0.2.9 lib/tickethub/supplier/booking.rb
tickethub-0.2.8 lib/tickethub/supplier/booking.rb
tickethub-0.2.7 lib/tickethub/supplier/booking.rb
tickethub-0.2.6 lib/tickethub/supplier/booking.rb
tickethub-0.2.5 lib/tickethub/supplier/booking.rb
tickethub-0.2.4 lib/tickethub/supplier/booking.rb
tickethub-0.2.3 lib/tickethub/supplier/booking.rb
tickethub-0.2.2 lib/tickethub/supplier/booking.rb
tickethub-0.2.1 lib/tickethub/supplier/booking.rb
tickethub-0.2.0 lib/tickethub/supplier/booking.rb
tickethub-0.1.4 lib/tickethub/supplier/booking.rb
tickethub-0.1.3 lib/tickethub/supplier/booking.rb
tickethub-0.1.2 lib/tickethub/supplier/booking.rb
tickethub-0.0.14 lib/tickethub/supplier/booking.rb
tickethub-0.0.12 lib/tickethub/supplier/booking.rb
tickethub-0.0.11 lib/tickethub/supplier/booking.rb
tickethub-0.0.10 lib/tickethub/supplier/booking.rb
tickethub-0.0.9 lib/tickethub/supplier/booking.rb