lib/tickethub/reseller.rb in tickethub-0.3.35 vs lib/tickethub/reseller.rb in tickethub-0.3.36

- old
+ new

@@ -1,20 +1,67 @@ module Tickethub class Reseller < Resource path '/resellers' + require_relative 'reseller/customer' + require_relative 'reseller/order' + require_relative 'reseller/booking' + require_relative 'reseller/ticket' + require_relative 'reseller/extra' + require_relative 'reseller/product' + require_relative 'reseller/option' + require_relative 'reseller/variant' + require_relative 'reseller/tier' + require_relative 'reseller/voucher' + + require_relative 'reseller/invoice' + require_relative 'reseller/payment' + require_relative 'reseller/user' + require_relative 'reseller/question' + require_relative 'reseller/answer' + require_relative 'reseller/tax' + require_relative 'reseller/fee' + require_relative 'reseller/source' + require_relative 'contact' - require_relative 'reseller/channel' - require_relative 'reseller/supplier' + require_relative 'address' + require_relative 'token' + require_relative 'supplier' + collection :customers, Customer + collection :orders, Order + collection :bookings, Booking + collection :tickets, Ticket + collection :extras, Extra + collection :products, Product + collection :options, Option + collection :variants, Variant + collection :tiers, Tier + collection :vouchers, Voucher + collection :invoices, Invoice + collection :payments, Payment + collection :users, User + collection :questions, Question + collection :answers, Answer + collection :taxes, Tax + collection :fees, Fee + collection :sources, Source + association :contact, Tickethub::Contact - association :token, Tickethub::Token + association :address, Tickethub::Address association :supplier, Tickethub::Supplier + association :token, Tickethub::Token - association :category, App::Category - collection :subscriptions, App::Subscription - + attribute :period, type: :duration + attribute :notice, type: :duration attribute :currency, type: :currency + + attribute :limit, type: :money + attribute :balance, type: :money + attribute :overdue, type: :money + + attribute :next_invoice_date, type: :date + attribute :first_invoice_date, type: :date def self.[](attributes) token = attributes[:token].is_a?(String) ? attributes[:token] : attributes[:token][:access_token] self.new Tickethub.endpoint(auth_type: :bearer, password: token)['/reseller'] \ No newline at end of file