mastercard_spendcontrols 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mastercard/api/spendcontrols/alertall.rb +7 -7
- data/lib/mastercard/api/spendcontrols/alerts.rb +7 -7
- data/lib/mastercard/api/spendcontrols/amount.rb +7 -7
- data/lib/mastercard/api/spendcontrols/amountdecline.rb +7 -7
- data/lib/mastercard/api/spendcontrols/card.rb +24 -7
- data/lib/mastercard/api/spendcontrols/channel.rb +7 -7
- data/lib/mastercard/api/spendcontrols/channeldecline.rb +7 -7
- data/lib/mastercard/api/spendcontrols/controls.rb +7 -7
- data/lib/mastercard/api/spendcontrols/controlshistory.rb +87 -0
- data/lib/mastercard/api/spendcontrols/crossborder.rb +7 -7
- data/lib/mastercard/api/spendcontrols/crossborderdecline.rb +7 -7
- data/lib/mastercard/api/spendcontrols/declineall.rb +7 -7
- data/lib/mastercard/api/spendcontrols/declines.rb +7 -7
- data/lib/mastercard/api/spendcontrols/{carddisable.rb → geolocationalert.rb} +17 -17
- data/lib/mastercard/api/spendcontrols/geolocationdecline.rb +148 -0
- data/lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb +148 -0
- data/lib/mastercard/api/spendcontrols/merchantcategorycodedecline.rb +148 -0
- data/lib/mastercard/api/spendcontrols/notification.rb +2 -2
- data/lib/mastercard/api/spendcontrols/resourceconfig.rb +1 -1
- data/lib/mastercard/api/spendcontrols/txnhistory.rb +87 -0
- data/lib/mastercard/api/spendcontrols/verify.rb +2 -2
- data/lib/mastercard_spendcontrols.rb +6 -1
- metadata +8 -3
@@ -37,9 +37,9 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
40
|
+
'a366f86f-f6f1-4c22-9e56-75961019c445' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/all", "delete", [], []),
|
41
|
+
'b6966793-c547-4857-b483-62642fe3d994' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/all", "query", [], []),
|
42
|
+
'6cd51690-8633-4141-ae70-3d5bcb19f286' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/all", "create", [], []),
|
43
43
|
|
44
44
|
}
|
45
45
|
|
@@ -83,7 +83,7 @@ module MasterCard
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
return self.execute("
|
86
|
+
return self.execute("a366f86f-f6f1-4c22-9e56-75961019c445", mapObj)
|
87
87
|
end
|
88
88
|
|
89
89
|
|
@@ -96,7 +96,7 @@ module MasterCard
|
|
96
96
|
#@raise [APIException] an exception from the response status
|
97
97
|
#
|
98
98
|
|
99
|
-
return self.class.execute("
|
99
|
+
return self.class.execute("a366f86f-f6f1-4c22-9e56-75961019c445", self)
|
100
100
|
end
|
101
101
|
|
102
102
|
|
@@ -115,7 +115,7 @@ module MasterCard
|
|
115
115
|
#@raise [APIException] an exception from the response status
|
116
116
|
#
|
117
117
|
|
118
|
-
return self.execute("
|
118
|
+
return self.execute("b6966793-c547-4857-b483-62642fe3d994",Declineall.new(criteria))
|
119
119
|
end
|
120
120
|
|
121
121
|
|
@@ -126,7 +126,7 @@ module MasterCard
|
|
126
126
|
#@param Dict mapObj, containing the required parameters to create a new object
|
127
127
|
#@return [Declineall] of the response of created instance.
|
128
128
|
#@raise [APIException] an exception from the response status
|
129
|
-
return self.execute("
|
129
|
+
return self.execute("6cd51690-8633-4141-ae70-3d5bcb19f286", Declineall.new(mapObj))
|
130
130
|
end
|
131
131
|
|
132
132
|
|
@@ -37,9 +37,9 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
40
|
+
'c0d85a07-9a18-4e77-8626-ddb3cf69073d' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines", "delete", [], []),
|
41
|
+
'85f1237d-1d2e-4ec5-a4f9-264e769c581a' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines", "query", [], []),
|
42
|
+
'fdad2b2b-d646-4cd3-b032-14220f8cb29c' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines", "create", [], []),
|
43
43
|
|
44
44
|
}
|
45
45
|
|
@@ -83,7 +83,7 @@ module MasterCard
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
return self.execute("
|
86
|
+
return self.execute("c0d85a07-9a18-4e77-8626-ddb3cf69073d", mapObj)
|
87
87
|
end
|
88
88
|
|
89
89
|
|
@@ -96,7 +96,7 @@ module MasterCard
|
|
96
96
|
#@raise [APIException] an exception from the response status
|
97
97
|
#
|
98
98
|
|
99
|
-
return self.class.execute("
|
99
|
+
return self.class.execute("c0d85a07-9a18-4e77-8626-ddb3cf69073d", self)
|
100
100
|
end
|
101
101
|
|
102
102
|
|
@@ -115,7 +115,7 @@ module MasterCard
|
|
115
115
|
#@raise [APIException] an exception from the response status
|
116
116
|
#
|
117
117
|
|
118
|
-
return self.execute("
|
118
|
+
return self.execute("85f1237d-1d2e-4ec5-a4f9-264e769c581a",Declines.new(criteria))
|
119
119
|
end
|
120
120
|
|
121
121
|
|
@@ -126,7 +126,7 @@ module MasterCard
|
|
126
126
|
#@param Dict mapObj, containing the required parameters to create a new object
|
127
127
|
#@return [Declines] of the response of created instance.
|
128
128
|
#@raise [APIException] an exception from the response status
|
129
|
-
return self.execute("
|
129
|
+
return self.execute("fdad2b2b-d646-4cd3-b032-14220f8cb29c", Declines.new(mapObj))
|
130
130
|
end
|
131
131
|
|
132
132
|
|
@@ -32,14 +32,14 @@ require "mastercard/core/baseobject"
|
|
32
32
|
module MasterCard
|
33
33
|
module API
|
34
34
|
module Spendcontrols
|
35
|
-
class
|
35
|
+
class Geolocationalert < MasterCard::Core::Model::BaseObject
|
36
36
|
include MasterCard::Core::Model
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
40
|
+
'f29dd6e8-e908-40a1-ae1c-380e63a9ff69' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/geolocations", "delete", [], []),
|
41
|
+
'2b70c5a2-700f-4eb3-9d17-6637a917c34a' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/geolocations", "query", [], []),
|
42
|
+
'a8d9b869-616e-4a56-854e-6c542290aa26' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/geolocations", "create", [], []),
|
43
43
|
|
44
44
|
}
|
45
45
|
|
@@ -63,15 +63,15 @@ module MasterCard
|
|
63
63
|
|
64
64
|
|
65
65
|
def self.deleteById(id, map = nil)
|
66
|
-
#Delete object of type
|
66
|
+
#Delete object of type Geolocationalert by id
|
67
67
|
|
68
68
|
#@param [String] id
|
69
69
|
#@param [Dict] map, containing additional parameters
|
70
|
-
#@return [
|
70
|
+
#@return [Geolocationalert] of the response of the deleted instance.
|
71
71
|
#@raise [APIException] an exception from the response status
|
72
72
|
|
73
73
|
|
74
|
-
mapObj =
|
74
|
+
mapObj = Geolocationalert.new
|
75
75
|
if !(id.nil? || id.to_s.empty?)
|
76
76
|
mapObj.set("id", id)
|
77
77
|
end
|
@@ -83,20 +83,20 @@ module MasterCard
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
return self.execute("
|
86
|
+
return self.execute("f29dd6e8-e908-40a1-ae1c-380e63a9ff69", mapObj)
|
87
87
|
end
|
88
88
|
|
89
89
|
|
90
90
|
def delete
|
91
91
|
#
|
92
|
-
#Delete object of type
|
92
|
+
#Delete object of type Geolocationalert
|
93
93
|
|
94
94
|
#@param [String] id
|
95
|
-
#@return [
|
95
|
+
#@return [Geolocationalert] of the response of the deleted instance.
|
96
96
|
#@raise [APIException] an exception from the response status
|
97
97
|
#
|
98
98
|
|
99
|
-
return self.class.execute("
|
99
|
+
return self.class.execute("f29dd6e8-e908-40a1-ae1c-380e63a9ff69", self)
|
100
100
|
end
|
101
101
|
|
102
102
|
|
@@ -109,24 +109,24 @@ module MasterCard
|
|
109
109
|
|
110
110
|
def self.query(criteria)
|
111
111
|
#
|
112
|
-
#Query objects of type
|
112
|
+
#Query objects of type Geolocationalert by id and optional criteria
|
113
113
|
#@param [Dict] criteria
|
114
|
-
#@return [
|
114
|
+
#@return [Geolocationalert] object representing the response.
|
115
115
|
#@raise [APIException] an exception from the response status
|
116
116
|
#
|
117
117
|
|
118
|
-
return self.execute("
|
118
|
+
return self.execute("2b70c5a2-700f-4eb3-9d17-6637a917c34a",Geolocationalert.new(criteria))
|
119
119
|
end
|
120
120
|
|
121
121
|
|
122
122
|
def self.create(mapObj)
|
123
123
|
#
|
124
|
-
#Creates object of type
|
124
|
+
#Creates object of type Geolocationalert
|
125
125
|
#
|
126
126
|
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
-
#@return [
|
127
|
+
#@return [Geolocationalert] of the response of created instance.
|
128
128
|
#@raise [APIException] an exception from the response status
|
129
|
-
return self.execute("
|
129
|
+
return self.execute("a8d9b869-616e-4a56-854e-6c542290aa26", Geolocationalert.new(mapObj))
|
130
130
|
end
|
131
131
|
|
132
132
|
|
@@ -0,0 +1,148 @@
|
|
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 Spendcontrols
|
35
|
+
class Geolocationdecline < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'db8fa073-adbc-4096-bf1e-5e20d4e1e111' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/geolocations", "delete", [], []),
|
41
|
+
'7525fc83-bbed-4e5c-8c08-4e5965283f38' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/geolocations", "query", [], []),
|
42
|
+
'31a05bb8-cf99-4c41-bd6c-2035e12fa551' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/geolocations", "create", [], []),
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
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
|
54
|
+
|
55
|
+
def self.getOperationMetadata()
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
57
|
+
end
|
58
|
+
|
59
|
+
public
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.deleteById(id, map = nil)
|
66
|
+
#Delete object of type Geolocationdecline by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [Geolocationdecline] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = Geolocationdecline.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
|
85
|
+
|
86
|
+
return self.execute("db8fa073-adbc-4096-bf1e-5e20d4e1e111", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Geolocationdecline
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [Geolocationdecline] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("db8fa073-adbc-4096-bf1e-5e20d4e1e111", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
def self.query(criteria)
|
111
|
+
#
|
112
|
+
#Query objects of type Geolocationdecline by id and optional criteria
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [Geolocationdecline] object representing the response.
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
#
|
117
|
+
|
118
|
+
return self.execute("7525fc83-bbed-4e5c-8c08-4e5965283f38",Geolocationdecline.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.create(mapObj)
|
123
|
+
#
|
124
|
+
#Creates object of type Geolocationdecline
|
125
|
+
#
|
126
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
+
#@return [Geolocationdecline] of the response of created instance.
|
128
|
+
#@raise [APIException] an exception from the response status
|
129
|
+
return self.execute("31a05bb8-cf99-4c41-bd6c-2035e12fa551", Geolocationdecline.new(mapObj))
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
@@ -0,0 +1,148 @@
|
|
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 Spendcontrols
|
35
|
+
class Merchantcategorycodealert < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'2937cb10-16d5-4438-848a-628e57a46c41' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/mccs", "delete", [], []),
|
41
|
+
'a1dbf5ee-c956-42b3-bb02-a1c01b901b6f' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/mccs", "query", [], []),
|
42
|
+
'ac6c82c0-b53b-4594-a50a-a76b52b64ac0' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/mccs", "create", [], []),
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
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
|
54
|
+
|
55
|
+
def self.getOperationMetadata()
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
57
|
+
end
|
58
|
+
|
59
|
+
public
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.deleteById(id, map = nil)
|
66
|
+
#Delete object of type Merchantcategorycodealert by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [Merchantcategorycodealert] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = Merchantcategorycodealert.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
|
85
|
+
|
86
|
+
return self.execute("2937cb10-16d5-4438-848a-628e57a46c41", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Merchantcategorycodealert
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [Merchantcategorycodealert] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("2937cb10-16d5-4438-848a-628e57a46c41", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
def self.query(criteria)
|
111
|
+
#
|
112
|
+
#Query objects of type Merchantcategorycodealert by id and optional criteria
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [Merchantcategorycodealert] object representing the response.
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
#
|
117
|
+
|
118
|
+
return self.execute("a1dbf5ee-c956-42b3-bb02-a1c01b901b6f",Merchantcategorycodealert.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.create(mapObj)
|
123
|
+
#
|
124
|
+
#Creates object of type Merchantcategorycodealert
|
125
|
+
#
|
126
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
+
#@return [Merchantcategorycodealert] of the response of created instance.
|
128
|
+
#@raise [APIException] an exception from the response status
|
129
|
+
return self.execute("ac6c82c0-b53b-4594-a50a-a76b52b64ac0", Merchantcategorycodealert.new(mapObj))
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
@@ -0,0 +1,148 @@
|
|
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 Spendcontrols
|
35
|
+
class Merchantcategorycodedecline < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'550a7b9c-8159-4123-888b-c5da06646d73' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/mccs", "delete", [], []),
|
41
|
+
'dcb512d9-8ba5-4f60-bf36-68a55407e52e' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/mccs", "query", [], []),
|
42
|
+
'4977329d-2a5b-45de-b8fc-3110fe0c3465' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/mccs", "create", [], []),
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
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
|
54
|
+
|
55
|
+
def self.getOperationMetadata()
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
57
|
+
end
|
58
|
+
|
59
|
+
public
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.deleteById(id, map = nil)
|
66
|
+
#Delete object of type Merchantcategorycodedecline by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [Merchantcategorycodedecline] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = Merchantcategorycodedecline.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
|
85
|
+
|
86
|
+
return self.execute("550a7b9c-8159-4123-888b-c5da06646d73", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Merchantcategorycodedecline
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [Merchantcategorycodedecline] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("550a7b9c-8159-4123-888b-c5da06646d73", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
def self.query(criteria)
|
111
|
+
#
|
112
|
+
#Query objects of type Merchantcategorycodedecline by id and optional criteria
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [Merchantcategorycodedecline] object representing the response.
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
#
|
117
|
+
|
118
|
+
return self.execute("dcb512d9-8ba5-4f60-bf36-68a55407e52e",Merchantcategorycodedecline.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.create(mapObj)
|
123
|
+
#
|
124
|
+
#Creates object of type Merchantcategorycodedecline
|
125
|
+
#
|
126
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
+
#@return [Merchantcategorycodedecline] of the response of created instance.
|
128
|
+
#@raise [APIException] an exception from the response status
|
129
|
+
return self.execute("4977329d-2a5b-45de-b8fc-3110fe0c3465", Merchantcategorycodedecline.new(mapObj))
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
@@ -37,7 +37,7 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
40
|
+
'd9359b5c-f886-462a-8a67-464790e94dcd' => OperationConfig.new("/issuer/spendcontrols/v1/test/notificationUrl", "create", ["x-request-endpoint-uri"], []),
|
41
41
|
|
42
42
|
}
|
43
43
|
|
@@ -64,7 +64,7 @@ module MasterCard
|
|
64
64
|
#@param Dict mapObj, containing the required parameters to create a new object
|
65
65
|
#@return [Notification] of the response of created instance.
|
66
66
|
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("
|
67
|
+
return self.execute("d9359b5c-f886-462a-8a67-464790e94dcd", Notification.new(mapObj))
|
68
68
|
end
|
69
69
|
|
70
70
|
|