Class: Rubill::Vendor

Inherits:
Base
  • Object
show all
Defined in:
lib/rubill/vendor.rb

Instance Attribute Summary

Attributes inherited from Base

#remote_record

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, active, all, create, delete, #delete, find, #id, #initialize, #save, update, where

Constructor Details

This class inherits a constructor from Rubill::Base

Class Method Details

.remote_class_nameObject



3
4
5
# File 'lib/rubill/vendor.rb', line 3

def self.remote_class_name
  "Vendor"
end

Instance Method Details

#billsObject



7
8
9
10
11
12
# File 'lib/rubill/vendor.rb', line 7

def bills
  Bill.where([
    Query::Filter.new("isActive", "=", "1"),
    Query::Filter.new("vendorId", "=", id),
  ])
end

#send_invite(email) ⇒ Object



14
15
16
# File 'lib/rubill/vendor.rb', line 14

def send_invite(email)
  Query.send_vendor_invite(id, email)
end