mastercard_p2p 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mastercard/api/p2p/accountbalance.rb +105 -0
- data/lib/mastercard/api/p2p/accountinfo.rb +32 -32
- data/lib/mastercard/api/p2p/accountmapping.rb +32 -32
- data/lib/mastercard/api/p2p/accountverification.rb +32 -32
- data/lib/mastercard/api/p2p/consumer.rb +112 -112
- data/lib/mastercard/api/p2p/consumeraccount.rb +102 -102
- data/lib/mastercard/api/p2p/consumercontactid.rb +102 -102
- data/lib/mastercard/api/p2p/consumergovernmentid.rb +102 -102
- data/lib/mastercard/api/p2p/paymenttransfer.rb +63 -63
- data/lib/mastercard/api/p2p/resourceconfig.rb +54 -54
- data/lib/mastercard/api/p2p/sanctionscreening.rb +32 -32
- data/lib/mastercard/api/p2p/transfernotification.rb +32 -32
- data/lib/mastercard_p2p.rb +1 -0
- metadata +5 -4
@@ -30,90 +30,90 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module P2p
|
35
|
+
class Consumer < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
@__store = {
|
40
|
+
'e3e84eda-0e71-400c-9208-7e822ca3be72' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}", "delete", [], []),
|
41
|
+
'b4dd5e2f-18a7-495b-a846-2f1153bfae32' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers", "create", [], []),
|
42
|
+
'b445d4f8-c184-42fb-b6b0-ba951c6acb52' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}", "read", [], []),
|
43
|
+
'5d637704-7c59-49bf-8ecb-7421672e87fe' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers", "query", [], ["ref","contact_id_uri"]),
|
44
|
+
'06aecedd-dc58-454c-a7e8-659dac8aa16e' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/search", "create", [], []),
|
45
|
+
'5e00a506-e9f9-481e-b571-f32bd2a4dd29' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}", "update", [], []),
|
46
|
+
|
47
|
+
}
|
48
48
|
|
49
|
-
|
49
|
+
protected
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
def self.getOperationConfig(operationUUID)
|
52
|
+
if @__store.key?(operationUUID)
|
53
|
+
return @__store[operationUUID]
|
54
|
+
end
|
55
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
56
|
+
end
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
def self.getOperationMetadata()
|
59
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
60
|
+
end
|
61
61
|
|
62
|
-
|
62
|
+
public
|
63
63
|
|
64
64
|
|
65
65
|
|
66
66
|
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
def self.deleteById(id, map = nil)
|
69
|
+
#Delete object of type Consumer by id
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
#@param [String] id
|
72
|
+
#@param [Dict] map, containing additional parameters
|
73
|
+
#@return [Consumer] of the response of the deleted instance.
|
74
|
+
#@raise [APIException] an exception from the response status
|
75
75
|
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
77
|
+
mapObj = Consumer.new
|
78
|
+
if !(id.nil? || id.to_s.empty?)
|
79
|
+
mapObj.set("id", id)
|
80
|
+
end
|
81
|
+
if !map.nil?
|
82
|
+
if map.instance_of? RequestMap
|
83
|
+
mapObj.setAll(map.getObject())
|
84
|
+
else
|
85
|
+
mapObj.setAll(map)
|
86
|
+
end
|
87
|
+
end
|
88
88
|
|
89
|
-
|
90
|
-
|
89
|
+
return self.execute("e3e84eda-0e71-400c-9208-7e822ca3be72", mapObj)
|
90
|
+
end
|
91
91
|
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
def delete
|
94
|
+
#
|
95
|
+
#Delete object of type Consumer
|
96
96
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
97
|
+
#@param [String] id
|
98
|
+
#@return [Consumer] of the response of the deleted instance.
|
99
|
+
#@raise [APIException] an exception from the response status
|
100
|
+
#
|
101
101
|
|
102
|
-
|
103
|
-
|
102
|
+
return self.class.execute("e3e84eda-0e71-400c-9208-7e822ca3be72", self)
|
103
|
+
end
|
104
104
|
|
105
105
|
|
106
106
|
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
108
|
+
def self.create(mapObj)
|
109
|
+
#
|
110
|
+
#Creates object of type Consumer
|
111
|
+
#
|
112
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
113
|
+
#@return [Consumer] of the response of created instance.
|
114
|
+
#@raise [APIException] an exception from the response status
|
115
|
+
return self.execute("b4dd5e2f-18a7-495b-a846-2f1153bfae32", Consumer.new(mapObj))
|
116
|
+
end
|
117
117
|
|
118
118
|
|
119
119
|
|
@@ -125,28 +125,28 @@ module MasterCard
|
|
125
125
|
|
126
126
|
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
128
|
+
def self.readByID(id, criteria = nil)
|
129
|
+
#
|
130
|
+
#Returns objects of type Consumer by id and optional criteria
|
131
|
+
#@param [String] id
|
132
|
+
#@param [Dict] criteria
|
133
|
+
#@return [Consumer] object representing the response
|
134
|
+
#@raise [APIException] an exception from the response status
|
135
135
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
136
|
+
mapObj = Consumer.new
|
137
|
+
if !(id.nil? || id.to_s.empty?)
|
138
|
+
mapObj.set("id", id)
|
139
|
+
end
|
140
|
+
if !criteria.nil?
|
141
|
+
if criteria.instance_of? RequestMap
|
142
|
+
mapObj.setAll(criteria.getObject())
|
143
|
+
else
|
144
|
+
mapObj.setAll(criteria)
|
145
|
+
end
|
146
|
+
end
|
147
147
|
|
148
|
-
|
149
|
-
|
148
|
+
return self.execute("b445d4f8-c184-42fb-b6b0-ba951c6acb52",Consumer.new(mapObj))
|
149
|
+
end
|
150
150
|
|
151
151
|
|
152
152
|
|
@@ -155,27 +155,27 @@ module MasterCard
|
|
155
155
|
|
156
156
|
|
157
157
|
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
158
|
+
def self.listByReferenceOrContactID(criteria)
|
159
|
+
#
|
160
|
+
#Query objects of type Consumer by id and optional criteria
|
161
|
+
#@param [Dict] criteria
|
162
|
+
#@return [Consumer] object representing the response.
|
163
|
+
#@raise [APIException] an exception from the response status
|
164
|
+
#
|
165
165
|
|
166
|
-
|
167
|
-
|
166
|
+
return self.execute("5d637704-7c59-49bf-8ecb-7421672e87fe",Consumer.new(criteria))
|
167
|
+
end
|
168
168
|
|
169
169
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
170
|
+
def self.listByReferenceContactIDOrGovernmentID(mapObj)
|
171
|
+
#
|
172
|
+
#Creates object of type Consumer
|
173
|
+
#
|
174
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
175
|
+
#@return [Consumer] of the response of created instance.
|
176
|
+
#@raise [APIException] an exception from the response status
|
177
|
+
return self.execute("06aecedd-dc58-454c-a7e8-659dac8aa16e", Consumer.new(mapObj))
|
178
|
+
end
|
179
179
|
|
180
180
|
|
181
181
|
|
@@ -184,15 +184,15 @@ module MasterCard
|
|
184
184
|
|
185
185
|
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
187
|
+
def update
|
188
|
+
#
|
189
|
+
#Updates an object of type Consumer
|
190
|
+
#
|
191
|
+
#@return [Consumer] object representing the response.
|
192
|
+
#@raise [APIException] an exception from the response status
|
193
|
+
#
|
194
|
+
return self.class.execute("5e00a506-e9f9-481e-b571-f32bd2a4dd29",self)
|
195
|
+
end
|
196
196
|
|
197
197
|
|
198
198
|
|
@@ -200,9 +200,9 @@ module MasterCard
|
|
200
200
|
|
201
201
|
|
202
202
|
|
203
|
-
|
204
|
-
|
205
|
-
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
206
|
end
|
207
207
|
|
208
208
|
|
@@ -30,46 +30,46 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module P2p
|
35
|
+
class ConsumerAccount < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
39
|
+
@__store = {
|
40
|
+
'f10ac160-61dc-4af3-92c5-ba6a6ff76ed1' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "create", [], []),
|
41
|
+
'6ec8fba5-6bd7-445f-9b5c-fe6daac76802' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "delete", [], []),
|
42
|
+
'd08edef7-bfda-4591-957a-b1bcb4dcd56b' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "read", [], []),
|
43
|
+
'5907bece-5dfd-48fd-b701-1daf1913b2a1' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "query", [], ["ref"]),
|
44
|
+
'ab467fb8-8111-405f-a2fc-6007ade9d545' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "update", [], []),
|
45
|
+
|
46
|
+
}
|
47
47
|
|
48
|
-
|
48
|
+
protected
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
def self.getOperationConfig(operationUUID)
|
51
|
+
if @__store.key?(operationUUID)
|
52
|
+
return @__store[operationUUID]
|
53
|
+
end
|
54
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
55
|
+
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
def self.getOperationMetadata()
|
58
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
59
|
+
end
|
60
60
|
|
61
|
-
|
61
|
+
public
|
62
62
|
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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("f10ac160-61dc-4af3-92c5-ba6a6ff76ed1", ConsumerAccount.new(mapObj))
|
72
|
+
end
|
73
73
|
|
74
74
|
|
75
75
|
|
@@ -80,42 +80,42 @@ module MasterCard
|
|
80
80
|
|
81
81
|
|
82
82
|
|
83
|
-
|
84
|
-
|
83
|
+
def self.deleteById(id, map = nil)
|
84
|
+
#Delete object of type ConsumerAccount by id
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
90
90
|
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
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
|
103
103
|
|
104
|
-
|
105
|
-
|
104
|
+
return self.execute("6ec8fba5-6bd7-445f-9b5c-fe6daac76802", mapObj)
|
105
|
+
end
|
106
106
|
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
108
|
+
def delete
|
109
|
+
#
|
110
|
+
#Delete object of type ConsumerAccount
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
#@param [String] id
|
113
|
+
#@return [ConsumerAccount] of the response of the deleted instance.
|
114
|
+
#@raise [APIException] an exception from the response status
|
115
|
+
#
|
116
116
|
|
117
|
-
|
118
|
-
|
117
|
+
return self.class.execute("6ec8fba5-6bd7-445f-9b5c-fe6daac76802", self)
|
118
|
+
end
|
119
119
|
|
120
120
|
|
121
121
|
|
@@ -124,28 +124,28 @@ module MasterCard
|
|
124
124
|
|
125
125
|
|
126
126
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
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
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
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
|
146
146
|
|
147
|
-
|
148
|
-
|
147
|
+
return self.execute("d08edef7-bfda-4591-957a-b1bcb4dcd56b",ConsumerAccount.new(mapObj))
|
148
|
+
end
|
149
149
|
|
150
150
|
|
151
151
|
|
@@ -154,28 +154,28 @@ module MasterCard
|
|
154
154
|
|
155
155
|
|
156
156
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
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
|
-
|
165
|
+
return self.execute("5907bece-5dfd-48fd-b701-1daf1913b2a1",ConsumerAccount.new(criteria))
|
166
|
+
end
|
167
167
|
|
168
168
|
|
169
169
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
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("ab467fb8-8111-405f-a2fc-6007ade9d545",self)
|
178
|
+
end
|
179
179
|
|
180
180
|
|
181
181
|
|
@@ -183,9 +183,9 @@ module MasterCard
|
|
183
183
|
|
184
184
|
|
185
185
|
|
186
|
-
|
187
|
-
|
188
|
-
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
189
|
end
|
190
190
|
|
191
191
|
|