Class: Rubill::ReceivedPayment

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

Instance Attribute Summary

Attributes inherited from Base

#remote_record

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#[], #[]=, all, find, find_by_name, #id, #initialize, #save, update, where

Constructor Details

This class inherits a constructor from Rubill::Base

Class Method Details

.activeObject



7
8
9
# File 'lib/rubill/entities/received_payment.rb', line 7

def self.active
  where([Query::Filter.new("status", "!=", "1")])
end

.create(opts) ⇒ Object



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

def self.create(opts)
  Query.receive_payment(opts)
end

.delete(id) ⇒ Object



19
20
21
22
# File 'lib/rubill/entities/received_payment.rb', line 19

def self.delete(id)
  # To overwrite delete method in superclass
  void(id)
end

.remote_class_nameObject



28
29
30
# File 'lib/rubill/entities/received_payment.rb', line 28

def self.remote_class_name
  "ReceivedPay"
end

.void(id) ⇒ Object



24
25
26
# File 'lib/rubill/entities/received_payment.rb', line 24

def self.void(id)
  Query.void_received_payment(id)
end

Instance Method Details

#deleteObject



15
16
17
# File 'lib/rubill/entities/received_payment.rb', line 15

def delete
  self.class.delete(id)
end

#voidObject



11
12
13
# File 'lib/rubill/entities/received_payment.rb', line 11

def void
  delete
end