Sha256: 00aa7239196a765169562a1121d55a48f88e084f4c2a10dc51d54f0287b6e8f4

Contents?: true

Size: 1.17 KB

Versions: 7

Compression:

Stored size: 1.17 KB

Contents

require_relative '../resource'

module Tickethub
  class Supplier::Reseller < Resource
    path '/supplier/resellers'

    require_relative 'invoice'
    require_relative 'product'
    require_relative 'message'
    require_relative 'channel'
    require_relative 'broadcast'
    require_relative 'rate'
    require_relative 'tax'

    require_relative '../contact'
    require_relative '../address'

    collection_method :broadcast do |params|
      Tickethub::Broadcast.call self.endpoint, post(:broadcast, params)
    end

    collection :invoices, Supplier::Invoice
    collection :products, Supplier::Product
    collection :messages, Supplier::Message
    collection :channels, Supplier::Channel
    collection :rates, Supplier::Rate
    collection :taxes, Supplier::Tax

    association :contact, Tickethub::Contact
    association :address, Tickethub::Address

    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
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tickethub-0.3.100 lib/tickethub/supplier/reseller.rb
tickethub-0.3.99 lib/tickethub/supplier/reseller.rb
tickethub-0.3.98 lib/tickethub/supplier/reseller.rb
tickethub-0.3.97 lib/tickethub/supplier/reseller.rb
tickethub-0.3.96 lib/tickethub/supplier/reseller.rb
tickethub-0.3.95 lib/tickethub/supplier/reseller.rb
tickethub-0.3.94 lib/tickethub/supplier/reseller.rb