mastercard_p2p 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mastercard/api/p2p/accountinfo.rb +35 -31
- data/lib/mastercard/api/p2p/accountverification.rb +35 -32
- data/lib/mastercard/api/p2p/consumer.rb +120 -107
- data/lib/mastercard/api/p2p/consumeraccount.rb +109 -97
- data/lib/mastercard/api/p2p/consumercontactid.rb +109 -97
- data/lib/mastercard/api/p2p/consumergovernmentid.rb +109 -97
- data/lib/mastercard/api/p2p/paymenttransfer.rb +68 -61
- data/lib/mastercard/api/p2p/{skdconfig.rb → resourceconfig.rb} +70 -22
- data/lib/mastercard/api/p2p/sanctionscreening.rb +35 -31
- data/lib/mastercard_p2p.rb +9 -7
- metadata +7 -7
@@ -27,153 +27,165 @@
|
|
27
27
|
|
28
28
|
|
29
29
|
require "mastercard/core/model"
|
30
|
+
require "mastercard/core/baseobject"
|
30
31
|
|
31
32
|
module MasterCard
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
module API
|
34
|
+
module P2p
|
35
|
+
class ConsumerAccount < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
@__store = {
|
40
|
+
'db8abe07-5a1c-4b11-a402-09f9538fe388' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "create", [], []),
|
41
|
+
'32f122e6-70c6-4878-a9e5-c37903d8e3f9' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "delete", [], []),
|
42
|
+
'a0ccac81-1f8d-48e7-a5a2-60a4e94648dc' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "read", [], []),
|
43
|
+
'f0fcc101-f6c0-4b14-b0e7-526682ae427f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "query", [], ["ref"]),
|
44
|
+
'1672c634-aaf2-48f6-9709-f30c88efdfc9' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "update", [], []),
|
45
|
+
|
46
|
+
}
|
46
47
|
|
47
|
-
|
48
|
+
protected
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
def self.getOperationConfig(uuid)
|
51
|
+
if @__store.key?(uuid)
|
52
|
+
return @__store[uuid]
|
53
|
+
end
|
54
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
|
55
|
+
end
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
57
|
+
def self.getOperationMetadata()
|
58
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
59
|
+
end
|
59
60
|
|
60
|
-
|
61
|
+
public
|
61
62
|
|
62
63
|
|
64
|
+
def self.create(mapObj)
|
65
|
+
#
|
66
|
+
#Creates object of type ConsumerAccount
|
67
|
+
#
|
68
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
69
|
+
#@return [ConsumerAccount] of the response of created instance.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
return self.execute("db8abe07-5a1c-4b11-a402-09f9538fe388", ConsumerAccount.new(mapObj))
|
72
|
+
end
|
63
73
|
|
64
74
|
|
65
75
|
|
66
76
|
|
67
|
-
def self.listAll(criteria)
|
68
|
-
#
|
69
|
-
#Query objects of type ConsumerAccount by id and optional criteria
|
70
|
-
#@param type criteria
|
71
|
-
#@return ConsumerAccount object representing the response.
|
72
|
-
#
|
73
77
|
|
74
|
-
return self.execute("38606076-1a9b-455c-a525-892d3a29e5cb",ConsumerAccount.new(criteria))
|
75
|
-
end
|
76
78
|
|
77
|
-
def self.create(mapObj)
|
78
|
-
#
|
79
|
-
#Creates object of type ConsumerAccount
|
80
|
-
#
|
81
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
82
|
-
#@return ConsumerAccount of the response of created instance.
|
83
|
-
#
|
84
|
-
return self.execute("ad30d126-530a-493b-b2c3-83005b749ddc", ConsumerAccount.new(mapObj))
|
85
|
-
end
|
86
79
|
|
87
80
|
|
88
81
|
|
89
82
|
|
83
|
+
def self.deleteById(id, map = nil)
|
84
|
+
#Delete object of type ConsumerAccount by id
|
90
85
|
|
86
|
+
#@param [String] id
|
87
|
+
#@param [Dict] map, containing additional parameters
|
88
|
+
#@return [ConsumerAccount] of the response of the deleted instance.
|
89
|
+
#@raise [APIException] an exception from the response status
|
91
90
|
|
92
91
|
|
92
|
+
mapObj = ConsumerAccount.new
|
93
|
+
if !(id.nil? || id.to_s.empty?)
|
94
|
+
mapObj.set("id", id)
|
95
|
+
end
|
96
|
+
if !map.nil?
|
97
|
+
if map.instance_of? RequestMap
|
98
|
+
mapObj.setAll(map.getObject())
|
99
|
+
else
|
100
|
+
mapObj.setAll(map)
|
101
|
+
end
|
102
|
+
end
|
93
103
|
|
104
|
+
return self.execute("32f122e6-70c6-4878-a9e5-c37903d8e3f9", mapObj)
|
105
|
+
end
|
94
106
|
|
95
107
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
#@param str id
|
100
|
-
#@param dict criteria
|
101
|
-
#@return instance of ConsumerAccount
|
108
|
+
def delete
|
109
|
+
#
|
110
|
+
#Delete object of type ConsumerAccount
|
102
111
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
if !criteria.nil?
|
108
|
-
if criteria.instance_of? RequestMap
|
109
|
-
mapObj.setAll(criteria.getObject())
|
110
|
-
else
|
111
|
-
mapObj.setAll(criteria)
|
112
|
-
end
|
113
|
-
end
|
112
|
+
#@param [String] id
|
113
|
+
#@return [ConsumerAccount] of the response of the deleted instance.
|
114
|
+
#@raise [APIException] an exception from the response status
|
115
|
+
#
|
114
116
|
|
115
|
-
|
116
|
-
|
117
|
+
return self.class.execute("32f122e6-70c6-4878-a9e5-c37903d8e3f9", self)
|
118
|
+
end
|
117
119
|
|
118
120
|
|
119
121
|
|
120
|
-
def update
|
121
|
-
#
|
122
|
-
#Updates an object of type ConsumerAccount
|
123
|
-
#
|
124
|
-
#@return ConsumerAccount object representing the response.
|
125
|
-
#
|
126
|
-
return self.class.execute("b43956b9-01f1-48ca-a4f0-6af29b7370e3",self)
|
127
|
-
end
|
128
122
|
|
129
123
|
|
130
124
|
|
131
125
|
|
132
126
|
|
127
|
+
def self.readByID(id, criteria = nil)
|
128
|
+
#
|
129
|
+
#Returns objects of type ConsumerAccount by id and optional criteria
|
130
|
+
#@param [String] id
|
131
|
+
#@param [Dict] criteria
|
132
|
+
#@return [ConsumerAccount] object representing the response
|
133
|
+
#@raise [APIException] an exception from the response status
|
133
134
|
|
135
|
+
mapObj = ConsumerAccount.new
|
136
|
+
if !(id.nil? || id.to_s.empty?)
|
137
|
+
mapObj.set("id", id)
|
138
|
+
end
|
139
|
+
if !criteria.nil?
|
140
|
+
if criteria.instance_of? RequestMap
|
141
|
+
mapObj.setAll(criteria.getObject())
|
142
|
+
else
|
143
|
+
mapObj.setAll(criteria)
|
144
|
+
end
|
145
|
+
end
|
134
146
|
|
147
|
+
return self.execute("a0ccac81-1f8d-48e7-a5a2-60a4e94648dc",ConsumerAccount.new(mapObj))
|
148
|
+
end
|
135
149
|
|
136
150
|
|
137
|
-
def self.deleteById(id, map = nil)
|
138
|
-
#Delete object of type ConsumerAccount by id
|
139
151
|
|
140
|
-
#@param str id
|
141
|
-
#@param Dict map, containing additional parameters
|
142
|
-
#@return ConsumerAccount of the response of the deleted instance.
|
143
152
|
|
144
153
|
|
145
|
-
mapObj = ConsumerAccount.new
|
146
|
-
if !(id.nil? || id.to_s.empty?)
|
147
|
-
mapObj.set("id", id)
|
148
|
-
end
|
149
|
-
if !map.nil?
|
150
|
-
if map.instance_of? RequestMap
|
151
|
-
mapObj.setAll(map.getObject())
|
152
|
-
else
|
153
|
-
mapObj.setAll(map)
|
154
|
-
end
|
155
|
-
end
|
156
154
|
|
157
|
-
return self.execute("f9a9c285-3b75-4174-944f-dd78a4e20349", mapObj)
|
158
|
-
end
|
159
155
|
|
160
156
|
|
161
|
-
|
162
|
-
|
163
|
-
|
157
|
+
def self.listAll(criteria)
|
158
|
+
#
|
159
|
+
#Query objects of type ConsumerAccount by id and optional criteria
|
160
|
+
#@param [Dict] criteria
|
161
|
+
#@return [ConsumerAccount] object representing the response.
|
162
|
+
#@raise [APIException] an exception from the response status
|
163
|
+
#
|
164
164
|
|
165
|
-
|
166
|
-
|
167
|
-
#
|
165
|
+
return self.execute("f0fcc101-f6c0-4b14-b0e7-526682ae427f",ConsumerAccount.new(criteria))
|
166
|
+
end
|
168
167
|
|
169
|
-
return self.class.execute("f9a9c285-3b75-4174-944f-dd78a4e20349", self)
|
170
|
-
end
|
171
168
|
|
172
169
|
|
170
|
+
def update
|
171
|
+
#
|
172
|
+
#Updates an object of type ConsumerAccount
|
173
|
+
#
|
174
|
+
#@return [ConsumerAccount] object representing the response.
|
175
|
+
#@raise [APIException] an exception from the response status
|
176
|
+
#
|
177
|
+
return self.class.execute("1672c634-aaf2-48f6-9709-f30c88efdfc9",self)
|
178
|
+
end
|
173
179
|
|
174
|
-
|
175
|
-
|
176
|
-
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
177
189
|
end
|
178
190
|
|
179
191
|
|
@@ -27,153 +27,165 @@
|
|
27
27
|
|
28
28
|
|
29
29
|
require "mastercard/core/model"
|
30
|
+
require "mastercard/core/baseobject"
|
30
31
|
|
31
32
|
module MasterCard
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
module API
|
34
|
+
module P2p
|
35
|
+
class ConsumerContactID < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
@__store = {
|
40
|
+
'b05753f2-29fa-46ed-a610-39448052737f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "create", [], []),
|
41
|
+
'a719c0ce-6595-49bd-8e2f-b76f3a3f0437' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "delete", [], []),
|
42
|
+
'0807eca8-af54-401d-8db3-bae828d1a863' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "read", [], []),
|
43
|
+
'80f9077e-520b-48ae-a751-8b42e7a55818' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "query", [], []),
|
44
|
+
'b9b88de0-48a3-47c8-9ed4-8aaaca0c20cb' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "update", [], []),
|
45
|
+
|
46
|
+
}
|
46
47
|
|
47
|
-
|
48
|
+
protected
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
def self.getOperationConfig(uuid)
|
51
|
+
if @__store.key?(uuid)
|
52
|
+
return @__store[uuid]
|
53
|
+
end
|
54
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
|
55
|
+
end
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
57
|
+
def self.getOperationMetadata()
|
58
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
59
|
+
end
|
59
60
|
|
60
|
-
|
61
|
+
public
|
61
62
|
|
62
63
|
|
64
|
+
def self.create(mapObj)
|
65
|
+
#
|
66
|
+
#Creates object of type ConsumerContactID
|
67
|
+
#
|
68
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
69
|
+
#@return [ConsumerContactID] of the response of created instance.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
return self.execute("b05753f2-29fa-46ed-a610-39448052737f", ConsumerContactID.new(mapObj))
|
72
|
+
end
|
63
73
|
|
64
74
|
|
65
75
|
|
66
76
|
|
67
|
-
def self.listAll(criteria)
|
68
|
-
#
|
69
|
-
#Query objects of type ConsumerContactID by id and optional criteria
|
70
|
-
#@param type criteria
|
71
|
-
#@return ConsumerContactID object representing the response.
|
72
|
-
#
|
73
77
|
|
74
|
-
return self.execute("eaac77eb-dc38-4be6-928d-5feec247e54c",ConsumerContactID.new(criteria))
|
75
|
-
end
|
76
78
|
|
77
|
-
def self.create(mapObj)
|
78
|
-
#
|
79
|
-
#Creates object of type ConsumerContactID
|
80
|
-
#
|
81
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
82
|
-
#@return ConsumerContactID of the response of created instance.
|
83
|
-
#
|
84
|
-
return self.execute("021ed7f9-55c4-4803-8498-0a65e092c819", ConsumerContactID.new(mapObj))
|
85
|
-
end
|
86
79
|
|
87
80
|
|
88
81
|
|
89
82
|
|
83
|
+
def self.deleteById(id, map = nil)
|
84
|
+
#Delete object of type ConsumerContactID by id
|
90
85
|
|
86
|
+
#@param [String] id
|
87
|
+
#@param [Dict] map, containing additional parameters
|
88
|
+
#@return [ConsumerContactID] of the response of the deleted instance.
|
89
|
+
#@raise [APIException] an exception from the response status
|
91
90
|
|
92
91
|
|
92
|
+
mapObj = ConsumerContactID.new
|
93
|
+
if !(id.nil? || id.to_s.empty?)
|
94
|
+
mapObj.set("id", id)
|
95
|
+
end
|
96
|
+
if !map.nil?
|
97
|
+
if map.instance_of? RequestMap
|
98
|
+
mapObj.setAll(map.getObject())
|
99
|
+
else
|
100
|
+
mapObj.setAll(map)
|
101
|
+
end
|
102
|
+
end
|
93
103
|
|
104
|
+
return self.execute("a719c0ce-6595-49bd-8e2f-b76f3a3f0437", mapObj)
|
105
|
+
end
|
94
106
|
|
95
107
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
#@param str id
|
100
|
-
#@param dict criteria
|
101
|
-
#@return instance of ConsumerContactID
|
108
|
+
def delete
|
109
|
+
#
|
110
|
+
#Delete object of type ConsumerContactID
|
102
111
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
if !criteria.nil?
|
108
|
-
if criteria.instance_of? RequestMap
|
109
|
-
mapObj.setAll(criteria.getObject())
|
110
|
-
else
|
111
|
-
mapObj.setAll(criteria)
|
112
|
-
end
|
113
|
-
end
|
112
|
+
#@param [String] id
|
113
|
+
#@return [ConsumerContactID] of the response of the deleted instance.
|
114
|
+
#@raise [APIException] an exception from the response status
|
115
|
+
#
|
114
116
|
|
115
|
-
|
116
|
-
|
117
|
+
return self.class.execute("a719c0ce-6595-49bd-8e2f-b76f3a3f0437", self)
|
118
|
+
end
|
117
119
|
|
118
120
|
|
119
121
|
|
120
|
-
def update
|
121
|
-
#
|
122
|
-
#Updates an object of type ConsumerContactID
|
123
|
-
#
|
124
|
-
#@return ConsumerContactID object representing the response.
|
125
|
-
#
|
126
|
-
return self.class.execute("74d98545-c94c-4743-9573-a06b03408915",self)
|
127
|
-
end
|
128
122
|
|
129
123
|
|
130
124
|
|
131
125
|
|
132
126
|
|
127
|
+
def self.read(id, criteria = nil)
|
128
|
+
#
|
129
|
+
#Returns objects of type ConsumerContactID by id and optional criteria
|
130
|
+
#@param [String] id
|
131
|
+
#@param [Dict] criteria
|
132
|
+
#@return [ConsumerContactID] object representing the response
|
133
|
+
#@raise [APIException] an exception from the response status
|
133
134
|
|
135
|
+
mapObj = ConsumerContactID.new
|
136
|
+
if !(id.nil? || id.to_s.empty?)
|
137
|
+
mapObj.set("id", id)
|
138
|
+
end
|
139
|
+
if !criteria.nil?
|
140
|
+
if criteria.instance_of? RequestMap
|
141
|
+
mapObj.setAll(criteria.getObject())
|
142
|
+
else
|
143
|
+
mapObj.setAll(criteria)
|
144
|
+
end
|
145
|
+
end
|
134
146
|
|
147
|
+
return self.execute("0807eca8-af54-401d-8db3-bae828d1a863",ConsumerContactID.new(mapObj))
|
148
|
+
end
|
135
149
|
|
136
150
|
|
137
|
-
def self.deleteById(id, map = nil)
|
138
|
-
#Delete object of type ConsumerContactID by id
|
139
151
|
|
140
|
-
#@param str id
|
141
|
-
#@param Dict map, containing additional parameters
|
142
|
-
#@return ConsumerContactID of the response of the deleted instance.
|
143
152
|
|
144
153
|
|
145
|
-
mapObj = ConsumerContactID.new
|
146
|
-
if !(id.nil? || id.to_s.empty?)
|
147
|
-
mapObj.set("id", id)
|
148
|
-
end
|
149
|
-
if !map.nil?
|
150
|
-
if map.instance_of? RequestMap
|
151
|
-
mapObj.setAll(map.getObject())
|
152
|
-
else
|
153
|
-
mapObj.setAll(map)
|
154
|
-
end
|
155
|
-
end
|
156
154
|
|
157
|
-
return self.execute("a713cbce-5b0e-4783-b0d9-d29fb9876561", mapObj)
|
158
|
-
end
|
159
155
|
|
160
156
|
|
161
|
-
|
162
|
-
|
163
|
-
|
157
|
+
def self.listAll(criteria)
|
158
|
+
#
|
159
|
+
#Query objects of type ConsumerContactID by id and optional criteria
|
160
|
+
#@param [Dict] criteria
|
161
|
+
#@return [ConsumerContactID] object representing the response.
|
162
|
+
#@raise [APIException] an exception from the response status
|
163
|
+
#
|
164
164
|
|
165
|
-
|
166
|
-
|
167
|
-
#
|
165
|
+
return self.execute("80f9077e-520b-48ae-a751-8b42e7a55818",ConsumerContactID.new(criteria))
|
166
|
+
end
|
168
167
|
|
169
|
-
return self.class.execute("a713cbce-5b0e-4783-b0d9-d29fb9876561", self)
|
170
|
-
end
|
171
168
|
|
172
169
|
|
170
|
+
def update
|
171
|
+
#
|
172
|
+
#Updates an object of type ConsumerContactID
|
173
|
+
#
|
174
|
+
#@return [ConsumerContactID] object representing the response.
|
175
|
+
#@raise [APIException] an exception from the response status
|
176
|
+
#
|
177
|
+
return self.class.execute("b9b88de0-48a3-47c8-9ed4-8aaaca0c20cb",self)
|
178
|
+
end
|
173
179
|
|
174
|
-
|
175
|
-
|
176
|
-
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
177
189
|
end
|
178
190
|
|
179
191
|
|