mastercard_mappingservices 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 23236c48ae80b31e1d8a89f1652aefd6d1a35f00
|
4
|
+
data.tar.gz: 606cd0d5d22b8daa21fffde8c5c4959b81b6d423
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 741167d0d8847cc62e94fc2ed3b29fba8af04d2ad60ddffd2308eedbb32684568f5ee85270dd3ee351a70cd5d50aec410ee7239fb938eaacc20ce6d196854dd7
|
7
|
+
data.tar.gz: 2694dfdca0d09688fd6274c5e9db054ec7660966b3bc8be1463c36478c96755e8969a0e9e4a8bd551d9b31de2b986727c38cdd1393fa877ed02ca0fd584d12f1
|
@@ -0,0 +1,467 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
+
# All rights reserved.
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
+
# permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
+
# conditions and the following disclaimer.
|
10
|
+
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
+
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
+
# provided with the distribution.
|
13
|
+
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
+
# contributors may be used to endorse or promote products derived from this software
|
15
|
+
# without specific prior written permission.
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
+
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
+
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
+
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
+
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
+
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
+
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
+
# SUCH DAMAGE.
|
26
|
+
#
|
27
|
+
|
28
|
+
|
29
|
+
require "mastercard/core/model"
|
30
|
+
require "mastercard/core/baseobject"
|
31
|
+
|
32
|
+
module MasterCard
|
33
|
+
module API
|
34
|
+
module MappingServices
|
35
|
+
class Mapping < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'6ab75199-b605-4051-a378-881454c85bad' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data", "create", [], []),
|
41
|
+
'60da0153-7a7b-4740-af37-6f2c6cbb6010' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts", "create", [], []),
|
42
|
+
'cb3eb25a-78fc-4612-8052-8bbb368c46ce' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings", "create", [], []),
|
43
|
+
'2bdd086c-2346-4731-89ca-94efe9cd7dd7' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data/{additionalDataId}", "delete", [], []),
|
44
|
+
'9319bd90-706b-483c-8deb-4601c346000f' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}", "delete", [], []),
|
45
|
+
'8c94f9c5-0493-45f9-9b0c-87f5d48600b5' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}", "delete", [], []),
|
46
|
+
'899b45f7-5d1e-4cd1-a57d-8a9141890412' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts", "query", [], []),
|
47
|
+
'37f8c951-53fd-450f-9a84-95d19915cd79' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data", "query", [], []),
|
48
|
+
'1b95654b-f5fd-4f9d-a13a-b6eb40a17bec' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data/{additionalDataId}", "read", [], []),
|
49
|
+
'9fa07208-9a11-41df-98e5-c7fa82570ae9' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}", "read", [], []),
|
50
|
+
'8f778e3a-4226-45fa-bf22-8598875564fe' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}", "read", [], []),
|
51
|
+
'ea211a63-061d-47e5-afc7-838181721627' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings", "query", [], ["ref","customer_identifier"]),
|
52
|
+
'd8294a30-f333-4fa5-bbf4-212f7cb9495d' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/search", "create", [], []),
|
53
|
+
'2893bda0-0b05-4670-82de-716f698d612e' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}/additional-data/{additionalDataId}", "update", [], []),
|
54
|
+
'b8b291ba-bbf1-4e44-88aa-bf3e22aaf82e' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}", "update", [], []),
|
55
|
+
'7bb7b688-87a1-4f79-a12c-e90fa7396a0a' => OperationConfig.new("/send/v1/partners/{partnerId}/mappings/{mappingId}/accounts/{accountId}", "update", [], []),
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
protected
|
60
|
+
|
61
|
+
def self.getOperationConfig(operationUUID)
|
62
|
+
if @__store.key?(operationUUID)
|
63
|
+
return @__store[operationUUID]
|
64
|
+
end
|
65
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.getOperationMetadata()
|
69
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
70
|
+
end
|
71
|
+
|
72
|
+
public
|
73
|
+
|
74
|
+
|
75
|
+
def self.addAdditonalData(mapObj)
|
76
|
+
#
|
77
|
+
#Creates object of type Mapping
|
78
|
+
#
|
79
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
80
|
+
#@return [Mapping] of the response of created instance.
|
81
|
+
#@raise [APIException] an exception from the response status
|
82
|
+
return self.execute("6ab75199-b605-4051-a378-881454c85bad", Mapping.new(mapObj))
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
def self.addMappingAccount(mapObj)
|
92
|
+
#
|
93
|
+
#Creates object of type Mapping
|
94
|
+
#
|
95
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
96
|
+
#@return [Mapping] of the response of created instance.
|
97
|
+
#@raise [APIException] an exception from the response status
|
98
|
+
return self.execute("60da0153-7a7b-4740-af37-6f2c6cbb6010", Mapping.new(mapObj))
|
99
|
+
end
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
def self.createMapping(mapObj)
|
108
|
+
#
|
109
|
+
#Creates object of type Mapping
|
110
|
+
#
|
111
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
112
|
+
#@return [Mapping] of the response of created instance.
|
113
|
+
#@raise [APIException] an exception from the response status
|
114
|
+
return self.execute("cb3eb25a-78fc-4612-8052-8bbb368c46ce", Mapping.new(mapObj))
|
115
|
+
end
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
def self.deleteAdditionalDataById(id, map = nil)
|
127
|
+
#Delete object of type Mapping by id
|
128
|
+
|
129
|
+
#@param [String] id
|
130
|
+
#@param [Dict] map, containing additional parameters
|
131
|
+
#@return [Mapping] of the response of the deleted instance.
|
132
|
+
#@raise [APIException] an exception from the response status
|
133
|
+
|
134
|
+
|
135
|
+
mapObj = Mapping.new
|
136
|
+
if !(id.nil? || id.to_s.empty?)
|
137
|
+
mapObj.set("id", id)
|
138
|
+
end
|
139
|
+
if !map.nil?
|
140
|
+
if map.instance_of? RequestMap
|
141
|
+
mapObj.setAll(map.getObject())
|
142
|
+
else
|
143
|
+
mapObj.setAll(map)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
return self.execute("2bdd086c-2346-4731-89ca-94efe9cd7dd7", mapObj)
|
148
|
+
end
|
149
|
+
|
150
|
+
|
151
|
+
def deleteAdditionalData
|
152
|
+
#
|
153
|
+
#Delete object of type Mapping
|
154
|
+
|
155
|
+
#@param [String] id
|
156
|
+
#@return [Mapping] of the response of the deleted instance.
|
157
|
+
#@raise [APIException] an exception from the response status
|
158
|
+
#
|
159
|
+
|
160
|
+
return self.class.execute("2bdd086c-2346-4731-89ca-94efe9cd7dd7", self)
|
161
|
+
end
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
def self.deleteMappingById(id, map = nil)
|
170
|
+
#Delete object of type Mapping by id
|
171
|
+
|
172
|
+
#@param [String] id
|
173
|
+
#@param [Dict] map, containing additional parameters
|
174
|
+
#@return [Mapping] of the response of the deleted instance.
|
175
|
+
#@raise [APIException] an exception from the response status
|
176
|
+
|
177
|
+
|
178
|
+
mapObj = Mapping.new
|
179
|
+
if !(id.nil? || id.to_s.empty?)
|
180
|
+
mapObj.set("id", id)
|
181
|
+
end
|
182
|
+
if !map.nil?
|
183
|
+
if map.instance_of? RequestMap
|
184
|
+
mapObj.setAll(map.getObject())
|
185
|
+
else
|
186
|
+
mapObj.setAll(map)
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
return self.execute("9319bd90-706b-483c-8deb-4601c346000f", mapObj)
|
191
|
+
end
|
192
|
+
|
193
|
+
|
194
|
+
def deleteMapping
|
195
|
+
#
|
196
|
+
#Delete object of type Mapping
|
197
|
+
|
198
|
+
#@param [String] id
|
199
|
+
#@return [Mapping] of the response of the deleted instance.
|
200
|
+
#@raise [APIException] an exception from the response status
|
201
|
+
#
|
202
|
+
|
203
|
+
return self.class.execute("9319bd90-706b-483c-8deb-4601c346000f", self)
|
204
|
+
end
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
def self.deleteMappingAccountById(id, map = nil)
|
213
|
+
#Delete object of type Mapping by id
|
214
|
+
|
215
|
+
#@param [String] id
|
216
|
+
#@param [Dict] map, containing additional parameters
|
217
|
+
#@return [Mapping] of the response of the deleted instance.
|
218
|
+
#@raise [APIException] an exception from the response status
|
219
|
+
|
220
|
+
|
221
|
+
mapObj = Mapping.new
|
222
|
+
if !(id.nil? || id.to_s.empty?)
|
223
|
+
mapObj.set("id", id)
|
224
|
+
end
|
225
|
+
if !map.nil?
|
226
|
+
if map.instance_of? RequestMap
|
227
|
+
mapObj.setAll(map.getObject())
|
228
|
+
else
|
229
|
+
mapObj.setAll(map)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
return self.execute("8c94f9c5-0493-45f9-9b0c-87f5d48600b5", mapObj)
|
234
|
+
end
|
235
|
+
|
236
|
+
|
237
|
+
def deleteMappingAccount
|
238
|
+
#
|
239
|
+
#Delete object of type Mapping
|
240
|
+
|
241
|
+
#@param [String] id
|
242
|
+
#@return [Mapping] of the response of the deleted instance.
|
243
|
+
#@raise [APIException] an exception from the response status
|
244
|
+
#
|
245
|
+
|
246
|
+
return self.class.execute("8c94f9c5-0493-45f9-9b0c-87f5d48600b5", self)
|
247
|
+
end
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
def self.listAllAccounts(criteria)
|
258
|
+
#
|
259
|
+
#Query objects of type Mapping by id and optional criteria
|
260
|
+
#@param [Dict] criteria
|
261
|
+
#@return [Mapping] object representing the response.
|
262
|
+
#@raise [APIException] an exception from the response status
|
263
|
+
#
|
264
|
+
|
265
|
+
return self.execute("899b45f7-5d1e-4cd1-a57d-8a9141890412",Mapping.new(criteria))
|
266
|
+
end
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
def self.listAllAdditionalData(criteria)
|
275
|
+
#
|
276
|
+
#Query objects of type Mapping by id and optional criteria
|
277
|
+
#@param [Dict] criteria
|
278
|
+
#@return [Mapping] object representing the response.
|
279
|
+
#@raise [APIException] an exception from the response status
|
280
|
+
#
|
281
|
+
|
282
|
+
return self.execute("37f8c951-53fd-450f-9a84-95d19915cd79",Mapping.new(criteria))
|
283
|
+
end
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
def self.readByAdditionalDataId(id, criteria = nil)
|
291
|
+
#
|
292
|
+
#Returns objects of type Mapping by id and optional criteria
|
293
|
+
#@param [String] id
|
294
|
+
#@param [Dict] criteria
|
295
|
+
#@return [Mapping] object representing the response
|
296
|
+
#@raise [APIException] an exception from the response status
|
297
|
+
|
298
|
+
mapObj = Mapping.new
|
299
|
+
if !(id.nil? || id.to_s.empty?)
|
300
|
+
mapObj.set("id", id)
|
301
|
+
end
|
302
|
+
if !criteria.nil?
|
303
|
+
if criteria.instance_of? RequestMap
|
304
|
+
mapObj.setAll(criteria.getObject())
|
305
|
+
else
|
306
|
+
mapObj.setAll(criteria)
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
return self.execute("1b95654b-f5fd-4f9d-a13a-b6eb40a17bec",Mapping.new(mapObj))
|
311
|
+
end
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
def self.readByMappingAccountId(id, criteria = nil)
|
320
|
+
#
|
321
|
+
#Returns objects of type Mapping by id and optional criteria
|
322
|
+
#@param [String] id
|
323
|
+
#@param [Dict] criteria
|
324
|
+
#@return [Mapping] object representing the response
|
325
|
+
#@raise [APIException] an exception from the response status
|
326
|
+
|
327
|
+
mapObj = Mapping.new
|
328
|
+
if !(id.nil? || id.to_s.empty?)
|
329
|
+
mapObj.set("id", id)
|
330
|
+
end
|
331
|
+
if !criteria.nil?
|
332
|
+
if criteria.instance_of? RequestMap
|
333
|
+
mapObj.setAll(criteria.getObject())
|
334
|
+
else
|
335
|
+
mapObj.setAll(criteria)
|
336
|
+
end
|
337
|
+
end
|
338
|
+
|
339
|
+
return self.execute("9fa07208-9a11-41df-98e5-c7fa82570ae9",Mapping.new(mapObj))
|
340
|
+
end
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
def self.readByMappingId(id, criteria = nil)
|
349
|
+
#
|
350
|
+
#Returns objects of type Mapping by id and optional criteria
|
351
|
+
#@param [String] id
|
352
|
+
#@param [Dict] criteria
|
353
|
+
#@return [Mapping] object representing the response
|
354
|
+
#@raise [APIException] an exception from the response status
|
355
|
+
|
356
|
+
mapObj = Mapping.new
|
357
|
+
if !(id.nil? || id.to_s.empty?)
|
358
|
+
mapObj.set("id", id)
|
359
|
+
end
|
360
|
+
if !criteria.nil?
|
361
|
+
if criteria.instance_of? RequestMap
|
362
|
+
mapObj.setAll(criteria.getObject())
|
363
|
+
else
|
364
|
+
mapObj.setAll(criteria)
|
365
|
+
end
|
366
|
+
end
|
367
|
+
|
368
|
+
return self.execute("8f778e3a-4226-45fa-bf22-8598875564fe",Mapping.new(mapObj))
|
369
|
+
end
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
def self.listByReferenceOrCustomerIdentifier(criteria)
|
379
|
+
#
|
380
|
+
#Query objects of type Mapping by id and optional criteria
|
381
|
+
#@param [Dict] criteria
|
382
|
+
#@return [Mapping] object representing the response.
|
383
|
+
#@raise [APIException] an exception from the response status
|
384
|
+
#
|
385
|
+
|
386
|
+
return self.execute("ea211a63-061d-47e5-afc7-838181721627",Mapping.new(criteria))
|
387
|
+
end
|
388
|
+
|
389
|
+
|
390
|
+
def self.searchMapping(mapObj)
|
391
|
+
#
|
392
|
+
#Creates object of type Mapping
|
393
|
+
#
|
394
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
395
|
+
#@return [Mapping] of the response of created instance.
|
396
|
+
#@raise [APIException] an exception from the response status
|
397
|
+
return self.execute("d8294a30-f333-4fa5-bbf4-212f7cb9495d", Mapping.new(mapObj))
|
398
|
+
end
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
def updateAdditonalData
|
408
|
+
#
|
409
|
+
#Updates an object of type Mapping
|
410
|
+
#
|
411
|
+
#@return [Mapping] object representing the response.
|
412
|
+
#@raise [APIException] an exception from the response status
|
413
|
+
#
|
414
|
+
return self.class.execute("2893bda0-0b05-4670-82de-716f698d612e",self)
|
415
|
+
end
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
def updateMapping
|
425
|
+
#
|
426
|
+
#Updates an object of type Mapping
|
427
|
+
#
|
428
|
+
#@return [Mapping] object representing the response.
|
429
|
+
#@raise [APIException] an exception from the response status
|
430
|
+
#
|
431
|
+
return self.class.execute("b8b291ba-bbf1-4e44-88aa-bf3e22aaf82e",self)
|
432
|
+
end
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
def updateMappingAccount
|
442
|
+
#
|
443
|
+
#Updates an object of type Mapping
|
444
|
+
#
|
445
|
+
#@return [Mapping] object representing the response.
|
446
|
+
#@raise [APIException] an exception from the response status
|
447
|
+
#
|
448
|
+
return self.class.execute("7bb7b688-87a1-4f79-a12c-e90fa7396a0a",self)
|
449
|
+
end
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
end
|
458
|
+
end
|
459
|
+
end
|
460
|
+
end
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
|
465
|
+
|
466
|
+
|
467
|
+
|
@@ -0,0 +1,104 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
+
# All rights reserved.
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
+
# permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
+
# conditions and the following disclaimer.
|
10
|
+
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
+
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
+
# provided with the distribution.
|
13
|
+
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
+
# contributors may be used to endorse or promote products derived from this software
|
15
|
+
# without specific prior written permission.
|
16
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
+
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
+
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
+
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
+
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
+
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
+
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
+
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
+
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
+
# SUCH DAMAGE.
|
26
|
+
#
|
27
|
+
|
28
|
+
require "mastercard/core/constants"
|
29
|
+
require "mastercard/core/config"
|
30
|
+
|
31
|
+
module MasterCard
|
32
|
+
module API
|
33
|
+
module MappingServices
|
34
|
+
class ResourceConfig
|
35
|
+
include MasterCard::Core
|
36
|
+
|
37
|
+
@@instance = nil
|
38
|
+
|
39
|
+
def initialize
|
40
|
+
@override = nil
|
41
|
+
@host = nil
|
42
|
+
@context = nil
|
43
|
+
|
44
|
+
Config.registerResourceConfig(self)
|
45
|
+
currentEnvironment = Config.getEnvironment()
|
46
|
+
self.setEnvironment(currentEnvironment)
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
def self.instance
|
52
|
+
return @@instance
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
def getName
|
57
|
+
return "mapping-services"
|
58
|
+
end
|
59
|
+
|
60
|
+
|
61
|
+
def getHost
|
62
|
+
unless @override.nil? || @override == 0
|
63
|
+
return @override
|
64
|
+
else
|
65
|
+
return @host
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def getContext
|
70
|
+
return @context
|
71
|
+
end
|
72
|
+
|
73
|
+
def getVersion
|
74
|
+
return "mapping-services:1.0.0"
|
75
|
+
end
|
76
|
+
|
77
|
+
def getJsonNative
|
78
|
+
return false
|
79
|
+
end
|
80
|
+
|
81
|
+
def getContentTypeOverride
|
82
|
+
return nil
|
83
|
+
end
|
84
|
+
|
85
|
+
def setEnvironment(environmet)
|
86
|
+
if Environment::MAPPING.key?(environmet)
|
87
|
+
tuple = Environment::MAPPING[environmet]
|
88
|
+
@host = tuple[0]
|
89
|
+
@context = tuple[1]
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def setCustomEnvironment(host,context)
|
94
|
+
@host = host
|
95
|
+
@context = context
|
96
|
+
end
|
97
|
+
|
98
|
+
@@instance = ResourceConfig.new
|
99
|
+
|
100
|
+
private_class_method :new
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: mastercard_mappingservices
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- MasterCard Worldwide
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-05-25 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: mastercard_api_core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.4.0
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.4.0
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.4.0
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.4.0
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: ci_reporter_minitest
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :development
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
description: MasterCard MappingServices Description
|
48
|
+
email:
|
49
|
+
- APISupport@mastercard.com
|
50
|
+
executables: []
|
51
|
+
extensions: []
|
52
|
+
extra_rdoc_files: []
|
53
|
+
files:
|
54
|
+
- lib/mastercard/api/mappingservices/mapping.rb
|
55
|
+
- lib/mastercard/api/mappingservices/resourceconfig.rb
|
56
|
+
- lib/mastercard_mappingservices.rb
|
57
|
+
homepage: https://developer.mastercard.com
|
58
|
+
licenses:
|
59
|
+
- BSD-2-Clause
|
60
|
+
metadata: {}
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options: []
|
63
|
+
require_paths:
|
64
|
+
- lib
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 2.5.1
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: MasterCard MappingServices SDK
|
81
|
+
test_files: []
|