Class: CorePro::Customer
- Inherits:
-
Models::ModelBase
- Object
- Models::JsonBase
- Models::ModelBase
- CorePro::Customer
- Defined in:
- lib/corepro/customer.rb
Instance Attribute Summary collapse
-
#accessTypeCode ⇒ Object
Returns the value of attribute accessTypeCode.
-
#accounts ⇒ Object
Returns the value of attribute accounts.
-
#addresses ⇒ Object
Returns the value of attribute addresses.
-
#birthDate ⇒ Object
Returns the value of attribute birthDate.
-
#cards ⇒ Object
Returns the value of attribute cards.
-
#createdDate ⇒ Object
Returns the value of attribute createdDate.
-
#culture ⇒ Object
Returns the value of attribute culture.
-
#customerCount ⇒ Object
Returns the value of attribute customerCount.
-
#customerId ⇒ Object
Returns the value of attribute customerId.
-
#customField1 ⇒ Object
Returns the value of attribute customField1.
-
#customField2 ⇒ Object
Returns the value of attribute customField2.
-
#customField3 ⇒ Object
Returns the value of attribute customField3.
-
#customField4 ⇒ Object
Returns the value of attribute customField4.
-
#customField5 ⇒ Object
Returns the value of attribute customField5.
-
#deceasedDate ⇒ Object
Returns the value of attribute deceasedDate.
-
#driversLicenseExpireDate ⇒ Object
Returns the value of attribute driversLicenseExpireDate.
-
#driversLicenseIssueDate ⇒ Object
Returns the value of attribute driversLicenseIssueDate.
-
#driversLicenseNumber ⇒ Object
Returns the value of attribute driversLicenseNumber.
-
#driversLicenseNumberMasked ⇒ Object
Returns the value of attribute driversLicenseNumberMasked.
-
#driversLicenseState ⇒ Object
Returns the value of attribute driversLicenseState.
-
#emailAddress ⇒ Object
Returns the value of attribute emailAddress.
-
#externalAccounts ⇒ Object
Returns the value of attribute externalAccounts.
-
#firstName ⇒ Object
Returns the value of attribute firstName.
-
#gender ⇒ Object
Returns the value of attribute gender.
-
#isActive ⇒ Object
Returns the value of attribute isActive.
-
#isDocumentsAccepted ⇒ Object
Returns the value of attribute isDocumentsAccepted.
-
#isLocked ⇒ Object
Returns the value of attribute isLocked.
-
#isOptedInToBankCommunication ⇒ Object
Returns the value of attribute isOptedInToBankCommunication.
-
#isSubjectToBackupWithholding ⇒ Object
Returns the value of attribute isSubjectToBackupWithholding.
-
#lastActivityDate ⇒ Object
Returns the value of attribute lastActivityDate.
-
#lastModifiedDate ⇒ Object
Returns the value of attribute lastModifiedDate.
-
#lastName ⇒ Object
Returns the value of attribute lastName.
-
#lockedDate ⇒ Object
Returns the value of attribute lockedDate.
-
#lockedReason ⇒ Object
Returns the value of attribute lockedReason.
-
#middleName ⇒ Object
Returns the value of attribute middleName.
-
#passportCountry ⇒ Object
Returns the value of attribute passportCountry.
-
#passportExpireDate ⇒ Object
Returns the value of attribute passportExpireDate.
-
#passportIssueDate ⇒ Object
Returns the value of attribute passportIssueDate.
-
#passportNumber ⇒ Object
Returns the value of attribute passportNumber.
-
#passportNumberMasked ⇒ Object
Returns the value of attribute passportNumberMasked.
-
#phones ⇒ Object
Returns the value of attribute phones.
-
#status ⇒ Object
Returns the value of attribute status.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
-
#tag ⇒ Object
Returns the value of attribute tag.
-
#taxId ⇒ Object
Returns the value of attribute taxId.
-
#taxIdMasked ⇒ Object
Returns the value of attribute taxIdMasked.
Attributes inherited from Models::ModelBase
Class Method Summary collapse
- .get(customerId, connection = nil, loggingObject = nil) ⇒ Object
- .getByEmail(emailAddress, connection = nil, loggingObject = nil) ⇒ Object
- .getByTag(tag, connection = nil, loggingObject = nil) ⇒ Object
- .list(pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
- .search(tag = nil, taxId = nil, passportNumber = nil, driversLicenseNumber = nil, birthDate = nil, emailAddress = nil, lastName = nil, firstName = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
Instance Method Summary collapse
- #archive(connection = nil, loggingObject = nil) ⇒ Object
- #create(connection = nil, loggingObject = nil) ⇒ Object
- #from_json!(json, classDefs) ⇒ Object
-
#initialize ⇒ Customer
constructor
A new instance of Customer.
- #initiate(connection = nil, loggingObject = nil) ⇒ Object
- #search(pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
- #update(connection = nil, loggingObject = nil) ⇒ Object
- #verify(verificationId, customerId, answers, connection = nil, loggingObject = nil) ⇒ Object
Methods inherited from Models::ModelBase
Methods inherited from Models::JsonBase
Constructor Details
#initialize ⇒ Customer
Returns a new instance of Customer.
71 72 73 74 75 76 77 78 |
# File 'lib/corepro/customer.rb', line 71 def initialize() super @phones = [] @addresses = [] @accounts = [] @externalAccounts = [] @cards = [] end |
Instance Attribute Details
#accessTypeCode ⇒ Object
Returns the value of attribute accessTypeCode.
52 53 54 |
# File 'lib/corepro/customer.rb', line 52 def accessTypeCode @accessTypeCode end |
#accounts ⇒ Object
Returns the value of attribute accounts.
57 58 59 |
# File 'lib/corepro/customer.rb', line 57 def accounts @accounts end |
#addresses ⇒ Object
Returns the value of attribute addresses.
56 57 58 |
# File 'lib/corepro/customer.rb', line 56 def addresses @addresses end |
#birthDate ⇒ Object
Returns the value of attribute birthDate.
20 21 22 |
# File 'lib/corepro/customer.rb', line 20 def birthDate @birthDate end |
#cards ⇒ Object
Returns the value of attribute cards.
59 60 61 |
# File 'lib/corepro/customer.rb', line 59 def cards @cards end |
#createdDate ⇒ Object
Returns the value of attribute createdDate.
25 26 27 |
# File 'lib/corepro/customer.rb', line 25 def createdDate @createdDate end |
#culture ⇒ Object
Returns the value of attribute culture.
22 23 24 |
# File 'lib/corepro/customer.rb', line 22 def culture @culture end |
#customerCount ⇒ Object
Returns the value of attribute customerCount.
14 15 16 |
# File 'lib/corepro/customer.rb', line 14 def customerCount @customerCount end |
#customerId ⇒ Object
Returns the value of attribute customerId.
15 16 17 |
# File 'lib/corepro/customer.rb', line 15 def customerId @customerId end |
#customField1 ⇒ Object
Returns the value of attribute customField1.
47 48 49 |
# File 'lib/corepro/customer.rb', line 47 def customField1 @customField1 end |
#customField2 ⇒ Object
Returns the value of attribute customField2.
48 49 50 |
# File 'lib/corepro/customer.rb', line 48 def customField2 @customField2 end |
#customField3 ⇒ Object
Returns the value of attribute customField3.
49 50 51 |
# File 'lib/corepro/customer.rb', line 49 def customField3 @customField3 end |
#customField4 ⇒ Object
Returns the value of attribute customField4.
50 51 52 |
# File 'lib/corepro/customer.rb', line 50 def customField4 @customField4 end |
#customField5 ⇒ Object
Returns the value of attribute customField5.
51 52 53 |
# File 'lib/corepro/customer.rb', line 51 def customField5 @customField5 end |
#deceasedDate ⇒ Object
Returns the value of attribute deceasedDate.
43 44 45 |
# File 'lib/corepro/customer.rb', line 43 def deceasedDate @deceasedDate end |
#driversLicenseExpireDate ⇒ Object
Returns the value of attribute driversLicenseExpireDate.
32 33 34 |
# File 'lib/corepro/customer.rb', line 32 def driversLicenseExpireDate @driversLicenseExpireDate end |
#driversLicenseIssueDate ⇒ Object
Returns the value of attribute driversLicenseIssueDate.
31 32 33 |
# File 'lib/corepro/customer.rb', line 31 def driversLicenseIssueDate @driversLicenseIssueDate end |
#driversLicenseNumber ⇒ Object
Returns the value of attribute driversLicenseNumber.
28 29 30 |
# File 'lib/corepro/customer.rb', line 28 def driversLicenseNumber @driversLicenseNumber end |
#driversLicenseNumberMasked ⇒ Object
Returns the value of attribute driversLicenseNumberMasked.
29 30 31 |
# File 'lib/corepro/customer.rb', line 29 def driversLicenseNumberMasked @driversLicenseNumberMasked end |
#driversLicenseState ⇒ Object
Returns the value of attribute driversLicenseState.
30 31 32 |
# File 'lib/corepro/customer.rb', line 30 def driversLicenseState @driversLicenseState end |
#emailAddress ⇒ Object
Returns the value of attribute emailAddress.
38 39 40 |
# File 'lib/corepro/customer.rb', line 38 def emailAddress @emailAddress end |
#externalAccounts ⇒ Object
Returns the value of attribute externalAccounts.
58 59 60 |
# File 'lib/corepro/customer.rb', line 58 def externalAccounts @externalAccounts end |
#firstName ⇒ Object
Returns the value of attribute firstName.
16 17 18 |
# File 'lib/corepro/customer.rb', line 16 def firstName @firstName end |
#gender ⇒ Object
Returns the value of attribute gender.
21 22 23 |
# File 'lib/corepro/customer.rb', line 21 def gender @gender end |
#isActive ⇒ Object
Returns the value of attribute isActive.
39 40 41 |
# File 'lib/corepro/customer.rb', line 39 def isActive @isActive end |
#isDocumentsAccepted ⇒ Object
Returns the value of attribute isDocumentsAccepted.
46 47 48 |
# File 'lib/corepro/customer.rb', line 46 def isDocumentsAccepted @isDocumentsAccepted end |
#isLocked ⇒ Object
Returns the value of attribute isLocked.
40 41 42 |
# File 'lib/corepro/customer.rb', line 40 def isLocked @isLocked end |
#isOptedInToBankCommunication ⇒ Object
Returns the value of attribute isOptedInToBankCommunication.
45 46 47 |
# File 'lib/corepro/customer.rb', line 45 def isOptedInToBankCommunication @isOptedInToBankCommunication end |
#isSubjectToBackupWithholding ⇒ Object
Returns the value of attribute isSubjectToBackupWithholding.
44 45 46 |
# File 'lib/corepro/customer.rb', line 44 def isSubjectToBackupWithholding @isSubjectToBackupWithholding end |
#lastActivityDate ⇒ Object
Returns the value of attribute lastActivityDate.
54 55 56 |
# File 'lib/corepro/customer.rb', line 54 def lastActivityDate @lastActivityDate end |
#lastModifiedDate ⇒ Object
Returns the value of attribute lastModifiedDate.
53 54 55 |
# File 'lib/corepro/customer.rb', line 53 def lastModifiedDate @lastModifiedDate end |
#lastName ⇒ Object
Returns the value of attribute lastName.
18 19 20 |
# File 'lib/corepro/customer.rb', line 18 def lastName @lastName end |
#lockedDate ⇒ Object
Returns the value of attribute lockedDate.
41 42 43 |
# File 'lib/corepro/customer.rb', line 41 def lockedDate @lockedDate end |
#lockedReason ⇒ Object
Returns the value of attribute lockedReason.
42 43 44 |
# File 'lib/corepro/customer.rb', line 42 def lockedReason @lockedReason end |
#middleName ⇒ Object
Returns the value of attribute middleName.
17 18 19 |
# File 'lib/corepro/customer.rb', line 17 def middleName @middleName end |
#passportCountry ⇒ Object
Returns the value of attribute passportCountry.
35 36 37 |
# File 'lib/corepro/customer.rb', line 35 def passportCountry @passportCountry end |
#passportExpireDate ⇒ Object
Returns the value of attribute passportExpireDate.
37 38 39 |
# File 'lib/corepro/customer.rb', line 37 def passportExpireDate @passportExpireDate end |
#passportIssueDate ⇒ Object
Returns the value of attribute passportIssueDate.
36 37 38 |
# File 'lib/corepro/customer.rb', line 36 def passportIssueDate @passportIssueDate end |
#passportNumber ⇒ Object
Returns the value of attribute passportNumber.
33 34 35 |
# File 'lib/corepro/customer.rb', line 33 def passportNumber @passportNumber end |
#passportNumberMasked ⇒ Object
Returns the value of attribute passportNumberMasked.
34 35 36 |
# File 'lib/corepro/customer.rb', line 34 def passportNumberMasked @passportNumberMasked end |
#phones ⇒ Object
Returns the value of attribute phones.
55 56 57 |
# File 'lib/corepro/customer.rb', line 55 def phones @phones end |
#status ⇒ Object
Returns the value of attribute status.
24 25 26 |
# File 'lib/corepro/customer.rb', line 24 def status @status end |
#suffix ⇒ Object
Returns the value of attribute suffix.
19 20 21 |
# File 'lib/corepro/customer.rb', line 19 def suffix @suffix end |
#tag ⇒ Object
Returns the value of attribute tag.
23 24 25 |
# File 'lib/corepro/customer.rb', line 23 def tag @tag end |
#taxId ⇒ Object
Returns the value of attribute taxId.
26 27 28 |
# File 'lib/corepro/customer.rb', line 26 def taxId @taxId end |
#taxIdMasked ⇒ Object
Returns the value of attribute taxIdMasked.
27 28 29 |
# File 'lib/corepro/customer.rb', line 27 def taxIdMasked @taxIdMasked end |
Class Method Details
.get(customerId, connection = nil, loggingObject = nil) ⇒ Object
84 85 86 |
# File 'lib/corepro/customer.rb', line 84 def self.get(customerId, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.get("/customer/get/#{customerId}", Customer, connection, loggingObject) end |
.getByEmail(emailAddress, connection = nil, loggingObject = nil) ⇒ Object
92 93 94 |
# File 'lib/corepro/customer.rb', line 92 def self.getByEmail(emailAddress, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.get("/customer/getByEmail/?emailAddress=#{escape(emailAddress)}", Customer, connection, loggingObject) end |
.getByTag(tag, connection = nil, loggingObject = nil) ⇒ Object
88 89 90 |
# File 'lib/corepro/customer.rb', line 88 def self.getByTag(tag, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.get("/customer/getByTag/?tag=#{escape(tag)}", Customer, connection, loggingObject) end |
.list(pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
80 81 82 |
# File 'lib/corepro/customer.rb', line 80 def self.list(pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.get("/customer/list?pageNumber=#{pageNumber}&pageSize=#{pageSize}", Customer, connection, loggingObject) end |
.search(tag = nil, taxId = nil, passportNumber = nil, driversLicenseNumber = nil, birthDate = nil, emailAddress = nil, lastName = nil, firstName = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/corepro/customer.rb', line 96 def self.search(tag = nil, taxId = nil, passportNumber = nil, driversLicenseNumber = nil, birthDate = nil, emailAddress = nil, lastName = nil, firstName = nil, pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) c = Customer.new c.tag = tag c.taxId = taxId c.passportNumber = passportNumber c.driversLicenseNumber = driversLicenseNumber c.birthDate = birthDate c.emailAddress = emailAddress c.lastName = lastName c.firstName = firstName c.search(pageNumber, pageSize, connection, loggingObject) end |
Instance Method Details
#archive(connection = nil, loggingObject = nil) ⇒ Object
123 124 125 126 |
# File 'lib/corepro/customer.rb', line 123 def archive(connection = nil, loggingObject = nil) cid = CorePro::Utils::Requestor.post('/customer/archive', CorePro::Models::CustomerIdOnly, self, connection, loggingObject) cid.customerId end |
#create(connection = nil, loggingObject = nil) ⇒ Object
113 114 115 116 |
# File 'lib/corepro/customer.rb', line 113 def create(connection = nil, loggingObject = nil) cid = CorePro::Utils::Requestor.post('/customer/create', CorePro::Models::CustomerIdOnly, self, connection, loggingObject) cid.customerId end |
#from_json!(json, classDefs) ⇒ Object
61 62 63 64 65 66 67 68 69 |
# File 'lib/corepro/customer.rb', line 61 def from_json! json, classDefs classDefs = classDefs || {} classDefs['phones'] = CorePro::Models::CustomerPhone classDefs['addresses'] = CorePro::Models::CustomerAddress classDefs['accounts'] = CorePro::Account classDefs['externalAccounts'] = CorePro::ExternalAccount classDefs['cards'] = CorePro::Card super json, classDefs end |
#initiate(connection = nil, loggingObject = nil) ⇒ Object
128 129 130 |
# File 'lib/corepro/customer.rb', line 128 def initiate(connection = nil, loggingObject = nil) CorePro::Utils::Requestor.post('/customer/initiate', CorePro::Models::CustomerResponse, self, connection, loggingObject) end |
#search(pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) ⇒ Object
109 110 111 |
# File 'lib/corepro/customer.rb', line 109 def search(pageNumber = 0, pageSize = 200, connection = nil, loggingObject = nil) CorePro::Utils::Requestor.post("/customer/search?pageNumber=#{pageNumber}&pageSize=#{pageSize}", Customer, self, connection, loggingObject) end |
#update(connection = nil, loggingObject = nil) ⇒ Object
118 119 120 121 |
# File 'lib/corepro/customer.rb', line 118 def update(connection = nil, loggingObject = nil) cid = CorePro::Utils::Requestor.post('/customer/update', CorePro::Models::CustomerIdOnly, self, connection, loggingObject) cid.customerId end |
#verify(verificationId, customerId, answers, connection = nil, loggingObject = nil) ⇒ Object
132 133 134 135 136 137 138 |
# File 'lib/corepro/customer.rb', line 132 def verify(verificationId, customerId, answers, connection = nil, loggingObject = nil) cvr = CorePro::Models::CustomerVerifyRequest.new cvr.customerId = customerId cvr.verificationId = verificationId cvr.answers = answers cvr.verify connection, loggingObject end |