Class: CorePro::Transfer

Inherits:
Models::ModelBase show all
Defined in:
lib/corepro/transfer.rb

Instance Attribute Summary collapse

Attributes inherited from Models::ModelBase

#requestId

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Models::ModelBase

escape, #to_s

Methods inherited from Models::JsonBase

#from_json!, #is_hash?, #to_hash, #to_json

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



10
11
12
# File 'lib/corepro/transfer.rb', line 10

def amount
  @amount
end

#customerIdObject

Returns the value of attribute customerId.



7
8
9
# File 'lib/corepro/transfer.rb', line 7

def customerId
  @customerId
end

#descriptionObject

Returns the value of attribute description.



13
14
15
# File 'lib/corepro/transfer.rb', line 13

def description
  @description
end

#fromIdObject

Returns the value of attribute fromId.



8
9
10
# File 'lib/corepro/transfer.rb', line 8

def fromId
  @fromId
end

#tagObject

Returns the value of attribute tag.



11
12
13
# File 'lib/corepro/transfer.rb', line 11

def tag
  @tag
end

#toIdObject

Returns the value of attribute toId.



9
10
11
# File 'lib/corepro/transfer.rb', line 9

def toId
  @toId
end

#transactionIdObject

Returns the value of attribute transactionId.



12
13
14
# File 'lib/corepro/transfer.rb', line 12

def transactionId
  @transactionId
end

Class Method Details

.create(customerId, fromId, toId, amount, tag, description, connection = nil, loggingObject = nil) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/corepro/transfer.rb', line 15

def self.create(customerId, fromId, toId, amount, tag, description, connection = nil, loggingObject = nil)
  t = Transfer.new
  t.customerId = customerId
  t.fromId = fromId
  t.toId = toId
  t.amount = amount
  t.tag = tag
  t.description = description
  t.create connection, loggingObject
end

.void(customerId, transactionId, tag, connection = nil, loggingObject = nil) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/corepro/transfer.rb', line 30

def self.void(customerId, transactionId, tag, connection = nil, loggingObject = nil)
  t = Transfer.new
  t.customerId = customerId
  t.transactionId = transactionId
  t.tag = tag
  t.void connection, loggingObject
end

Instance Method Details

#create(connection = nil, loggingObject = nil) ⇒ Object



26
27
28
# File 'lib/corepro/transfer.rb', line 26

def create(connection = nil, loggingObject = nil)
  CorePro::Utils::Requestor.post('/transfer/create', Transfer, self, connection, loggingObject)
end

#void(connection = nil, loggingObject = nil) ⇒ Object



38
39
40
# File 'lib/corepro/transfer.rb', line 38

def void(connection = nil, loggingObject = nil)
  CorePro::Utils::Requestor.post('/transfer/void', Transfer, self, connection, loggingObject)
end