mastercard_spendcontrols 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mastercard/api/spendcontrols/alertall.rb +8 -8
  3. data/lib/mastercard/api/spendcontrols/alerts.rb +8 -8
  4. data/lib/mastercard/api/spendcontrols/amount.rb +8 -8
  5. data/lib/mastercard/api/spendcontrols/amountdecline.rb +8 -8
  6. data/lib/mastercard/api/spendcontrols/batch.rb +5 -5
  7. data/lib/mastercard/api/spendcontrols/budgetalert.rb +5 -5
  8. data/lib/mastercard/api/spendcontrols/budgetalertwithbudgetid.rb +8 -8
  9. data/lib/mastercard/api/spendcontrols/budgetdecline.rb +5 -5
  10. data/lib/mastercard/api/spendcontrols/budgetdeclinewithbudgetid.rb +8 -8
  11. data/lib/mastercard/api/spendcontrols/card.rb +12 -12
  12. data/lib/mastercard/api/spendcontrols/channel.rb +8 -8
  13. data/lib/mastercard/api/spendcontrols/channeldecline.rb +8 -8
  14. data/lib/mastercard/api/spendcontrols/combinationctrlsalertresource.rb +5 -5
  15. data/lib/mastercard/api/spendcontrols/combinationctrlsalertresourcefilterid.rb +8 -8
  16. data/lib/mastercard/api/spendcontrols/combinationctrlsdeclineresource.rb +3 -3
  17. data/lib/mastercard/api/spendcontrols/combinationctrlsdeclineresourcefilterid.rb +8 -8
  18. data/lib/mastercard/api/spendcontrols/combinationctrlsdeclinesresource.rb +3 -3
  19. data/lib/mastercard/api/spendcontrols/controls.rb +8 -8
  20. data/lib/mastercard/api/spendcontrols/controlshistory.rb +3 -3
  21. data/lib/mastercard/api/spendcontrols/crossborder.rb +8 -8
  22. data/lib/mastercard/api/spendcontrols/crossborderdecline.rb +8 -8
  23. data/lib/mastercard/api/spendcontrols/declineall.rb +8 -8
  24. data/lib/mastercard/api/spendcontrols/declines.rb +8 -8
  25. data/lib/mastercard/api/spendcontrols/geolocationalert.rb +8 -8
  26. data/lib/mastercard/api/spendcontrols/geolocationdecline.rb +8 -8
  27. data/lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb +8 -8
  28. data/lib/mastercard/api/spendcontrols/merchantcategorycodedecline.rb +8 -8
  29. data/lib/mastercard/api/spendcontrols/notification.rb +3 -3
  30. data/lib/mastercard/api/spendcontrols/resourceconfig.rb +7 -6
  31. data/lib/mastercard/api/spendcontrols/travelmarkeralert.rb +104 -0
  32. data/lib/mastercard/api/spendcontrols/travelmarkeralertwithtravelid.rb +160 -0
  33. data/lib/mastercard/api/spendcontrols/travelmarkerdecline.rb +104 -0
  34. data/lib/mastercard/api/spendcontrols/travelmarkerdeclinewithtravelid.rb +160 -0
  35. data/lib/mastercard/api/spendcontrols/txnhistory.rb +3 -3
  36. data/lib/mastercard/api/spendcontrols/verify.rb +3 -3
  37. data/lib/mastercard_spendcontrols.rb +4 -0
  38. metadata +6 -2
@@ -37,7 +37,7 @@ module MasterCard
37
37
  #
38
38
 
39
39
  @__store = {
40
- '0bfde8d1-433a-4975-a1aa-ecec6363f5a8' => OperationConfig.new("/issuer/spendcontrols/v1/test/notificationUrl", "create", ["x-request-endpoint-uri"], []),
40
+ '338c29e0-c61e-4916-a4ae-afb00234059d' => OperationConfig.new("/issuer/spendcontrols/v1/test/notificationUrl", "create", ["x-request-endpoint-uri"], []),
41
41
 
42
42
  }
43
43
 
@@ -51,7 +51,7 @@ module MasterCard
51
51
  end
52
52
 
53
53
  def self.getOperationMetadata()
54
- return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
54
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
55
55
  end
56
56
 
57
57
  public
@@ -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("0bfde8d1-433a-4975-a1aa-ecec6363f5a8", Notification.new(mapObj))
67
+ return self.execute("338c29e0-c61e-4916-a4ae-afb00234059d", Notification.new(mapObj))
68
68
  end
69
69
 
70
70
 
@@ -37,12 +37,9 @@ module MasterCard
37
37
  @@instance = nil
38
38
 
39
39
  def initialize
40
- @name = "spendcontrols"
41
40
  @override = nil
42
41
  @host = nil
43
42
  @context = nil
44
- @version = "spendcontrols:1.0.3"
45
- @jsonNative = false
46
43
 
47
44
  Config.registerResourceConfig(self)
48
45
  currentEnvironment = Config.getEnvironment()
@@ -57,7 +54,7 @@ module MasterCard
57
54
 
58
55
 
59
56
  def getName
60
- return @name
57
+ return "spendcontrols"
61
58
  end
62
59
 
63
60
 
@@ -74,11 +71,15 @@ module MasterCard
74
71
  end
75
72
 
76
73
  def getVersion
77
- return @version
74
+ return "spendcontrols:1.0.4"
78
75
  end
79
76
 
80
77
  def getJsonNative
81
- return @jsonNative
78
+ return false
79
+ end
80
+
81
+ def getContentTypeOverride
82
+ return nil
82
83
  end
83
84
 
84
85
  def setEnvironment(environmet)
@@ -0,0 +1,104 @@
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 Travelmarkeralert < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '1beac202-4197-4ec3-bf83-fbb437ff4ac0' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/travels", "query", [], []),
41
+ '4cee3443-16fd-424a-ab41-a8b712e42603' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/travels", "create", [], []),
42
+
43
+ }
44
+
45
+ protected
46
+
47
+ def self.getOperationConfig(operationUUID)
48
+ if @__store.key?(operationUUID)
49
+ return @__store[operationUUID]
50
+ end
51
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
52
+ end
53
+
54
+ def self.getOperationMetadata()
55
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
56
+ end
57
+
58
+ public
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ def self.query(criteria)
67
+ #
68
+ #Query objects of type Travelmarkeralert by id and optional criteria
69
+ #@param [Dict] criteria
70
+ #@return [Travelmarkeralert] object representing the response.
71
+ #@raise [APIException] an exception from the response status
72
+ #
73
+
74
+ return self.execute("1beac202-4197-4ec3-bf83-fbb437ff4ac0",Travelmarkeralert.new(criteria))
75
+ end
76
+
77
+
78
+ def self.create(mapObj)
79
+ #
80
+ #Creates object of type Travelmarkeralert
81
+ #
82
+ #@param Dict mapObj, containing the required parameters to create a new object
83
+ #@return [Travelmarkeralert] of the response of created instance.
84
+ #@raise [APIException] an exception from the response status
85
+ return self.execute("4cee3443-16fd-424a-ab41-a8b712e42603", Travelmarkeralert.new(mapObj))
86
+ end
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+
100
+
101
+
102
+
103
+
104
+
@@ -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 TravelmarkeralertwithtravelId < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ 'f69bb085-ba4b-4cc0-8de2-4efd9e36aef2' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/travels/{travelId}", "create", [], []),
41
+ '50437cf1-9a28-42db-91c1-c78e4ee4f36a' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/travels/{travelId}", "delete", [], []),
42
+ '6cc77a70-0771-4d5c-a818-9df213e9d574' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/travels/{travelId}", "read", [], []),
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(), ResourceConfig.instance.getContentTypeOverride())
57
+ end
58
+
59
+ public
60
+
61
+
62
+ def self.create(mapObj)
63
+ #
64
+ #Creates object of type TravelmarkeralertwithtravelId
65
+ #
66
+ #@param Dict mapObj, containing the required parameters to create a new object
67
+ #@return [TravelmarkeralertwithtravelId] of the response of created instance.
68
+ #@raise [APIException] an exception from the response status
69
+ return self.execute("f69bb085-ba4b-4cc0-8de2-4efd9e36aef2", TravelmarkeralertwithtravelId.new(mapObj))
70
+ end
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ def self.deleteById(id, map = nil)
82
+ #Delete object of type TravelmarkeralertwithtravelId by id
83
+
84
+ #@param [String] id
85
+ #@param [Dict] map, containing additional parameters
86
+ #@return [TravelmarkeralertwithtravelId] of the response of the deleted instance.
87
+ #@raise [APIException] an exception from the response status
88
+
89
+
90
+ mapObj = TravelmarkeralertwithtravelId.new
91
+ if !(id.nil? || id.to_s.empty?)
92
+ mapObj.set("id", id)
93
+ end
94
+ if !map.nil?
95
+ if map.instance_of? RequestMap
96
+ mapObj.setAll(map.getObject())
97
+ else
98
+ mapObj.setAll(map)
99
+ end
100
+ end
101
+
102
+ return self.execute("50437cf1-9a28-42db-91c1-c78e4ee4f36a", mapObj)
103
+ end
104
+
105
+
106
+ def delete
107
+ #
108
+ #Delete object of type TravelmarkeralertwithtravelId
109
+
110
+ #@param [String] id
111
+ #@return [TravelmarkeralertwithtravelId] of the response of the deleted instance.
112
+ #@raise [APIException] an exception from the response status
113
+ #
114
+
115
+ return self.class.execute("50437cf1-9a28-42db-91c1-c78e4ee4f36a", self)
116
+ end
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ def self.read(id, criteria = nil)
126
+ #
127
+ #Returns objects of type TravelmarkeralertwithtravelId by id and optional criteria
128
+ #@param [String] id
129
+ #@param [Dict] criteria
130
+ #@return [TravelmarkeralertwithtravelId] object representing the response
131
+ #@raise [APIException] an exception from the response status
132
+
133
+ mapObj = TravelmarkeralertwithtravelId.new
134
+ if !(id.nil? || id.to_s.empty?)
135
+ mapObj.set("id", id)
136
+ end
137
+ if !criteria.nil?
138
+ if criteria.instance_of? RequestMap
139
+ mapObj.setAll(criteria.getObject())
140
+ else
141
+ mapObj.setAll(criteria)
142
+ end
143
+ end
144
+
145
+ return self.execute("6cc77a70-0771-4d5c-a818-9df213e9d574",TravelmarkeralertwithtravelId.new(mapObj))
146
+ end
147
+
148
+
149
+
150
+ end
151
+ end
152
+ end
153
+ end
154
+
155
+
156
+
157
+
158
+
159
+
160
+
@@ -0,0 +1,104 @@
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 Travelmarkerdecline < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ 'f66979db-696e-45e6-b564-5bbb468c1ae1' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/travels", "create", [], []),
41
+ '1d943b2a-ef17-4222-be51-c8cd351ad025' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/travels", "query", [], []),
42
+
43
+ }
44
+
45
+ protected
46
+
47
+ def self.getOperationConfig(operationUUID)
48
+ if @__store.key?(operationUUID)
49
+ return @__store[operationUUID]
50
+ end
51
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
52
+ end
53
+
54
+ def self.getOperationMetadata()
55
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
56
+ end
57
+
58
+ public
59
+
60
+
61
+ def self.create(mapObj)
62
+ #
63
+ #Creates object of type Travelmarkerdecline
64
+ #
65
+ #@param Dict mapObj, containing the required parameters to create a new object
66
+ #@return [Travelmarkerdecline] of the response of created instance.
67
+ #@raise [APIException] an exception from the response status
68
+ return self.execute("f66979db-696e-45e6-b564-5bbb468c1ae1", Travelmarkerdecline.new(mapObj))
69
+ end
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+ def self.query(criteria)
83
+ #
84
+ #Query objects of type Travelmarkerdecline by id and optional criteria
85
+ #@param [Dict] criteria
86
+ #@return [Travelmarkerdecline] object representing the response.
87
+ #@raise [APIException] an exception from the response status
88
+ #
89
+
90
+ return self.execute("1d943b2a-ef17-4222-be51-c8cd351ad025",Travelmarkerdecline.new(criteria))
91
+ end
92
+
93
+
94
+ end
95
+ end
96
+ end
97
+ end
98
+
99
+
100
+
101
+
102
+
103
+
104
+
@@ -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 TravelmarkerdeclinewithtravelId < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ 'b2971cc0-2ea1-413b-9986-cee14ef1ccae' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/travels/{travelId}", "create", [], []),
41
+ '00712e0d-c05e-4823-9df5-46e4bafb5029' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/travels/{travelId}", "delete", [], []),
42
+ '399fa634-1dd8-4b92-8570-a3e50c27563c' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/travels/{travelId}", "read", [], []),
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(), ResourceConfig.instance.getContentTypeOverride())
57
+ end
58
+
59
+ public
60
+
61
+
62
+ def self.create(mapObj)
63
+ #
64
+ #Creates object of type TravelmarkerdeclinewithtravelId
65
+ #
66
+ #@param Dict mapObj, containing the required parameters to create a new object
67
+ #@return [TravelmarkerdeclinewithtravelId] of the response of created instance.
68
+ #@raise [APIException] an exception from the response status
69
+ return self.execute("b2971cc0-2ea1-413b-9986-cee14ef1ccae", TravelmarkerdeclinewithtravelId.new(mapObj))
70
+ end
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ def self.deleteById(id, map = nil)
82
+ #Delete object of type TravelmarkerdeclinewithtravelId by id
83
+
84
+ #@param [String] id
85
+ #@param [Dict] map, containing additional parameters
86
+ #@return [TravelmarkerdeclinewithtravelId] of the response of the deleted instance.
87
+ #@raise [APIException] an exception from the response status
88
+
89
+
90
+ mapObj = TravelmarkerdeclinewithtravelId.new
91
+ if !(id.nil? || id.to_s.empty?)
92
+ mapObj.set("id", id)
93
+ end
94
+ if !map.nil?
95
+ if map.instance_of? RequestMap
96
+ mapObj.setAll(map.getObject())
97
+ else
98
+ mapObj.setAll(map)
99
+ end
100
+ end
101
+
102
+ return self.execute("00712e0d-c05e-4823-9df5-46e4bafb5029", mapObj)
103
+ end
104
+
105
+
106
+ def delete
107
+ #
108
+ #Delete object of type TravelmarkerdeclinewithtravelId
109
+
110
+ #@param [String] id
111
+ #@return [TravelmarkerdeclinewithtravelId] of the response of the deleted instance.
112
+ #@raise [APIException] an exception from the response status
113
+ #
114
+
115
+ return self.class.execute("00712e0d-c05e-4823-9df5-46e4bafb5029", self)
116
+ end
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ def self.read(id, criteria = nil)
126
+ #
127
+ #Returns objects of type TravelmarkerdeclinewithtravelId by id and optional criteria
128
+ #@param [String] id
129
+ #@param [Dict] criteria
130
+ #@return [TravelmarkerdeclinewithtravelId] object representing the response
131
+ #@raise [APIException] an exception from the response status
132
+
133
+ mapObj = TravelmarkerdeclinewithtravelId.new
134
+ if !(id.nil? || id.to_s.empty?)
135
+ mapObj.set("id", id)
136
+ end
137
+ if !criteria.nil?
138
+ if criteria.instance_of? RequestMap
139
+ mapObj.setAll(criteria.getObject())
140
+ else
141
+ mapObj.setAll(criteria)
142
+ end
143
+ end
144
+
145
+ return self.execute("399fa634-1dd8-4b92-8570-a3e50c27563c",TravelmarkerdeclinewithtravelId.new(mapObj))
146
+ end
147
+
148
+
149
+
150
+ end
151
+ end
152
+ end
153
+ end
154
+
155
+
156
+
157
+
158
+
159
+
160
+