forked from socialmoney/corepro-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustomer.php
More file actions
85 lines (74 loc) · 2.16 KB
/
customer.php
File metadata and controls
85 lines (74 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
//see: http://docs.corepro.io/api/customer
final class Customer {
public $accounts;
public $addresses;
public $createdDate;
public $culture;
public $customerId;
public $driversLicenseState;
public $emailAddress;
public $externalAccounts;
public $firstName;
public $gender;
public $isActive;
public $isDocumentsAccepted;
public $isLocked;
public $isOptedInToBankCommunication;
public $isSubjectToBackupWithholding;
public $lastName;
public $lockedReason;
public $middleName;
public $passportCountry;
public $phones;
public $status;
public $tag;
public $taxId;
public $requestId;
public function Create($customer){
$requestor = new Requestor();
$model = $requestor->Post("/customer/create/",$customer, "Customer");
return $model;
}
public function Deactivate($customer){
$requestor = new Requestor();
$model = $requestor->Post("/customer/deactivate/",$customer, "Customer");
return $model;
}
public function Get($customerId){
$requestor = new Requestor();
$model = $requestor->Get("/customer/get/".$customerId, "Customer");
return $model;
}
public function GetByTag($tag){
$requestor = new Requestor();
$model = $requestor->Get("/customer/getByTag/".$tag, "Customer");
return $model;
}
public function Initiate($customer){
$requestor = new Requestor();
$model = $requestor->Post("/customer/initiate/",$customer, "Customer");
return $model;
}
public function ListAll($pageNumber=0, $pageSize=200){
$requestor = new Requestor();
$model = $requestor->Get("/customer/list/?pageNumber=".$pageNumber."&pageSize=".$pageSize, "Customer");
return $model;
}
public function Search($searchParameters, $pageNumber, $pageSize){
$requestor = new Requestor();
$model = $requestor->Post("/customer/search/?pageNumber=".$pageNumber."&pageSize=".$pageSize, $searchParameters, "Customer");
return $model;
}
public function Update($customer){
$requestor = new Requestor();
$model = $requestor->Post("/customer/update/",$customer, "Customer");
return $model;
}
public function Verify($customer){
$requestor = new Requestor();
$model = $requestor->Post("/customer/verify/",$customer, "Customer");
return $model;
}
}
?>