Sha256: 1360f3c0db747e95c3c403b09641bcdf345b547cb79f9484661fd3ffdfa25372

Contents?: true

Size: 979 Bytes

Versions: 28

Compression:

Stored size: 979 Bytes

Contents

require_relative '../resource'

module Tickethub
  class Reseller::Order < Resource
    path '/reseller/orders'

    require_relative 'customer'
    require_relative 'booking'
    require_relative 'payment'

    require_relative 'customer'
    require_relative 'user'

    require_relative 'answer'
    require_relative '../address'

    collection :bookings, Reseller::Booking
    collection :payments, Reseller::Payment
    collection :answers, Reseller::Answer

    association :customer, Reseller::Customer
    association :user, Reseller::User
    association :address, Tickethub::Address

    attribute :total, type: :money
    attribute :balance, 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

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
tickethub-0.3.67 lib/tickethub/reseller/order.rb
tickethub-0.3.66 lib/tickethub/reseller/order.rb
tickethub-0.3.65 lib/tickethub/reseller/order.rb
tickethub-0.3.64 lib/tickethub/reseller/order.rb
tickethub-0.3.63 lib/tickethub/reseller/order.rb
tickethub-0.3.62 lib/tickethub/reseller/order.rb
tickethub-0.3.61 lib/tickethub/reseller/order.rb
tickethub-0.3.60 lib/tickethub/reseller/order.rb
tickethub-0.3.59 lib/tickethub/reseller/order.rb
tickethub-0.3.58 lib/tickethub/reseller/order.rb
tickethub-0.3.57 lib/tickethub/reseller/order.rb
tickethub-0.3.56 lib/tickethub/reseller/order.rb
tickethub-0.3.55 lib/tickethub/reseller/order.rb
tickethub-0.3.54 lib/tickethub/reseller/order.rb
tickethub-0.3.53 lib/tickethub/reseller/order.rb
tickethub-0.3.52 lib/tickethub/reseller/order.rb
tickethub-0.3.51 lib/tickethub/reseller/order.rb
tickethub-0.3.50 lib/tickethub/reseller/order.rb
tickethub-0.3.49 lib/tickethub/reseller/order.rb
tickethub-0.3.47 lib/tickethub/reseller/order.rb