mastercard_mdescustomerservice 1.0.0 → 1.0.2

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: 18a43b9c92eb8dd8fc49fdf9918ff35ebdd727fe
4
- data.tar.gz: be74e02fbf36425aa34a04b41fe616854a40ce1c
3
+ metadata.gz: 70684fe6be274917879453d4f1034ef9bfa50ed7
4
+ data.tar.gz: 5f068b32cf7d09d01ebe7443b323545e9afdd85f
5
5
  SHA512:
6
- metadata.gz: 6bb82fbcb5dd56f813add735e3d898c2025c831f54de05382fbfd9ffb7d371df94b2d0cdb2d0ccd8597530c885c575c223d44b20bc67917279246736c6b6a587
7
- data.tar.gz: f8b3fd918fe15f3729f81db98e7c7d4a78b3bb6b27f172e72be21f52508821676cdad0d9bd841005db222bbf12bd4f2159e51faf4baa552f9bae78fc8194dd79
6
+ metadata.gz: 12ff3417859e56fc62131a1b224a90ac784b2f2ddc8700768e4f897fc744836cf00e840f28331ef3b74bbda238e68678cd5936877de9c95791348f5bceb26acc
7
+ data.tar.gz: 10aa03ec517ff0a5c6d02cbe307a7dc108b2d37f476e7d5eec517e8c3a2a8eb4fe46577982877eae66dcc9e396e32c7e65070bfd8c57fef993b74c0816f66237
@@ -31,55 +31,30 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module MdesCustomerService
34
- include MasterCard::Core::Model
35
- class Search < BaseObject
34
+ class Search < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "CREATE"
45
- return "/mdes/csapi/v2/search"
46
- end
38
+ @__store = {
39
+ '4dbc7aac-4ffc-4b35-86d8-527619db9b1c' => OperationConfig.new("/mdes/csapi/v2/search", "create", [], []),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "CREATE"
58
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
59
48
  end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
62
50
  end
63
51
 
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "CREATE"
70
- return []
71
- end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
74
54
  end
75
55
 
76
- def self.getApiVersion
77
- return "1.0.0"
78
- end
56
+ public
79
57
 
80
-
81
-
82
-
83
58
  def self.create(mapObj)
84
59
  #
85
60
  #Creates object of type Search
@@ -87,16 +62,14 @@ module MasterCard
87
62
  #@param Dict mapObj, containing the required parameters to create a new object
88
63
  #@return Search of the response of created instance.
89
64
  #
90
- return self.createObject(Search.new(mapObj))
65
+ return self.execute("4dbc7aac-4ffc-4b35-86d8-527619db9b1c", Search.new(mapObj))
91
66
  end
92
67
 
93
-
94
-
95
-
96
-
97
-
98
-
99
-
68
+
69
+
70
+
71
+
72
+
100
73
  end
101
74
  end
102
75
  end
@@ -0,0 +1,50 @@
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
+ 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
50
+ end
@@ -31,60 +31,35 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module MdesCustomerService
34
- include MasterCard::Core::Model
35
- class SystemStatus < BaseObject
34
+ class SystemStatus < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "QUERY"
45
- return "/mdes/csapi/v2/systemstatus"
46
- end
38
+ @__store = {
39
+ '51cabc10-f6be-429a-89f8-1e0f22573e16' => OperationConfig.new("/mdes/csapi/v2/systemstatus", "query", [], []),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "QUERY"
58
- return []
59
- end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
62
- end
63
-
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "QUERY"
70
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
71
48
  end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
74
50
  end
75
51
 
76
- def self.getApiVersion
77
- return "1.0.0"
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
78
54
  end
79
55
 
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
56
+ public
57
+
58
+
59
+
60
+
61
+
62
+
88
63
  def self.query(criteria)
89
64
  #
90
65
  #Query objects of type SystemStatus by id and optional criteria
@@ -92,12 +67,9 @@ module MasterCard
92
67
  #@return SystemStatus object representing the response.
93
68
  #
94
69
 
95
- obj = SystemStatus.new(criteria)
96
- return self.queryObject(obj)
70
+ return self.execute("51cabc10-f6be-429a-89f8-1e0f22573e16",SystemStatus.new(criteria))
97
71
  end
98
72
 
99
-
100
-
101
73
  end
102
74
  end
103
75
  end
@@ -31,55 +31,30 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module MdesCustomerService
34
- include MasterCard::Core::Model
35
- class TokenActivate < BaseObject
34
+ class TokenActivate < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "CREATE"
45
- return "/mdes/csapi/v2/token/activate"
46
- end
38
+ @__store = {
39
+ '3d9bce09-47d0-4b2a-9b68-b35032eeacdb' => OperationConfig.new("/mdes/csapi/v2/token/activate", "create", [], []),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "CREATE"
58
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
59
48
  end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
62
50
  end
63
51
 
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "CREATE"
70
- return []
71
- end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
74
54
  end
75
55
 
76
- def self.getApiVersion
77
- return "1.0.0"
78
- end
56
+ public
79
57
 
80
-
81
-
82
-
83
58
  def self.create(mapObj)
84
59
  #
85
60
  #Creates object of type TokenActivate
@@ -87,16 +62,14 @@ module MasterCard
87
62
  #@param Dict mapObj, containing the required parameters to create a new object
88
63
  #@return TokenActivate of the response of created instance.
89
64
  #
90
- return self.createObject(TokenActivate.new(mapObj))
65
+ return self.execute("3d9bce09-47d0-4b2a-9b68-b35032eeacdb", TokenActivate.new(mapObj))
91
66
  end
92
67
 
93
-
94
-
95
-
96
-
97
-
98
-
99
-
68
+
69
+
70
+
71
+
72
+
100
73
  end
101
74
  end
102
75
  end
@@ -31,55 +31,30 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module MdesCustomerService
34
- include MasterCard::Core::Model
35
- class TokenActivationMethods < BaseObject
34
+ class TokenActivationMethods < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "CREATE"
45
- return "/mdes/csapi/v2/token/activationmethods"
46
- end
38
+ @__store = {
39
+ 'a5157c4b-051a-4acb-b512-1cccb773a288' => OperationConfig.new("/mdes/csapi/v2/token/activationmethods", "create", [], []),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "CREATE"
58
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
59
48
  end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
62
50
  end
63
51
 
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "CREATE"
70
- return []
71
- end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
74
54
  end
75
55
 
76
- def self.getApiVersion
77
- return "1.0.0"
78
- end
56
+ public
79
57
 
80
-
81
-
82
-
83
58
  def self.create(mapObj)
84
59
  #
85
60
  #Creates object of type TokenActivationMethods
@@ -87,16 +62,14 @@ module MasterCard
87
62
  #@param Dict mapObj, containing the required parameters to create a new object
88
63
  #@return TokenActivationMethods of the response of created instance.
89
64
  #
90
- return self.createObject(TokenActivationMethods.new(mapObj))
65
+ return self.execute("a5157c4b-051a-4acb-b512-1cccb773a288", TokenActivationMethods.new(mapObj))
91
66
  end
92
67
 
93
-
94
-
95
-
96
-
97
-
98
-
99
-
68
+
69
+
70
+
71
+
72
+
100
73
  end
101
74
  end
102
75
  end
@@ -31,55 +31,30 @@ require "mastercard/core/model"
31
31
  module MasterCard
32
32
  module API
33
33
  module MdesCustomerService
34
- include MasterCard::Core::Model
35
- class TokenComments < BaseObject
34
+ class TokenComments < MasterCard::Core::Model::BaseObject
35
+ include MasterCard::Core::Model
36
36
  #
37
37
 
38
- def getResourcePath(action)
39
- #Returns the resource path based on the action
40
- #@return str
41
-
42
- action = action.upcase
43
-
44
- if action == "CREATE"
45
- return "/mdes/csapi/v2/token/comments"
46
- end
38
+ @__store = {
39
+ 'f4c726e0-d4ed-4c33-bfbe-bab15c284820' => OperationConfig.new("/mdes/csapi/v2/token/comments", "create", [], []),
47
40
 
48
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
41
+ }
49
42
 
50
- end
43
+ protected
51
44
 
52
- def getHeaderParams(action)
53
- #Returns a list containing header params
54
- #@return list
55
- action = action.upcase
56
-
57
- if action == "CREATE"
58
- return []
45
+ def self.getOperationConfig(uuid)
46
+ if @__store.key?(uuid)
47
+ return @__store[uuid]
59
48
  end
60
-
61
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
49
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
62
50
  end
63
51
 
64
- def getQueryParams(action)
65
- #Returns a list containing query params
66
- #@return list
67
- action = action.upcase
68
-
69
- if action == "CREATE"
70
- return []
71
- end
72
-
73
- raise StandardError.new("Invalid action supplied: #{action.to_s}")
52
+ def self.getOperationMetadata()
53
+ return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
74
54
  end
75
55
 
76
- def self.getApiVersion
77
- return "1.0.0"
78
- end
56
+ public
79
57
 
80
-
81
-
82
-
83
58
  def self.create(mapObj)
84
59
  #
85
60
  #Creates object of type TokenComments
@@ -87,16 +62,14 @@ module MasterCard
87
62
  #@param Dict mapObj, containing the required parameters to create a new object
88
63
  #@return TokenComments of the response of created instance.
89
64
  #
90
- return self.createObject(TokenComments.new(mapObj))
65
+ return self.execute("f4c726e0-d4ed-4c33-bfbe-bab15c284820", TokenComments.new(mapObj))
91
66
  end
92
67
 
93
-
94
-
95
-
96
-
97
-
98
-
99
-
68
+
69
+
70
+
71
+
72
+
100
73
  end
101
74
  end
102
75
  end