Sha256: 21e078739bb24c86b1774b461b5ac99e92f0ec88b17bff0b113936fa7a7bdc96
Contents?: true
Size: 1.68 KB
Versions: 22
Compression:
Stored size: 1.68 KB
Contents
require_relative '../resource' module Tickethub class Supplier::Booking < Resource path '/supplier/bookings' require_relative 'rate' require_relative 'order' require_relative 'answer' require_relative 'product' require_relative 'variant' require_relative 'message' require_relative 'purchase' require_relative 'fee' require_relative 'tier' require_relative 'scan' require_relative 'ticket' require_relative 'discount' require_relative 'broadcast' collection_method :broadcast do |params| Supplier::Broadcast.call self.endpoint, begin post(:broadcast, params) rescue Tickethub::ResourceInvalid => err Tickethub::Response.new(err.response).decoded end end collection :answers, Supplier::Answer collection :messages, Supplier::Message collection :purchases, Supplier::Purchase collection :fees, Supplier::Fee collection :tiers, Supplier::Tier collection :tickets, Supplier::Ticket collection :discounts, Supplier::Discount collection :scans, Supplier::Scan 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 :discount, type: :money attribute :tax, type: :money attribute :total, type: :money attribute :expires_on, type: :date attribute :valid_from, type: :datetime 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
22 entries across 22 versions & 1 rubygems