mastercard_spendcontrols 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/mastercard/api/spendcontrols/alertall.rb +148 -0
- data/lib/mastercard/api/spendcontrols/alerts.rb +148 -0
- data/lib/mastercard/api/spendcontrols/amount.rb +148 -0
- data/lib/mastercard/api/spendcontrols/amountdecline.rb +148 -0
- data/lib/mastercard/api/spendcontrols/card.rb +147 -0
- data/lib/mastercard/api/spendcontrols/carddisable.rb +148 -0
- data/lib/mastercard/api/spendcontrols/channel.rb +148 -0
- data/lib/mastercard/api/spendcontrols/channeldecline.rb +148 -0
- data/lib/mastercard/api/spendcontrols/controls.rb +148 -0
- data/lib/mastercard/api/spendcontrols/crossborder.rb +148 -0
- data/lib/mastercard/api/spendcontrols/crossborderdecline.rb +148 -0
- data/lib/mastercard/api/spendcontrols/declineall.rb +148 -0
- data/lib/mastercard/api/spendcontrols/declines.rb +148 -0
- data/lib/mastercard/api/spendcontrols/notification.rb +86 -0
- data/lib/mastercard/api/spendcontrols/resourceconfig.rb +98 -0
- data/lib/mastercard/api/spendcontrols/verify.rb +86 -0
- data/lib/mastercard_spendcontrols.rb +19 -0
- metadata +95 -0
@@ -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 Channeldecline < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'656c5977-652f-4e26-9dcf-64c2a9a029f9' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/channels", "delete", [], []),
|
41
|
+
'653d057f-b84f-4d10-ac81-a6e4e3f2f8c1' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/channels", "query", [], []),
|
42
|
+
'8bb00ab4-8e2e-4a26-9b75-c57be6a0e5be' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/channels", "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 Channeldecline by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [Channeldecline] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = Channeldecline.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("656c5977-652f-4e26-9dcf-64c2a9a029f9", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Channeldecline
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [Channeldecline] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("656c5977-652f-4e26-9dcf-64c2a9a029f9", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
def self.query(criteria)
|
111
|
+
#
|
112
|
+
#Query objects of type Channeldecline by id and optional criteria
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [Channeldecline] object representing the response.
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
#
|
117
|
+
|
118
|
+
return self.execute("653d057f-b84f-4d10-ac81-a6e4e3f2f8c1",Channeldecline.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.create(mapObj)
|
123
|
+
#
|
124
|
+
#Creates object of type Channeldecline
|
125
|
+
#
|
126
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
+
#@return [Channeldecline] of the response of created instance.
|
128
|
+
#@raise [APIException] an exception from the response status
|
129
|
+
return self.execute("8bb00ab4-8e2e-4a26-9b75-c57be6a0e5be", Channeldecline.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 Controls < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'8238897f-cb14-413d-801d-de96fbd248d2' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "delete", [], []),
|
41
|
+
'c295ce7b-f460-47ab-bf70-1e02846fda39' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "query", [], []),
|
42
|
+
'bcb2bc4d-8881-41ac-97d9-5c268bba26f2' => OperationConfig.new("/issuer/v1/card/{uuid}/controls", "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 Controls by id
|
67
|
+
|
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
|
72
|
+
|
73
|
+
|
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
|
85
|
+
|
86
|
+
return self.execute("8238897f-cb14-413d-801d-de96fbd248d2", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Controls
|
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
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("8238897f-cb14-413d-801d-de96fbd248d2", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
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
|
+
#
|
117
|
+
|
118
|
+
return self.execute("c295ce7b-f460-47ab-bf70-1e02846fda39",Controls.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
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("bcb2bc4d-8881-41ac-97d9-5c268bba26f2", Controls.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 Crossborder < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'0c147e53-715a-4473-b4eb-4f60e02e870f' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/crossborder", "delete", [], []),
|
41
|
+
'df255f55-b37c-4de0-a13c-d2c9a00bf2de' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/crossborder", "query", [], []),
|
42
|
+
'd4294ee2-7405-4938-a55e-60d1091682b7' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/crossborder", "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 Crossborder by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [Crossborder] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = Crossborder.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("0c147e53-715a-4473-b4eb-4f60e02e870f", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Crossborder
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [Crossborder] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("0c147e53-715a-4473-b4eb-4f60e02e870f", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
def self.query(criteria)
|
111
|
+
#
|
112
|
+
#Query objects of type Crossborder by id and optional criteria
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [Crossborder] object representing the response.
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
#
|
117
|
+
|
118
|
+
return self.execute("df255f55-b37c-4de0-a13c-d2c9a00bf2de",Crossborder.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.create(mapObj)
|
123
|
+
#
|
124
|
+
#Creates object of type Crossborder
|
125
|
+
#
|
126
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
+
#@return [Crossborder] of the response of created instance.
|
128
|
+
#@raise [APIException] an exception from the response status
|
129
|
+
return self.execute("d4294ee2-7405-4938-a55e-60d1091682b7", Crossborder.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 Crossborderdecline < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'1004b940-c30c-414d-9c6c-5c7d10153819' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/crossborder", "delete", [], []),
|
41
|
+
'28b20234-5477-4393-a2b5-491ded35bae4' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/crossborder", "query", [], []),
|
42
|
+
'dfa49677-2bad-4052-b392-7c2e8fe01064' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/declines/crossborder", "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 Crossborderdecline by id
|
67
|
+
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] map, containing additional parameters
|
70
|
+
#@return [Crossborderdecline] of the response of the deleted instance.
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
|
74
|
+
mapObj = Crossborderdecline.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("1004b940-c30c-414d-9c6c-5c7d10153819", mapObj)
|
87
|
+
end
|
88
|
+
|
89
|
+
|
90
|
+
def delete
|
91
|
+
#
|
92
|
+
#Delete object of type Crossborderdecline
|
93
|
+
|
94
|
+
#@param [String] id
|
95
|
+
#@return [Crossborderdecline] of the response of the deleted instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
#
|
98
|
+
|
99
|
+
return self.class.execute("1004b940-c30c-414d-9c6c-5c7d10153819", self)
|
100
|
+
end
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
def self.query(criteria)
|
111
|
+
#
|
112
|
+
#Query objects of type Crossborderdecline by id and optional criteria
|
113
|
+
#@param [Dict] criteria
|
114
|
+
#@return [Crossborderdecline] object representing the response.
|
115
|
+
#@raise [APIException] an exception from the response status
|
116
|
+
#
|
117
|
+
|
118
|
+
return self.execute("28b20234-5477-4393-a2b5-491ded35bae4",Crossborderdecline.new(criteria))
|
119
|
+
end
|
120
|
+
|
121
|
+
|
122
|
+
def self.create(mapObj)
|
123
|
+
#
|
124
|
+
#Creates object of type Crossborderdecline
|
125
|
+
#
|
126
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
127
|
+
#@return [Crossborderdecline] of the response of created instance.
|
128
|
+
#@raise [APIException] an exception from the response status
|
129
|
+
return self.execute("dfa49677-2bad-4052-b392-7c2e8fe01064", Crossborderdecline.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
|
+
|