mastercard_spendalerts 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,109 +27,117 @@
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 Spendalerts
34
- class Carddisable < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module Spendalerts
35
+ class Carddisable < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- 'bee30387-3b75-4213-9763-fd23a0808220' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/carddisable", "query", [], []),
40
- 'd1760213-b036-4815-a2cc-3966c21d11d6' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/carddisable", "create", [], []),
41
- '342a8aa9-ee72-4a96-88a1-b721a2636321' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/carddisable", "delete", [], []),
42
-
43
- }
39
+ @__store = {
40
+ 'fc0ae0de-00b2-4d3b-af96-77d30ab4419b' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/carddisable", "delete", [], []),
41
+ 'a8b6c9c2-8b9e-459a-bf7a-8cda8ad857f9' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/carddisable", "query", [], []),
42
+ 'd6b9f891-31e9-4851-8f8d-c9ee9fc1b202' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/carddisable", "create", [], []),
43
+
44
+ }
44
45
 
45
- protected
46
+ protected
46
47
 
47
- def self.getOperationConfig(uuid)
48
- if @__store.key?(uuid)
49
- return @__store[uuid]
50
- end
51
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
- end
48
+ def self.getOperationConfig(uuid)
49
+ if @__store.key?(uuid)
50
+ return @__store[uuid]
51
+ end
52
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
53
+ end
53
54
 
54
- def self.getOperationMetadata()
55
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
56
- end
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
57
+ end
57
58
 
58
- public
59
+ public
59
60
 
60
61
 
61
62
 
62
63
 
63
64
 
65
+ def self.deleteById(id, map = nil)
66
+ #Delete object of type Carddisable by id
64
67
 
65
- def self.query(criteria)
66
- #
67
- #Query objects of type Carddisable by id and optional criteria
68
- #@param type criteria
69
- #@return Carddisable object representing the response.
70
- #
68
+ #@param [String] id
69
+ #@param [Dict] map, containing additional parameters
70
+ #@return [Carddisable] of the response of the deleted instance.
71
+ #@raise [APIException] an exception from the response status
71
72
 
72
- return self.execute("bee30387-3b75-4213-9763-fd23a0808220",Carddisable.new(criteria))
73
- end
74
73
 
75
- def self.create(mapObj)
76
- #
77
- #Creates object of type Carddisable
78
- #
79
- #@param Dict mapObj, containing the required parameters to create a new object
80
- #@return Carddisable of the response of created instance.
81
- #
82
- return self.execute("d1760213-b036-4815-a2cc-3966c21d11d6", Carddisable.new(mapObj))
83
- end
74
+ mapObj = Carddisable.new
75
+ if !(id.nil? || id.to_s.empty?)
76
+ mapObj.set("id", id)
77
+ end
78
+ if !map.nil?
79
+ if map.instance_of? RequestMap
80
+ mapObj.setAll(map.getObject())
81
+ else
82
+ mapObj.setAll(map)
83
+ end
84
+ end
84
85
 
86
+ return self.execute("fc0ae0de-00b2-4d3b-af96-77d30ab4419b", mapObj)
87
+ end
85
88
 
86
89
 
90
+ def delete
91
+ #
92
+ #Delete object of type Carddisable
87
93
 
94
+ #@param [String] id
95
+ #@return [Carddisable] of the response of the deleted instance.
96
+ #@raise [APIException] an exception from the response status
97
+ #
88
98
 
99
+ return self.class.execute("fc0ae0de-00b2-4d3b-af96-77d30ab4419b", self)
100
+ end
89
101
 
90
102
 
91
103
 
92
104
 
93
- def self.deleteById(id, map = nil)
94
- #Delete object of type Carddisable by id
95
105
 
96
- #@param str id
97
- #@param Dict map, containing additional parameters
98
- #@return Carddisable of the response of the deleted instance.
99
106
 
100
107
 
101
- mapObj = Carddisable.new
102
- if !(id.nil? || id.to_s.empty?)
103
- mapObj.set("id", id)
104
- end
105
- if !map.nil?
106
- if map.instance_of? RequestMap
107
- mapObj.setAll(map.getObject())
108
- else
109
- mapObj.setAll(map)
110
- end
111
- end
112
108
 
113
- return self.execute("342a8aa9-ee72-4a96-88a1-b721a2636321", mapObj)
114
- end
115
109
 
110
+ def self.query(criteria)
111
+ #
112
+ #Query objects of type Carddisable by id and optional criteria
113
+ #@param [Dict] criteria
114
+ #@return [Carddisable] object representing the response.
115
+ #@raise [APIException] an exception from the response status
116
+ #
116
117
 
117
- def delete
118
- #
119
- #Delete object of type Carddisable
118
+ return self.execute("a8b6c9c2-8b9e-459a-bf7a-8cda8ad857f9",Carddisable.new(criteria))
119
+ end
120
120
 
121
- #@param str id
122
- #@return Carddisable of the response of the deleted instance.
123
- #
124
121
 
125
- return self.class.execute("342a8aa9-ee72-4a96-88a1-b721a2636321", self)
126
- end
122
+ def self.create(mapObj)
123
+ #
124
+ #Creates object of type Carddisable
125
+ #
126
+ #@param Dict mapObj, containing the required parameters to create a new object
127
+ #@return [Carddisable] of the response of created instance.
128
+ #@raise [APIException] an exception from the response status
129
+ return self.execute("d6b9f891-31e9-4851-8f8d-c9ee9fc1b202", Carddisable.new(mapObj))
130
+ end
127
131
 
128
132
 
129
133
 
130
- end
131
- end
132
- end
134
+
135
+
136
+
137
+
138
+ end
139
+ end
140
+ end
133
141
  end
134
142
 
135
143
 
@@ -27,109 +27,117 @@
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 Spendalerts
34
- class Channel < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module Spendalerts
35
+ class Channel < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '31714938-6773-411e-851c-501c37b3890c' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/channels", "query", [], []),
40
- '1ce30a27-5c02-4b2e-9715-80b346c4a6df' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/channels", "create", [], []),
41
- '77ea011e-c6ae-4633-a642-86e1a21bb889' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/channels", "delete", [], []),
42
-
43
- }
39
+ @__store = {
40
+ '1f43f42b-1e4d-423c-8d73-65cb8105900c' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/channels", "delete", [], []),
41
+ '182a078d-69eb-42c3-ab7b-5e9bc0d851b6' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/channels", "query", [], []),
42
+ '642c2e62-942d-4e7a-9dcb-7448118f0bd0' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/channels", "create", [], []),
43
+
44
+ }
44
45
 
45
- protected
46
+ protected
46
47
 
47
- def self.getOperationConfig(uuid)
48
- if @__store.key?(uuid)
49
- return @__store[uuid]
50
- end
51
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
- end
48
+ def self.getOperationConfig(uuid)
49
+ if @__store.key?(uuid)
50
+ return @__store[uuid]
51
+ end
52
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
53
+ end
53
54
 
54
- def self.getOperationMetadata()
55
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
56
- end
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
57
+ end
57
58
 
58
- public
59
+ public
59
60
 
60
61
 
61
62
 
62
63
 
63
64
 
65
+ def self.deleteById(id, map = nil)
66
+ #Delete object of type Channel by id
64
67
 
65
- def self.query(criteria)
66
- #
67
- #Query objects of type Channel by id and optional criteria
68
- #@param type criteria
69
- #@return Channel object representing the response.
70
- #
68
+ #@param [String] id
69
+ #@param [Dict] map, containing additional parameters
70
+ #@return [Channel] of the response of the deleted instance.
71
+ #@raise [APIException] an exception from the response status
71
72
 
72
- return self.execute("31714938-6773-411e-851c-501c37b3890c",Channel.new(criteria))
73
- end
74
73
 
75
- def self.create(mapObj)
76
- #
77
- #Creates object of type Channel
78
- #
79
- #@param Dict mapObj, containing the required parameters to create a new object
80
- #@return Channel of the response of created instance.
81
- #
82
- return self.execute("1ce30a27-5c02-4b2e-9715-80b346c4a6df", Channel.new(mapObj))
83
- end
74
+ mapObj = Channel.new
75
+ if !(id.nil? || id.to_s.empty?)
76
+ mapObj.set("id", id)
77
+ end
78
+ if !map.nil?
79
+ if map.instance_of? RequestMap
80
+ mapObj.setAll(map.getObject())
81
+ else
82
+ mapObj.setAll(map)
83
+ end
84
+ end
84
85
 
86
+ return self.execute("1f43f42b-1e4d-423c-8d73-65cb8105900c", mapObj)
87
+ end
85
88
 
86
89
 
90
+ def delete
91
+ #
92
+ #Delete object of type Channel
87
93
 
94
+ #@param [String] id
95
+ #@return [Channel] of the response of the deleted instance.
96
+ #@raise [APIException] an exception from the response status
97
+ #
88
98
 
99
+ return self.class.execute("1f43f42b-1e4d-423c-8d73-65cb8105900c", self)
100
+ end
89
101
 
90
102
 
91
103
 
92
104
 
93
- def self.deleteById(id, map = nil)
94
- #Delete object of type Channel by id
95
105
 
96
- #@param str id
97
- #@param Dict map, containing additional parameters
98
- #@return Channel of the response of the deleted instance.
99
106
 
100
107
 
101
- mapObj = Channel.new
102
- if !(id.nil? || id.to_s.empty?)
103
- mapObj.set("id", id)
104
- end
105
- if !map.nil?
106
- if map.instance_of? RequestMap
107
- mapObj.setAll(map.getObject())
108
- else
109
- mapObj.setAll(map)
110
- end
111
- end
112
108
 
113
- return self.execute("77ea011e-c6ae-4633-a642-86e1a21bb889", mapObj)
114
- end
115
109
 
110
+ def self.query(criteria)
111
+ #
112
+ #Query objects of type Channel by id and optional criteria
113
+ #@param [Dict] criteria
114
+ #@return [Channel] object representing the response.
115
+ #@raise [APIException] an exception from the response status
116
+ #
116
117
 
117
- def delete
118
- #
119
- #Delete object of type Channel
118
+ return self.execute("182a078d-69eb-42c3-ab7b-5e9bc0d851b6",Channel.new(criteria))
119
+ end
120
120
 
121
- #@param str id
122
- #@return Channel of the response of the deleted instance.
123
- #
124
121
 
125
- return self.class.execute("77ea011e-c6ae-4633-a642-86e1a21bb889", self)
126
- end
122
+ def self.create(mapObj)
123
+ #
124
+ #Creates object of type Channel
125
+ #
126
+ #@param Dict mapObj, containing the required parameters to create a new object
127
+ #@return [Channel] of the response of created instance.
128
+ #@raise [APIException] an exception from the response status
129
+ return self.execute("642c2e62-942d-4e7a-9dcb-7448118f0bd0", Channel.new(mapObj))
130
+ end
127
131
 
128
132
 
129
133
 
130
- end
131
- end
132
- end
134
+
135
+
136
+
137
+
138
+ end
139
+ end
140
+ end
133
141
  end
134
142
 
135
143
 
@@ -27,109 +27,117 @@
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 Spendalerts
34
- class Controls < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module Spendalerts
35
+ class Controls < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '25f166f2-115a-4c00-88a4-caab8dd3f497' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "query", [], []),
40
- '68c01f1c-d0f0-490c-8c36-52c943c1439e' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "create", [], []),
41
- 'dfb60232-b546-447b-b729-7507d1a7044f' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "delete", [], []),
42
-
43
- }
39
+ @__store = {
40
+ 'fcb153d8-01d6-459e-be46-c2743014b7a2' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "delete", [], []),
41
+ 'a4e86a07-d16f-4235-8fdb-f70967ded96f' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "query", [], []),
42
+ 'f29f175d-25ca-4f3d-9813-c43c1e21e730' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "create", [], []),
43
+
44
+ }
44
45
 
45
- protected
46
+ protected
46
47
 
47
- def self.getOperationConfig(uuid)
48
- if @__store.key?(uuid)
49
- return @__store[uuid]
50
- end
51
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
- end
48
+ def self.getOperationConfig(uuid)
49
+ if @__store.key?(uuid)
50
+ return @__store[uuid]
51
+ end
52
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
53
+ end
53
54
 
54
- def self.getOperationMetadata()
55
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
56
- end
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
57
+ end
57
58
 
58
- public
59
+ public
59
60
 
60
61
 
61
62
 
62
63
 
63
64
 
65
+ def self.deleteById(id, map = nil)
66
+ #Delete object of type Controls by id
64
67
 
65
- def self.query(criteria)
66
- #
67
- #Query objects of type Controls by id and optional criteria
68
- #@param type criteria
69
- #@return Controls object representing the response.
70
- #
68
+ #@param [String] id
69
+ #@param [Dict] map, containing additional parameters
70
+ #@return [Controls] of the response of the deleted instance.
71
+ #@raise [APIException] an exception from the response status
71
72
 
72
- return self.execute("25f166f2-115a-4c00-88a4-caab8dd3f497",Controls.new(criteria))
73
- end
74
73
 
75
- def self.create(mapObj)
76
- #
77
- #Creates object of type Controls
78
- #
79
- #@param Dict mapObj, containing the required parameters to create a new object
80
- #@return Controls of the response of created instance.
81
- #
82
- return self.execute("68c01f1c-d0f0-490c-8c36-52c943c1439e", Controls.new(mapObj))
83
- end
74
+ mapObj = Controls.new
75
+ if !(id.nil? || id.to_s.empty?)
76
+ mapObj.set("id", id)
77
+ end
78
+ if !map.nil?
79
+ if map.instance_of? RequestMap
80
+ mapObj.setAll(map.getObject())
81
+ else
82
+ mapObj.setAll(map)
83
+ end
84
+ end
84
85
 
86
+ return self.execute("fcb153d8-01d6-459e-be46-c2743014b7a2", mapObj)
87
+ end
85
88
 
86
89
 
90
+ def delete
91
+ #
92
+ #Delete object of type Controls
87
93
 
94
+ #@param [String] id
95
+ #@return [Controls] of the response of the deleted instance.
96
+ #@raise [APIException] an exception from the response status
97
+ #
88
98
 
99
+ return self.class.execute("fcb153d8-01d6-459e-be46-c2743014b7a2", self)
100
+ end
89
101
 
90
102
 
91
103
 
92
104
 
93
- def self.deleteById(id, map = nil)
94
- #Delete object of type Controls by id
95
105
 
96
- #@param str id
97
- #@param Dict map, containing additional parameters
98
- #@return Controls of the response of the deleted instance.
99
106
 
100
107
 
101
- mapObj = Controls.new
102
- if !(id.nil? || id.to_s.empty?)
103
- mapObj.set("id", id)
104
- end
105
- if !map.nil?
106
- if map.instance_of? RequestMap
107
- mapObj.setAll(map.getObject())
108
- else
109
- mapObj.setAll(map)
110
- end
111
- end
112
108
 
113
- return self.execute("dfb60232-b546-447b-b729-7507d1a7044f", mapObj)
114
- end
115
109
 
110
+ def self.query(criteria)
111
+ #
112
+ #Query objects of type Controls by id and optional criteria
113
+ #@param [Dict] criteria
114
+ #@return [Controls] object representing the response.
115
+ #@raise [APIException] an exception from the response status
116
+ #
116
117
 
117
- def delete
118
- #
119
- #Delete object of type Controls
118
+ return self.execute("a4e86a07-d16f-4235-8fdb-f70967ded96f",Controls.new(criteria))
119
+ end
120
120
 
121
- #@param str id
122
- #@return Controls of the response of the deleted instance.
123
- #
124
121
 
125
- return self.class.execute("dfb60232-b546-447b-b729-7507d1a7044f", self)
126
- end
122
+ def self.create(mapObj)
123
+ #
124
+ #Creates object of type Controls
125
+ #
126
+ #@param Dict mapObj, containing the required parameters to create a new object
127
+ #@return [Controls] of the response of created instance.
128
+ #@raise [APIException] an exception from the response status
129
+ return self.execute("f29f175d-25ca-4f3d-9813-c43c1e21e730", Controls.new(mapObj))
130
+ end
127
131
 
128
132
 
129
133
 
130
- end
131
- end
132
- end
134
+
135
+
136
+
137
+
138
+ end
139
+ end
140
+ end
133
141
  end
134
142
 
135
143