Class: CorePro::ExternalAccount

Inherits:
Models::ModelBase show all
Defined in:
lib/corepro/external_account.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!, #to_hash, #to_json

Instance Attribute Details

#accountNumberObject

Returns the value of attribute accountNumber.



21
22
23
# File 'lib/corepro/external_account.rb', line 21

def accountNumber
  @accountNumber
end

#accountNumberMaskedObject

Returns the value of attribute accountNumberMasked.



22
23
24
# File 'lib/corepro/external_account.rb', line 22

def accountNumberMasked
  @accountNumberMasked
end

#customerIdObject

Returns the value of attribute customerId.



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

def customerId
  @customerId
end

#externalAccountIdObject

Returns the value of attribute externalAccountId.



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

def externalAccountId
  @externalAccountId
end

#firstNameObject

Returns the value of attribute firstName.



14
15
16
# File 'lib/corepro/external_account.rb', line 14

def firstName
  @firstName
end

#isActiveObject

Returns the value of attribute isActive.



24
25
26
# File 'lib/corepro/external_account.rb', line 24

def isActive
  @isActive
end

#lastNameObject

Returns the value of attribute lastName.



15
16
17
# File 'lib/corepro/external_account.rb', line 15

def lastName
  @lastName
end

#lockedDateObject

Returns the value of attribute lockedDate.



25
26
27
# File 'lib/corepro/external_account.rb', line 25

def lockedDate
  @lockedDate
end

#lockedReasonObject

Returns the value of attribute lockedReason.



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

def lockedReason
  @lockedReason
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#nickNameObject

Returns the value of attribute nickName.



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

def nickName
  @nickName
end

#nocCodeObject

Returns the value of attribute nocCode.



23
24
25
# File 'lib/corepro/external_account.rb', line 23

def nocCode
  @nocCode
end

#routingNumberObject

Returns the value of attribute routingNumber.



19
20
21
# File 'lib/corepro/external_account.rb', line 19

def routingNumber
  @routingNumber
end

#routingNumberMaskedObject

Returns the value of attribute routingNumberMasked.



20
21
22
# File 'lib/corepro/external_account.rb', line 20

def routingNumberMasked
  @routingNumberMasked
end

#statusObject

Returns the value of attribute status.



17
18
19
# File 'lib/corepro/external_account.rb', line 17

def status
  @status
end

#statusDateObject

Returns the value of attribute statusDate.



18
19
20
# File 'lib/corepro/external_account.rb', line 18

def statusDate
  @statusDate
end

#tagObject

Returns the value of attribute tag.



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

def tag
  @tag
end

#typeObject

Returns the value of attribute type.



16
17
18
# File 'lib/corepro/external_account.rb', line 16

def type
  @type
end

Class Method Details

.get(customerId, externalAccountId, connection = nil, loggingObject = nil) ⇒ Object



38
39
40
41
42
43
# File 'lib/corepro/external_account.rb', line 38

def self.get(customerId, externalAccountId, connection = nil, loggingObject = nil)
  ea = ExternalAccount.new
  ea.customerId = customerId
  ea.externalAccountId = externalAccountId
  ea.get connection, loggingObject
end

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



49
50
51
52
53
54
# File 'lib/corepro/external_account.rb', line 49

def self.getByTag(customerId, tag, connection = nil, loggingObject = nil)
  ea = ExternalAccount.new
  ea.customerId = customerId
  ea.tag = tag
  ea.getByTag connection, loggingObject
end

.list(customerId, connection = nil, loggingObject = nil) ⇒ Object



28
29
30
31
32
# File 'lib/corepro/external_account.rb', line 28

def self.list(customerId, connection = nil, loggingObject = nil)
  ea = ExternalAccount.new
  ea.customerId = customerId
  ea.list connection, loggingObject
end

.verify(customerId, externalAccountId, amount1, amount2, connection = nil, loggingObject = nil) ⇒ Object



69
70
71
72
73
74
# File 'lib/corepro/external_account.rb', line 69

def self.verify(customerId, externalAccountId, amount1, amount2, connection = nil, loggingObject = nil)
  ea = ExternalAccount.new
  ea.customerId = customerId
  ea.externalAccountId = externalAccountId
  ea.verify(amount1, amount2, connection, loggingObject)
end

Instance Method Details

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



60
61
62
63
# File 'lib/corepro/external_account.rb', line 60

def create(connection = nil, loggingObject = nil)
  eaid = CorePro::Utils::Requestor.post('/externalaccount/create', CorePro::Models::ExternalAccountIdOnly, self, connection, loggingObject)
  eaid.externalAccountId
end

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



91
92
93
94
# File 'lib/corepro/external_account.rb', line 91

def deactivate(connection = nil, loggingObject = nil)
  eaid = CorePro::Utils::Requestor.post('/externalaccount/deactivate', CorePro::Models::ExternalAccountIdOnly, self, connection, loggingObject)
  eaid.externalAccountId
end

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



45
46
47
# File 'lib/corepro/external_account.rb', line 45

def get(connection = nil, loggingObject = nil)
  CorePro::Utils::Requestor.get("/externalaccount/get/#{customerId}/#{externalAccountId}", ExternalAccount, connection, loggingObject)
end

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



56
57
58
# File 'lib/corepro/external_account.rb', line 56

def getByTag(connection = nil, loggingObject = nil)
  CorePro::Utils::Requestor.get("/externalaccount/getByTag/#{customerId}/#{escape(tag)}", ExternalAccount, connection, loggingObject)
end

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



65
66
67
# File 'lib/corepro/external_account.rb', line 65

def initiate(connection = nil, loggingObject = nil)
  CorePro::Utils::Requestor.post('/externalaccount/initiate', CorePro::Models::ExternalAccountIdOnly, self, connection, loggingObject)
end

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



34
35
36
# File 'lib/corepro/external_account.rb', line 34

def list(connection = nil, loggingObject = nil)
  CorePro::Utils::Requestor.get("/externalaccount/list/#{customerId}", ExternalAccount, connection, loggingObject)
end

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



86
87
88
89
# File 'lib/corepro/external_account.rb', line 86

def update(connection = nil, loggingObject = nil)
  eaid = CorePro::Utils::Requestor.post('/externalaccount/update', CorePro::Models::ExternalAccountIdOnly, self, connection, loggingObject)
  eaid.externalAccountId
end

#verify(amount1, amount2, connection = nil, loggingObject = nil) ⇒ Object



76
77
78
79
80
81
82
83
84
# File 'lib/corepro/external_account.rb', line 76

def verify(amount1, amount2, connection = nil, loggingObject = nil)
  eav = CorePro::Models::ExternalAccountVerify.new
  eav.customerId = @customerId
  eav.externalAccountId = @externalAccountId
  eav.amount1 = @amount1
  eav.amount2 = @amount2
  CorePro::Utils::Requestor.post('/externalaccount/verify', eav, self, connection, loggingObject)
  true
end