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.
@@ -30,43 +30,43 @@ require "mastercard/core/model"
30
30
  require "mastercard/core/baseobject"
31
31
 
32
32
  module MasterCard
33
- module API
34
- module Mastercom
35
- class Fees < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Mastercom
35
+ class Fees < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- 'c6abe001-1c1f-4bee-b2f9-bc05f3658e75' => OperationConfig.new("/mastercom/v1/claims/{claim-id}/fee", "create", [], []),
41
- 'd806d409-b407-4b1f-ab75-19d6085d7392' => OperationConfig.new("/mastercom/v1/claims/{claim-id}/fees/loaddataforfees", "query", [], []),
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
- protected
45
+ protected
46
46
 
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
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
- def self.getOperationMetadata()
55
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
56
- end
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
- public
58
+ public
59
59
 
60
60
 
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("c6abe001-1c1f-4bee-b2f9-bc05f3658e75", Fees.new(mapObj))
69
- end
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
- 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
- #
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
- return self.execute("d806d409-b407-4b1f-ab75-19d6085d7392",Fees.new(criteria))
91
- end
90
+ return self.execute("be232cdd-5495-4436-9446-b1664dd55776",Fees.new(criteria))
91
+ end
92
92
 
93
93
 
94
- end
95
- end
96
- end
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
- module API
34
- module Mastercom
35
- class Fraud < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Mastercom
35
+ class Fraud < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- '0f0b1076-85bf-4c4e-aa5e-c5c724da3d68' => OperationConfig.new("/mastercom/v1/claims/{claim-id}/fraud/mastercard", "create", [], []),
41
- '0f6a9c65-ad22-49e4-9764-fab084b6051b' => OperationConfig.new("/mastercom/v1/claims/{claim-id}/fraud/loaddataforfraud", "query", [], []),
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
- protected
45
+ protected
46
46
 
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
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
- def self.getOperationMetadata()
55
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
56
- end
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
- public
58
+ public
59
59
 
60
60
 
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("0f0b1076-85bf-4c4e-aa5e-c5c724da3d68", Fraud.new(mapObj))
69
- end
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
- 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
- #
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
- return self.execute("0f6a9c65-ad22-49e4-9764-fab084b6051b",Fraud.new(criteria))
91
- end
90
+ return self.execute("a104c8bd-b737-4502-8a75-c282d976a0a8",Fraud.new(criteria))
91
+ end
92
92
 
93
93
 
94
- end
95
- end
96
- end
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
- module API
34
- module Mastercom
35
- class Queues < MasterCard::Core::Model::BaseObject
36
- include MasterCard::Core::Model
37
- #
33
+ module API
34
+ module Mastercom
35
+ class Queues < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
38
 
39
- @__store = {
40
- '151ce243-3ef0-4e51-a921-2a687586781a' => OperationConfig.new("/mastercom/v1/queues", "list", [], ["queue-name"]),
41
- '7f4f9432-35cf-46d8-a923-a711b784128c' => OperationConfig.new("/mastercom/v1/queues/names", "list", [], []),
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
- protected
45
+ protected
46
46
 
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
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
- def self.getOperationMetadata()
55
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
56
- end
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
- public
58
+ public
59
59
 
60
60
 
61
61
 
62
62
 
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
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
- if criteria.nil?
72
- return self.execute("151ce243-3ef0-4e51-a921-2a687586781a",Queues.new)
73
- else
74
- return self.execute("151ce243-3ef0-4e51-a921-2a687586781a",Queues.new(criteria))
75
- end
76
- end
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
- 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
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
- if criteria.nil?
92
- return self.execute("7f4f9432-35cf-46d8-a923-a711b784128c",Queues.new)
93
- else
94
- return self.execute("7f4f9432-35cf-46d8-a923-a711b784128c",Queues.new(criteria))
95
- end
96
- end
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
- end
102
- end
103
- end
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
- module API
33
- module Mastercom
34
- class ResourceConfig
35
- include MasterCard::Core
32
+ module API
33
+ module Mastercom
34
+ class ResourceConfig
35
+ include MasterCard::Core
36
36
 
37
- @@instance = nil
37
+ @@instance = nil
38
38
 
39
- def initialize
40
- @override = nil
41
- @host = nil
42
- @context = nil
39
+ def initialize
40
+ @override = nil
41
+ @host = nil
42
+ @context = nil
43
43
 
44
- Config.registerResourceConfig(self)
45
- currentEnvironment = Config.getEnvironment()
46
- self.setEnvironment(currentEnvironment)
44
+ Config.registerResourceConfig(self)
45
+ currentEnvironment = Config.getEnvironment()
46
+ self.setEnvironment(currentEnvironment)
47
47
 
48
- end
48
+ end
49
49
 
50
50
 
51
- def self.instance
52
- return @@instance
53
- end
51
+ def self.instance
52
+ return @@instance
53
+ end
54
54
 
55
55
 
56
- def getName
57
- return "mastercom"
58
- end
56
+ def getName
57
+ return "mastercom"
58
+ end
59
59
 
60
60
 
61
- def getHost
62
- unless @override.nil? || @override == 0
63
- return @override
64
- else
65
- return @host
66
- end
67
- end
61
+ def getHost
62
+ unless @override.nil? || @override == 0
63
+ return @override
64
+ else
65
+ return @host
66
+ end
67
+ end
68
68
 
69
- def getContext
70
- return @context
71
- end
69
+ def getContext
70
+ return @context
71
+ end
72
72
 
73
- def getVersion
74
- return "mastercom:0.0.3"
75
- end
73
+ def getVersion
74
+ return "mastercom:2.0.0"
75
+ end
76
76
 
77
- def getJsonNative
78
- return true
79
- end
77
+ def getJsonNative
78
+ return true
79
+ end
80
80
 
81
- def getContentTypeOverride
82
- return nil
83
- end
81
+ def getContentTypeOverride
82
+ return nil
83
+ end
84
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
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
- def setCustomEnvironment(host,context)
94
- @host = host
95
- @context = context
96
- end
93
+ def setCustomEnvironment(host,context)
94
+ @host = host
95
+ @context = context
96
+ end
97
97
 
98
- @@instance = ResourceConfig.new
98
+ @@instance = ResourceConfig.new
99
99
 
100
- private_class_method :new
101
- end
102
- end
103
- end
100
+ private_class_method :new
101
+ end
102
+ end
103
+ end
104
104
  end