mastercard_mastercom 0.0.3 → 2.0.0
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/mastercom/casefiling.rb +62 -62
- data/lib/mastercard/api/mastercom/chargebacks.rb +92 -92
- data/lib/mastercard/api/mastercom/claims.rb +63 -63
- data/lib/mastercard/api/mastercom/fees.rb +42 -42
- data/lib/mastercard/api/mastercom/fraud.rb +42 -42
- data/lib/mastercard/api/mastercom/healthcheck.rb +87 -0
- data/lib/mastercard/api/mastercom/queues.rb +50 -50
- data/lib/mastercard/api/mastercom/resourceconfig.rb +54 -54
- data/lib/mastercard/api/mastercom/retrievals.rb +82 -82
- data/lib/mastercard/api/mastercom/transactions.rb +74 -74
- data/lib/mastercard_mastercom.rb +1 -0
- metadata +5 -4
@@ -30,43 +30,43 @@ 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 Mastercom
|
35
|
+
class Fees < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
@__store = {
|
40
|
+
'c7c3a9e6-2219-4fc7-9da3-54a14e42466a' => OperationConfig.new("/mastercom/v2/claims/{claim-id}/fee", "create", [], []),
|
41
|
+
'be232cdd-5495-4436-9446-b1664dd55776' => OperationConfig.new("/mastercom/v2/claims/{claim-id}/fees/loaddataforfees", "query", [], []),
|
42
|
+
|
43
|
+
}
|
44
44
|
|
45
|
-
|
45
|
+
protected
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
def self.getOperationConfig(operationUUID)
|
48
|
+
if @__store.key?(operationUUID)
|
49
|
+
return @__store[operationUUID]
|
50
|
+
end
|
51
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def self.getOperationMetadata()
|
55
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
56
|
+
end
|
57
57
|
|
58
|
-
|
58
|
+
public
|
59
59
|
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
def self.create(mapObj)
|
62
|
+
#
|
63
|
+
#Creates object of type Fees
|
64
|
+
#
|
65
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
66
|
+
#@return [Fees] of the response of created instance.
|
67
|
+
#@raise [APIException] an exception from the response status
|
68
|
+
return self.execute("c7c3a9e6-2219-4fc7-9da3-54a14e42466a", Fees.new(mapObj))
|
69
|
+
end
|
70
70
|
|
71
71
|
|
72
72
|
|
@@ -79,21 +79,21 @@ module MasterCard
|
|
79
79
|
|
80
80
|
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
82
|
+
def self.getPossibleValueListsForCreate(criteria)
|
83
|
+
#
|
84
|
+
#Query objects of type Fees by id and optional criteria
|
85
|
+
#@param [Dict] criteria
|
86
|
+
#@return [Fees] object representing the response.
|
87
|
+
#@raise [APIException] an exception from the response status
|
88
|
+
#
|
89
89
|
|
90
|
-
|
91
|
-
|
90
|
+
return self.execute("be232cdd-5495-4436-9446-b1664dd55776",Fees.new(criteria))
|
91
|
+
end
|
92
92
|
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
97
|
end
|
98
98
|
|
99
99
|
|
@@ -30,43 +30,43 @@ 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 Mastercom
|
35
|
+
class Fraud < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
@__store = {
|
40
|
+
'9b1e5de9-68f9-4acc-bacf-10289a3b4125' => OperationConfig.new("/mastercom/v2/claims/{claim-id}/fraud/mastercard", "create", [], []),
|
41
|
+
'a104c8bd-b737-4502-8a75-c282d976a0a8' => OperationConfig.new("/mastercom/v2/claims/{claim-id}/fraud/loaddataforfraud", "query", [], []),
|
42
|
+
|
43
|
+
}
|
44
44
|
|
45
|
-
|
45
|
+
protected
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
def self.getOperationConfig(operationUUID)
|
48
|
+
if @__store.key?(operationUUID)
|
49
|
+
return @__store[operationUUID]
|
50
|
+
end
|
51
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def self.getOperationMetadata()
|
55
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
56
|
+
end
|
57
57
|
|
58
|
-
|
58
|
+
public
|
59
59
|
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
def self.createForMasterCard(mapObj)
|
62
|
+
#
|
63
|
+
#Creates object of type Fraud
|
64
|
+
#
|
65
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
66
|
+
#@return [Fraud] of the response of created instance.
|
67
|
+
#@raise [APIException] an exception from the response status
|
68
|
+
return self.execute("9b1e5de9-68f9-4acc-bacf-10289a3b4125", Fraud.new(mapObj))
|
69
|
+
end
|
70
70
|
|
71
71
|
|
72
72
|
|
@@ -79,21 +79,21 @@ module MasterCard
|
|
79
79
|
|
80
80
|
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
82
|
+
def self.getPossibleValueListsForCreate(criteria)
|
83
|
+
#
|
84
|
+
#Query objects of type Fraud by id and optional criteria
|
85
|
+
#@param [Dict] criteria
|
86
|
+
#@return [Fraud] object representing the response.
|
87
|
+
#@raise [APIException] an exception from the response status
|
88
|
+
#
|
89
89
|
|
90
|
-
|
91
|
-
|
90
|
+
return self.execute("a104c8bd-b737-4502-8a75-c282d976a0a8",Fraud.new(criteria))
|
91
|
+
end
|
92
92
|
|
93
93
|
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
97
|
end
|
98
98
|
|
99
99
|
|
@@ -0,0 +1,87 @@
|
|
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 Mastercom
|
35
|
+
class HealthCheck < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'874580a6-43b2-414d-946d-9f53814d3e44' => OperationConfig.new("/mastercom/v2/healthcheck", "query", [], []),
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
protected
|
45
|
+
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
|
+
|
57
|
+
public
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.healthCheck(criteria)
|
66
|
+
#
|
67
|
+
#Query objects of type HealthCheck by id and optional criteria
|
68
|
+
#@param [Dict] criteria
|
69
|
+
#@return [HealthCheck] object representing the response.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
#
|
72
|
+
|
73
|
+
return self.execute("874580a6-43b2-414d-946d-9f53814d3e44",HealthCheck.new(criteria))
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
@@ -30,77 +30,77 @@ 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 Mastercom
|
35
|
+
class Queues < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
@__store = {
|
40
|
+
'd076caab-d8a6-4d91-bb54-22c0ba5ba5c8' => OperationConfig.new("/mastercom/v2/queues", "list", [], ["queue-name"]),
|
41
|
+
'2608e271-9d6a-444c-8979-91b15f7626c8' => OperationConfig.new("/mastercom/v2/queues/names", "list", [], []),
|
42
|
+
|
43
|
+
}
|
44
44
|
|
45
|
-
|
45
|
+
protected
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
def self.getOperationConfig(operationUUID)
|
48
|
+
if @__store.key?(operationUUID)
|
49
|
+
return @__store[operationUUID]
|
50
|
+
end
|
51
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def self.getOperationMetadata()
|
55
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
56
|
+
end
|
57
57
|
|
58
|
-
|
58
|
+
public
|
59
59
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
63
|
+
def self.retrieveClaimsFromQueue(criteria = nil)
|
64
|
+
#
|
65
|
+
#List objects of type Queues
|
66
|
+
#
|
67
|
+
#@param [Dict] criteria
|
68
|
+
#@return Array [Queues] object matching the criteria.
|
69
|
+
#@raise [APIException] an exception from the response status
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
if criteria.nil?
|
72
|
+
return self.execute("d076caab-d8a6-4d91-bb54-22c0ba5ba5c8",Queues.new)
|
73
|
+
else
|
74
|
+
return self.execute("d076caab-d8a6-4d91-bb54-22c0ba5ba5c8",Queues.new(criteria))
|
75
|
+
end
|
76
|
+
end
|
77
77
|
|
78
78
|
|
79
79
|
|
80
80
|
|
81
81
|
|
82
82
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
83
|
+
def self.retrieveQueueNames(criteria = nil)
|
84
|
+
#
|
85
|
+
#List objects of type Queues
|
86
|
+
#
|
87
|
+
#@param [Dict] criteria
|
88
|
+
#@return Array [Queues] object matching the criteria.
|
89
|
+
#@raise [APIException] an exception from the response status
|
90
90
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
91
|
+
if criteria.nil?
|
92
|
+
return self.execute("2608e271-9d6a-444c-8979-91b15f7626c8",Queues.new)
|
93
|
+
else
|
94
|
+
return self.execute("2608e271-9d6a-444c-8979-91b15f7626c8",Queues.new(criteria))
|
95
|
+
end
|
96
|
+
end
|
97
97
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
-
|
102
|
-
|
103
|
-
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
104
|
end
|
105
105
|
|
106
106
|
|
@@ -29,76 +29,76 @@ require "mastercard/core/constants"
|
|
29
29
|
require "mastercard/core/config"
|
30
30
|
|
31
31
|
module MasterCard
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
module API
|
33
|
+
module Mastercom
|
34
|
+
class ResourceConfig
|
35
|
+
include MasterCard::Core
|
36
36
|
|
37
|
-
|
37
|
+
@@instance = nil
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
def initialize
|
40
|
+
@override = nil
|
41
|
+
@host = nil
|
42
|
+
@context = nil
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
Config.registerResourceConfig(self)
|
45
|
+
currentEnvironment = Config.getEnvironment()
|
46
|
+
self.setEnvironment(currentEnvironment)
|
47
47
|
|
48
|
-
|
48
|
+
end
|
49
49
|
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
def self.instance
|
52
|
+
return @@instance
|
53
|
+
end
|
54
54
|
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
def getName
|
57
|
+
return "mastercom"
|
58
|
+
end
|
59
59
|
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
def getHost
|
62
|
+
unless @override.nil? || @override == 0
|
63
|
+
return @override
|
64
|
+
else
|
65
|
+
return @host
|
66
|
+
end
|
67
|
+
end
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
def getContext
|
70
|
+
return @context
|
71
|
+
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
def getVersion
|
74
|
+
return "mastercom:2.0.0"
|
75
|
+
end
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
def getJsonNative
|
78
|
+
return true
|
79
|
+
end
|
80
80
|
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
def getContentTypeOverride
|
82
|
+
return nil
|
83
|
+
end
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
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
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
def setCustomEnvironment(host,context)
|
94
|
+
@host = host
|
95
|
+
@context = context
|
96
|
+
end
|
97
97
|
|
98
|
-
|
98
|
+
@@instance = ResourceConfig.new
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
private_class_method :new
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
104
|
end
|