mastercard_mdescustomerservice 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 70684fe6be274917879453d4f1034ef9bfa50ed7
4
- data.tar.gz: 5f068b32cf7d09d01ebe7443b323545e9afdd85f
3
+ metadata.gz: 5fa7a6fda978ad22beee229017e3a50aa3a7ab91
4
+ data.tar.gz: ea367fb197e200f2ed05f03b4f4c57b8b4cc49be
5
5
  SHA512:
6
- metadata.gz: 12ff3417859e56fc62131a1b224a90ac784b2f2ddc8700768e4f897fc744836cf00e840f28331ef3b74bbda238e68678cd5936877de9c95791348f5bceb26acc
7
- data.tar.gz: 10aa03ec517ff0a5c6d02cbe307a7dc108b2d37f476e7d5eec517e8c3a2a8eb4fe46577982877eae66dcc9e396e32c7e65070bfd8c57fef993b74c0816f66237
6
+ metadata.gz: e85d078f2f52866cc7ea61c7b86e0f002bf5ce34bd29a05d870d4ba1fa96cb26fb215876fab2f0466eb9a665e4f78de62f34513acb54c5516fa61cf07cd86099
7
+ data.tar.gz: d16869d5e160823b9e6ce211855a36f0d12287527165425aea6edc01e2463a70123ae8e02c82b1ac782fb431ea9dc77f7e10a5e0f4e94b14f95afae1c5986075
@@ -24,27 +24,75 @@
24
24
  # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25
25
  # SUCH DAMAGE.
26
26
  #
27
+
28
+ require "mastercard/core/constants"
29
+ require "mastercard/core/config"
30
+
27
31
  module MasterCard
28
- module API
29
- module MdesCustomerService
30
- class SDKConfig
31
-
32
- private
33
- @@host = nil
34
-
35
- public
36
- def self.setHost(host)
37
- @@host = host
38
- end
39
-
40
- def self.getHost()
41
- return @@host
42
- end
43
-
44
- def self.getVersion()
45
- return "1.0.2"
46
- end
47
- end
48
- end
49
- end
32
+ module API
33
+ module MdesCustomerService
34
+ class ResourceConfig
35
+ include MasterCard::Core
36
+
37
+ @@instance = nil
38
+
39
+ def initialize
40
+ @name = "mdes-customer-service"
41
+ @override = nil
42
+ @host = nil
43
+ @context = nil
44
+ @version = "1.0.3"
45
+
46
+ Config.registerResourceConfig(self)
47
+ currentEnvironment = Config.getEnvironment()
48
+ self.setEnvironment(currentEnvironment)
49
+
50
+ end
51
+
52
+
53
+ def self.instance
54
+ return @@instance
55
+ end
56
+
57
+
58
+ def getName
59
+ return @name
60
+ end
61
+
62
+
63
+ def getHost
64
+ unless @override.nil? || @override == 0
65
+ return @override
66
+ else
67
+ return @host
68
+ end
69
+ end
70
+
71
+ def getContext
72
+ return @context
73
+ end
74
+
75
+ def getVersion
76
+ return @version
77
+ end
78
+
79
+ def setEnvironment(environmet)
80
+ if Environment::MAPPING.key?(environmet)
81
+ tuple = Environment::MAPPING[environmet]
82
+ @host = tuple[0]
83
+ @context = tuple[1]
84
+ end
85
+ end
86
+
87
+ def setCustomEnvironment(host,context)
88
+ @host = host
89
+ @context = context
90
+ end
91
+
92
+ @@instance = ResourceConfig.new
93
+
94
+ private_class_method :new
95
+ end
96
+ end
97
+ end
50
98
  end
@@ -27,52 +27,55 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module MdesCustomerService
34
- class Search < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module MdesCustomerService
35
+ class Search < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '4dbc7aac-4ffc-4b35-86d8-527619db9b1c' => OperationConfig.new("/mdes/csapi/v2/search", "create", [], []),
40
-
41
- }
39
+ @__store = {
40
+ '08629a53-bb39-4f2e-9b0c-b3d8a80bf150' => OperationConfig.new("/mdes/csapi/v2/search", "create", [], []),
41
+
42
+ }
42
43
 
43
- protected
44
+ protected
44
45
 
45
- def self.getOperationConfig(uuid)
46
- if @__store.key?(uuid)
47
- return @__store[uuid]
48
- end
49
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
50
- end
46
+ def self.getOperationConfig(uuid)
47
+ if @__store.key?(uuid)
48
+ return @__store[uuid]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
51
+ end
51
52
 
52
- def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
54
- end
53
+ def self.getOperationMetadata()
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
55
+ end
55
56
 
56
- public
57
+ public
57
58
 
58
- def self.create(mapObj)
59
- #
60
- #Creates object of type Search
61
- #
62
- #@param Dict mapObj, containing the required parameters to create a new object
63
- #@return Search of the response of created instance.
64
- #
65
- return self.execute("4dbc7aac-4ffc-4b35-86d8-527619db9b1c", Search.new(mapObj))
66
- end
67
59
 
60
+ def self.create(mapObj)
61
+ #
62
+ #Creates object of type Search
63
+ #
64
+ #@param Dict mapObj, containing the required parameters to create a new object
65
+ #@return [Search] of the response of created instance.
66
+ #@raise [APIException] an exception from the response status
67
+ return self.execute("08629a53-bb39-4f2e-9b0c-b3d8a80bf150", Search.new(mapObj))
68
+ end
68
69
 
69
70
 
70
71
 
71
72
 
72
73
 
73
- end
74
- end
75
- end
74
+
75
+
76
+ end
77
+ end
78
+ end
76
79
  end
77
80
 
78
81
 
@@ -27,52 +27,56 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module MdesCustomerService
34
- class SystemStatus < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module MdesCustomerService
35
+ class SystemStatus < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '51cabc10-f6be-429a-89f8-1e0f22573e16' => OperationConfig.new("/mdes/csapi/v2/systemstatus", "query", [], []),
40
-
41
- }
39
+ @__store = {
40
+ '75c31276-6e16-40a0-b673-6738ed635430' => OperationConfig.new("/mdes/csapi/v2/systemstatus", "query", [], []),
41
+
42
+ }
42
43
 
43
- protected
44
+ protected
44
45
 
45
- def self.getOperationConfig(uuid)
46
- if @__store.key?(uuid)
47
- return @__store[uuid]
48
- end
49
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
50
- end
46
+ def self.getOperationConfig(uuid)
47
+ if @__store.key?(uuid)
48
+ return @__store[uuid]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
51
+ end
51
52
 
52
- def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
54
- end
53
+ def self.getOperationMetadata()
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
55
+ end
55
56
 
56
- public
57
+ public
57
58
 
58
59
 
59
60
 
60
61
 
61
62
 
62
63
 
63
- def self.query(criteria)
64
- #
65
- #Query objects of type SystemStatus by id and optional criteria
66
- #@param type criteria
67
- #@return SystemStatus object representing the response.
68
- #
69
64
 
70
- return self.execute("51cabc10-f6be-429a-89f8-1e0f22573e16",SystemStatus.new(criteria))
71
- end
65
+ def self.query(criteria)
66
+ #
67
+ #Query objects of type SystemStatus by id and optional criteria
68
+ #@param [Dict] criteria
69
+ #@return [SystemStatus] object representing the response.
70
+ #@raise [APIException] an exception from the response status
71
+ #
72
72
 
73
- end
74
- end
75
- end
73
+ return self.execute("75c31276-6e16-40a0-b673-6738ed635430",SystemStatus.new(criteria))
74
+ end
75
+
76
+
77
+ end
78
+ end
79
+ end
76
80
  end
77
81
 
78
82
 
@@ -27,52 +27,55 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module MdesCustomerService
34
- class TokenActivate < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module MdesCustomerService
35
+ class TokenActivate < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '3d9bce09-47d0-4b2a-9b68-b35032eeacdb' => OperationConfig.new("/mdes/csapi/v2/token/activate", "create", [], []),
40
-
41
- }
39
+ @__store = {
40
+ '63a104ca-529a-4df3-aa45-0a0fc81df789' => OperationConfig.new("/mdes/csapi/v2/token/activate", "create", [], []),
41
+
42
+ }
42
43
 
43
- protected
44
+ protected
44
45
 
45
- def self.getOperationConfig(uuid)
46
- if @__store.key?(uuid)
47
- return @__store[uuid]
48
- end
49
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
50
- end
46
+ def self.getOperationConfig(uuid)
47
+ if @__store.key?(uuid)
48
+ return @__store[uuid]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
51
+ end
51
52
 
52
- def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
54
- end
53
+ def self.getOperationMetadata()
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
55
+ end
55
56
 
56
- public
57
+ public
57
58
 
58
- def self.create(mapObj)
59
- #
60
- #Creates object of type TokenActivate
61
- #
62
- #@param Dict mapObj, containing the required parameters to create a new object
63
- #@return TokenActivate of the response of created instance.
64
- #
65
- return self.execute("3d9bce09-47d0-4b2a-9b68-b35032eeacdb", TokenActivate.new(mapObj))
66
- end
67
59
 
60
+ def self.create(mapObj)
61
+ #
62
+ #Creates object of type TokenActivate
63
+ #
64
+ #@param Dict mapObj, containing the required parameters to create a new object
65
+ #@return [TokenActivate] of the response of created instance.
66
+ #@raise [APIException] an exception from the response status
67
+ return self.execute("63a104ca-529a-4df3-aa45-0a0fc81df789", TokenActivate.new(mapObj))
68
+ end
68
69
 
69
70
 
70
71
 
71
72
 
72
73
 
73
- end
74
- end
75
- end
74
+
75
+
76
+ end
77
+ end
78
+ end
76
79
  end
77
80
 
78
81
 
@@ -27,52 +27,55 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module MdesCustomerService
34
- class TokenActivationMethods < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module MdesCustomerService
35
+ class TokenActivationMethods < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- 'a5157c4b-051a-4acb-b512-1cccb773a288' => OperationConfig.new("/mdes/csapi/v2/token/activationmethods", "create", [], []),
40
-
41
- }
39
+ @__store = {
40
+ 'c4531f01-cb19-4673-b4d0-990ccd48df07' => OperationConfig.new("/mdes/csapi/v2/token/activationmethods", "create", [], []),
41
+
42
+ }
42
43
 
43
- protected
44
+ protected
44
45
 
45
- def self.getOperationConfig(uuid)
46
- if @__store.key?(uuid)
47
- return @__store[uuid]
48
- end
49
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
50
- end
46
+ def self.getOperationConfig(uuid)
47
+ if @__store.key?(uuid)
48
+ return @__store[uuid]
49
+ end
50
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
51
+ end
51
52
 
52
- def self.getOperationMetadata()
53
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
54
- end
53
+ def self.getOperationMetadata()
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
55
+ end
55
56
 
56
- public
57
+ public
57
58
 
58
- def self.create(mapObj)
59
- #
60
- #Creates object of type TokenActivationMethods
61
- #
62
- #@param Dict mapObj, containing the required parameters to create a new object
63
- #@return TokenActivationMethods of the response of created instance.
64
- #
65
- return self.execute("a5157c4b-051a-4acb-b512-1cccb773a288", TokenActivationMethods.new(mapObj))
66
- end
67
59
 
60
+ def self.create(mapObj)
61
+ #
62
+ #Creates object of type TokenActivationMethods
63
+ #
64
+ #@param Dict mapObj, containing the required parameters to create a new object
65
+ #@return [TokenActivationMethods] of the response of created instance.
66
+ #@raise [APIException] an exception from the response status
67
+ return self.execute("c4531f01-cb19-4673-b4d0-990ccd48df07", TokenActivationMethods.new(mapObj))
68
+ end
68
69
 
69
70
 
70
71
 
71
72
 
72
73
 
73
- end
74
- end
75
- end
74
+
75
+
76
+ end
77
+ end
78
+ end
76
79
  end
77
80
 
78
81