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!, #is_hash?, #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

#customField1Object

Returns the value of attribute customField1.



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

def customField1
  @customField1
end

#customField2Object

Returns the value of attribute customField2.



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

def customField2
  @customField2
end

#customField3Object

Returns the value of attribute customField3.



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

def customField3
  @customField3
end

#customField4Object

Returns the value of attribute customField4.



31
32
33
# File 'lib/corepro/external_account.rb', line 31

def customField4
  @customField4
end

#customField5Object

Returns the value of attribute customField5.



32
33
34
# File 'lib/corepro/external_account.rb', line 32

def customField5
  @customField5
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

#isLockedObject

Returns the value of attribute isLocked.



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

def isLocked
  @isLocked
end

#lastModifiedDateObject

Returns the value of attribute lastModifiedDate.



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

def lastModifiedDate
  @lastModifiedDate
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.



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

def lockedDate
  @lockedDate
end

#lockedReasonObject

Returns the value of attribute lockedReason.



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

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



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

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

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



43
44
45
# File 'lib/corepro/external_account.rb', line 43

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

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



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

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

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



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

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

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



78
79
80
81
# File 'lib/corepro/external_account.rb', line 78

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

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



47
48
49
50
# File 'lib/corepro/external_account.rb', line 47

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

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



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

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

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



73
74
75
76
# File 'lib/corepro/external_account.rb', line 73

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



63
64
65
66
67
68
69
70
71
# File 'lib/corepro/external_account.rb', line 63

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