Sha256: 53bf561509bb64826b4800a6ff156d976538aa44cefa9a1d59042ab843547c5e

Contents?: true

Size: 1.04 KB

Versions: 18

Compression:

Stored size: 1.04 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 'broadcast'
    require_relative 'rate'

    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 :rates, Supplier::Rate

    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

18 entries across 18 versions & 1 rubygems

Version Path
tickethub-0.3.87 lib/tickethub/supplier/reseller.rb
tickethub-0.3.86 lib/tickethub/supplier/reseller.rb
tickethub-0.3.85 lib/tickethub/supplier/reseller.rb
tickethub-0.3.84 lib/tickethub/supplier/reseller.rb
tickethub-0.3.82 lib/tickethub/supplier/reseller.rb
tickethub-0.3.81 lib/tickethub/supplier/reseller.rb
tickethub-0.3.80 lib/tickethub/supplier/reseller.rb
tickethub-0.3.79 lib/tickethub/supplier/reseller.rb
tickethub-0.3.78 lib/tickethub/supplier/reseller.rb
tickethub-0.3.77 lib/tickethub/supplier/reseller.rb
tickethub-0.3.76 lib/tickethub/supplier/reseller.rb
tickethub-0.3.75 lib/tickethub/supplier/reseller.rb
tickethub-0.3.74 lib/tickethub/supplier/reseller.rb
tickethub-0.3.73 lib/tickethub/supplier/reseller.rb
tickethub-0.3.72 lib/tickethub/supplier/reseller.rb
tickethub-0.3.71 lib/tickethub/supplier/reseller.rb
tickethub-0.3.70 lib/tickethub/supplier/reseller.rb
tickethub-0.3.68 lib/tickethub/supplier/reseller.rb