mastercard_spendcontrols 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 +4 -4
- data/lib/mastercard/api/spendcontrols/alertall.rb +12 -12
- data/lib/mastercard/api/spendcontrols/alerts.rb +12 -12
- data/lib/mastercard/api/spendcontrols/amount.rb +12 -12
- data/lib/mastercard/api/spendcontrols/amountdecline.rb +12 -12
- data/lib/mastercard/api/spendcontrols/batch.rb +116 -0
- data/lib/mastercard/api/spendcontrols/budgetalert.rb +104 -0
- data/lib/mastercard/api/spendcontrols/budgetalertwithbudgetid.rb +160 -0
- data/lib/mastercard/api/spendcontrols/budgetdecline.rb +104 -0
- data/lib/mastercard/api/spendcontrols/budgetdeclinewithbudgetid.rb +160 -0
- data/lib/mastercard/api/spendcontrols/card.rb +44 -14
- data/lib/mastercard/api/spendcontrols/channel.rb +12 -12
- data/lib/mastercard/api/spendcontrols/channeldecline.rb +12 -12
- data/lib/mastercard/api/spendcontrols/combinationctrlsalertresource.rb +104 -0
- data/lib/mastercard/api/spendcontrols/combinationctrlsalertresourcefilterid.rb +160 -0
- data/lib/mastercard/api/spendcontrols/combinationctrlsdeclineresource.rb +86 -0
- data/lib/mastercard/api/spendcontrols/combinationctrlsdeclineresourcefilterid.rb +160 -0
- data/lib/mastercard/api/spendcontrols/combinationctrlsdeclinesresource.rb +87 -0
- data/lib/mastercard/api/spendcontrols/controls.rb +12 -12
- data/lib/mastercard/api/spendcontrols/controlshistory.rb +7 -7
- data/lib/mastercard/api/spendcontrols/crossborder.rb +12 -12
- data/lib/mastercard/api/spendcontrols/crossborderdecline.rb +12 -12
- data/lib/mastercard/api/spendcontrols/declineall.rb +12 -12
- data/lib/mastercard/api/spendcontrols/declines.rb +12 -12
- data/lib/mastercard/api/spendcontrols/geolocationalert.rb +12 -12
- data/lib/mastercard/api/spendcontrols/geolocationdecline.rb +12 -12
- data/lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb +12 -12
- data/lib/mastercard/api/spendcontrols/merchantcategorycodedecline.rb +12 -12
- data/lib/mastercard/api/spendcontrols/notification.rb +7 -7
- data/lib/mastercard/api/spendcontrols/resourceconfig.rb +6 -1
- data/lib/mastercard/api/spendcontrols/txnhistory.rb +7 -7
- data/lib/mastercard/api/spendcontrols/verify.rb +7 -7
- data/lib/mastercard_spendcontrols.rb +10 -0
- metadata +12 -2
@@ -0,0 +1,160 @@
|
|
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 CombinationctrlsalertresourcefilterId < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'6f500071-f765-42e2-80bb-50f3fe1f90e4' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/filters/{filterId}", "delete", [], []),
|
41
|
+
'b6997ba4-968e-4cd1-9a94-48f96fd03764' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/filters/{filterId}", "read", [], []),
|
42
|
+
'de418d8b-4156-4b52-a413-83e7afa3c7f7' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/filters/{filterId}", "create", [], []),
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
def self.getOperationConfig(operationUUID)
|
49
|
+
if @__store.key?(operationUUID)
|
50
|
+
return @__store[operationUUID]
|
51
|
+
end
|
52
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.getOperationMetadata()
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
57
|
+
end
|
58
|
+
|
59
|
+
public
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.deleteById(id, map = nil)
|
66
|
+
#Delete object of type CombinationctrlsalertresourcefilterId by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [CombinationctrlsalertresourcefilterId] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = CombinationctrlsalertresourcefilterId.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("6f500071-f765-42e2-80bb-50f3fe1f90e4", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type CombinationctrlsalertresourcefilterId
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [CombinationctrlsalertresourcefilterId] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("6f500071-f765-42e2-80bb-50f3fe1f90e4", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
def self.read(id, criteria = nil)
|
110
|
+
#
|
111
|
+
#Returns objects of type CombinationctrlsalertresourcefilterId by id and optional criteria
|
112
|
+
#@param [String] id
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [CombinationctrlsalertresourcefilterId] object representing the response
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
|
117
|
+
mapObj = CombinationctrlsalertresourcefilterId.new
|
118
|
+
if !(id.nil? || id.to_s.empty?)
|
119
|
+
mapObj.set("id", id)
|
120
|
+
end
|
121
|
+
if !criteria.nil?
|
122
|
+
if criteria.instance_of? RequestMap
|
123
|
+
mapObj.setAll(criteria.getObject())
|
124
|
+
else
|
125
|
+
mapObj.setAll(criteria)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
return self.execute("b6997ba4-968e-4cd1-9a94-48f96fd03764",CombinationctrlsalertresourcefilterId.new(mapObj))
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
def self.create(mapObj)
|
135
|
+
#
|
136
|
+
#Creates object of type CombinationctrlsalertresourcefilterId
|
137
|
+
#
|
138
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
139
|
+
#@return [CombinationctrlsalertresourcefilterId] of the response of created instance.
|
140
|
+
#@raise [APIException] an exception from the response status
|
141
|
+
return self.execute("de418d8b-4156-4b52-a413-83e7afa3c7f7", CombinationctrlsalertresourcefilterId.new(mapObj))
|
142
|
+
end
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
@@ -0,0 +1,86 @@
|
|
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 Combinationctrlsdeclineresource < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'49dc4d8d-9d8b-428f-ad84-95c9c1e6e00e' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/filters", "create", [], []),
|
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())
|
55
|
+
end
|
56
|
+
|
57
|
+
public
|
58
|
+
|
59
|
+
|
60
|
+
def self.create(mapObj)
|
61
|
+
#
|
62
|
+
#Creates object of type Combinationctrlsdeclineresource
|
63
|
+
#
|
64
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
+
#@return [Combinationctrlsdeclineresource] of the response of created instance.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
return self.execute("49dc4d8d-9d8b-428f-ad84-95c9c1e6e00e", Combinationctrlsdeclineresource.new(mapObj))
|
68
|
+
end
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
@@ -0,0 +1,160 @@
|
|
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 CombinationctrlsdeclineresourcefilterId < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'd1016b24-fa7e-443a-973b-cca05798e56c' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/filters/{filterId}", "delete", [], []),
|
41
|
+
'93f2fbda-815b-4138-bd1b-ff94395d1df6' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/filters/{filterId}", "read", [], []),
|
42
|
+
'23e4e187-777a-4f15-925a-687c641d9436' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/filters/{filterId}", "create", [], []),
|
43
|
+
|
44
|
+
}
|
45
|
+
|
46
|
+
protected
|
47
|
+
|
48
|
+
def self.getOperationConfig(operationUUID)
|
49
|
+
if @__store.key?(operationUUID)
|
50
|
+
return @__store[operationUUID]
|
51
|
+
end
|
52
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.getOperationMetadata()
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
57
|
+
end
|
58
|
+
|
59
|
+
public
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.deleteById(id, map = nil)
|
66
|
+
#Delete object of type CombinationctrlsdeclineresourcefilterId by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [CombinationctrlsdeclineresourcefilterId] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = CombinationctrlsdeclineresourcefilterId.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("d1016b24-fa7e-443a-973b-cca05798e56c", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type CombinationctrlsdeclineresourcefilterId
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [CombinationctrlsdeclineresourcefilterId] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("d1016b24-fa7e-443a-973b-cca05798e56c", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
def self.read(id, criteria = nil)
|
110
|
+
#
|
111
|
+
#Returns objects of type CombinationctrlsdeclineresourcefilterId by id and optional criteria
|
112
|
+
#@param [String] id
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [CombinationctrlsdeclineresourcefilterId] object representing the response
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
|
117
|
+
mapObj = CombinationctrlsdeclineresourcefilterId.new
|
118
|
+
if !(id.nil? || id.to_s.empty?)
|
119
|
+
mapObj.set("id", id)
|
120
|
+
end
|
121
|
+
if !criteria.nil?
|
122
|
+
if criteria.instance_of? RequestMap
|
123
|
+
mapObj.setAll(criteria.getObject())
|
124
|
+
else
|
125
|
+
mapObj.setAll(criteria)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
return self.execute("93f2fbda-815b-4138-bd1b-ff94395d1df6",CombinationctrlsdeclineresourcefilterId.new(mapObj))
|
130
|
+
end
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
def self.create(mapObj)
|
135
|
+
#
|
136
|
+
#Creates object of type CombinationctrlsdeclineresourcefilterId
|
137
|
+
#
|
138
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
139
|
+
#@return [CombinationctrlsdeclineresourcefilterId] of the response of created instance.
|
140
|
+
#@raise [APIException] an exception from the response status
|
141
|
+
return self.execute("23e4e187-777a-4f15-925a-687c641d9436", CombinationctrlsdeclineresourcefilterId.new(mapObj))
|
142
|
+
end
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
@@ -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 Spendcontrols
|
35
|
+
class Combinationctrlsdeclinesresource < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'770ed408-fc99-469d-8f2e-06222759d2d9' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/filters", "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())
|
55
|
+
end
|
56
|
+
|
57
|
+
public
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
def self.query(criteria)
|
66
|
+
#
|
67
|
+
#Query objects of type Combinationctrlsdeclinesresource by id and optional criteria
|
68
|
+
#@param [Dict] criteria
|
69
|
+
#@return [Combinationctrlsdeclinesresource] object representing the response.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
#
|
72
|
+
|
73
|
+
return self.execute("770ed408-fc99-469d-8f2e-06222759d2d9",Combinationctrlsdeclinesresource.new(criteria))
|
74
|
+
end
|
75
|
+
|
76
|
+
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
@@ -37,23 +37,23 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
40
|
+
'0ffc2f35-23a1-4719-ab32-ec2bb248937c' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls", "delete", [], []),
|
41
|
+
'3217c102-bd7a-4b7a-a393-7299bef8062f' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls", "query", [], []),
|
42
|
+
'30c8b515-3cde-45b9-9511-9cef79fe04a7' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls", "create", [], []),
|
43
43
|
|
44
44
|
}
|
45
45
|
|
46
46
|
protected
|
47
47
|
|
48
|
-
def self.getOperationConfig(
|
49
|
-
if @__store.key?(
|
50
|
-
return @__store[
|
48
|
+
def self.getOperationConfig(operationUUID)
|
49
|
+
if @__store.key?(operationUUID)
|
50
|
+
return @__store[operationUUID]
|
51
51
|
end
|
52
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+
|
52
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
53
53
|
end
|
54
54
|
|
55
55
|
def self.getOperationMetadata()
|
56
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
57
57
|
end
|
58
58
|
|
59
59
|
public
|
@@ -83,7 +83,7 @@ module MasterCard
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
return self.execute("
|
86
|
+
return self.execute("0ffc2f35-23a1-4719-ab32-ec2bb248937c", 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("0ffc2f35-23a1-4719-ab32-ec2bb248937c", 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("3217c102-bd7a-4b7a-a393-7299bef8062f",Controls.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 [Controls] of the response of created instance.
|
128
128
|
#@raise [APIException] an exception from the response status
|
129
|
-
return self.execute("
|
129
|
+
return self.execute("30c8b515-3cde-45b9-9511-9cef79fe04a7", Controls.new(mapObj))
|
130
130
|
end
|
131
131
|
|
132
132
|
|
@@ -37,21 +37,21 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
40
|
+
'df436a2b-2a5b-4a0a-885a-97d35bca19bb' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/history/controls", "query", [], ["from","to","pageNumber","pageSize"]),
|
41
41
|
|
42
42
|
}
|
43
43
|
|
44
44
|
protected
|
45
45
|
|
46
|
-
def self.getOperationConfig(
|
47
|
-
if @__store.key?(
|
48
|
-
return @__store[
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
49
|
end
|
50
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
51
|
end
|
52
52
|
|
53
53
|
def self.getOperationMetadata()
|
54
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
55
55
|
end
|
56
56
|
|
57
57
|
public
|
@@ -70,7 +70,7 @@ module MasterCard
|
|
70
70
|
#@raise [APIException] an exception from the response status
|
71
71
|
#
|
72
72
|
|
73
|
-
return self.execute("
|
73
|
+
return self.execute("df436a2b-2a5b-4a0a-885a-97d35bca19bb",Controlshistory.new(criteria))
|
74
74
|
end
|
75
75
|
|
76
76
|
|
@@ -37,23 +37,23 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
40
|
+
'946282e7-0227-4e6b-a7a2-742042691991' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/crossborder", "delete", [], []),
|
41
|
+
'f265664a-44bf-4e9f-a495-fbf5d69b3e7f' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/crossborder", "query", [], []),
|
42
|
+
'c51e529e-0a52-4b8b-b5f2-24842c875ecf' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/crossborder", "create", [], []),
|
43
43
|
|
44
44
|
}
|
45
45
|
|
46
46
|
protected
|
47
47
|
|
48
|
-
def self.getOperationConfig(
|
49
|
-
if @__store.key?(
|
50
|
-
return @__store[
|
48
|
+
def self.getOperationConfig(operationUUID)
|
49
|
+
if @__store.key?(operationUUID)
|
50
|
+
return @__store[operationUUID]
|
51
51
|
end
|
52
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+
|
52
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
53
53
|
end
|
54
54
|
|
55
55
|
def self.getOperationMetadata()
|
56
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
57
57
|
end
|
58
58
|
|
59
59
|
public
|
@@ -83,7 +83,7 @@ module MasterCard
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
-
return self.execute("
|
86
|
+
return self.execute("946282e7-0227-4e6b-a7a2-742042691991", 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("946282e7-0227-4e6b-a7a2-742042691991", 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("f265664a-44bf-4e9f-a495-fbf5d69b3e7f",Crossborder.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 [Crossborder] of the response of created instance.
|
128
128
|
#@raise [APIException] an exception from the response status
|
129
|
-
return self.execute("
|
129
|
+
return self.execute("c51e529e-0a52-4b8b-b5f2-24842c875ecf", Crossborder.new(mapObj))
|
130
130
|
end
|
131
131
|
|
132
132
|
|