Sha256: be321d3eb76497ba2d61bbcb103d0bfc91f70fbeb0c0de836bbe0043db5cc3e4

Contents?: true

Size: 1.11 KB

Versions: 20

Compression:

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

    require_relative '../token'
    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 :token, Tickethub::Token
    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

20 entries across 20 versions & 1 rubygems

Version Path
tickethub-0.3.30 lib/tickethub/supplier/reseller.rb
tickethub-0.3.29 lib/tickethub/supplier/reseller.rb
tickethub-0.3.28 lib/tickethub/supplier/reseller.rb
tickethub-0.3.27 lib/tickethub/supplier/reseller.rb
tickethub-0.3.26 lib/tickethub/supplier/reseller.rb
tickethub-0.3.25 lib/tickethub/supplier/reseller.rb
tickethub-0.3.24 lib/tickethub/supplier/reseller.rb
tickethub-0.3.23 lib/tickethub/supplier/reseller.rb
tickethub-0.3.22 lib/tickethub/supplier/reseller.rb
tickethub-0.3.21 lib/tickethub/supplier/reseller.rb
tickethub-0.3.20 lib/tickethub/supplier/reseller.rb
tickethub-0.3.18 lib/tickethub/supplier/reseller.rb
tickethub-0.3.17 lib/tickethub/supplier/reseller.rb
tickethub-0.3.16 lib/tickethub/supplier/reseller.rb
tickethub-0.3.15 lib/tickethub/supplier/reseller.rb
tickethub-0.3.14 lib/tickethub/supplier/reseller.rb
tickethub-0.3.13 lib/tickethub/supplier/reseller.rb
tickethub-0.3.12 lib/tickethub/supplier/reseller.rb
tickethub-0.3.11 lib/tickethub/supplier/reseller.rb
tickethub-0.3.9 lib/tickethub/supplier/reseller.rb