mastercard_spendcontrols 1.0.2 → 1.0.3

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.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mastercard/api/spendcontrols/alertall.rb +12 -12
  3. data/lib/mastercard/api/spendcontrols/alerts.rb +12 -12
  4. data/lib/mastercard/api/spendcontrols/amount.rb +12 -12
  5. data/lib/mastercard/api/spendcontrols/amountdecline.rb +12 -12
  6. data/lib/mastercard/api/spendcontrols/batch.rb +116 -0
  7. data/lib/mastercard/api/spendcontrols/budgetalert.rb +104 -0
  8. data/lib/mastercard/api/spendcontrols/budgetalertwithbudgetid.rb +160 -0
  9. data/lib/mastercard/api/spendcontrols/budgetdecline.rb +104 -0
  10. data/lib/mastercard/api/spendcontrols/budgetdeclinewithbudgetid.rb +160 -0
  11. data/lib/mastercard/api/spendcontrols/card.rb +44 -14
  12. data/lib/mastercard/api/spendcontrols/channel.rb +12 -12
  13. data/lib/mastercard/api/spendcontrols/channeldecline.rb +12 -12
  14. data/lib/mastercard/api/spendcontrols/combinationctrlsalertresource.rb +104 -0
  15. data/lib/mastercard/api/spendcontrols/combinationctrlsalertresourcefilterid.rb +160 -0
  16. data/lib/mastercard/api/spendcontrols/combinationctrlsdeclineresource.rb +86 -0
  17. data/lib/mastercard/api/spendcontrols/combinationctrlsdeclineresourcefilterid.rb +160 -0
  18. data/lib/mastercard/api/spendcontrols/combinationctrlsdeclinesresource.rb +87 -0
  19. data/lib/mastercard/api/spendcontrols/controls.rb +12 -12
  20. data/lib/mastercard/api/spendcontrols/controlshistory.rb +7 -7
  21. data/lib/mastercard/api/spendcontrols/crossborder.rb +12 -12
  22. data/lib/mastercard/api/spendcontrols/crossborderdecline.rb +12 -12
  23. data/lib/mastercard/api/spendcontrols/declineall.rb +12 -12
  24. data/lib/mastercard/api/spendcontrols/declines.rb +12 -12
  25. data/lib/mastercard/api/spendcontrols/geolocationalert.rb +12 -12
  26. data/lib/mastercard/api/spendcontrols/geolocationdecline.rb +12 -12
  27. data/lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb +12 -12
  28. data/lib/mastercard/api/spendcontrols/merchantcategorycodedecline.rb +12 -12
  29. data/lib/mastercard/api/spendcontrols/notification.rb +7 -7
  30. data/lib/mastercard/api/spendcontrols/resourceconfig.rb +6 -1
  31. data/lib/mastercard/api/spendcontrols/txnhistory.rb +7 -7
  32. data/lib/mastercard/api/spendcontrols/verify.rb +7 -7
  33. data/lib/mastercard_spendcontrols.rb +10 -0
  34. metadata +12 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a8b815923ff6baf02f73e5bf6ada892da034f30d
4
- data.tar.gz: b6152ac3f1a529363157e94c2c349d459675d4c7
3
+ metadata.gz: f14d7febf05718e08c75fd44d7cde054072e6252
4
+ data.tar.gz: 32eeb2a3031c6567b5c54b63674c2688dfff186f
5
5
  SHA512:
6
- metadata.gz: f57fabbb428a5c784e27b39c667ab660487f6256b545c91f3108feb3d9b211601c87dad36d3e4f4969b345701b6859b9c483d95542ec53be082b2c557746864a
7
- data.tar.gz: 7b660c3f6d02543bdca649b7f55018f1dbd6811108fdb962f17e416367c8ad2091cb51462f20ea20315d63aea56b969d66b339ead1adc9f50a0d966eada4f1af
6
+ metadata.gz: bda68c605f144d34fac68dd1dd4f7b1afbc89b3f4cffaebec2ef0e720ba457c460244b4209e1e9e8b8124793bf644215fd5abf9ab5f3dfbfc9711e7795b8dbec
7
+ data.tar.gz: 22c135f0c5981af0b3caf74e30b47402a1053f38a37ead80c73a08c8d542149a7c2fa739bc41427cf4656f48218e3b1d35cf5bd36eb5f2896b07383fca748411
@@ -37,23 +37,23 @@ module MasterCard
37
37
  #
38
38
 
39
39
  @__store = {
40
- '53c55052-5808-4b77-ac52-454f154fbf81' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/all", "delete", [], []),
41
- '35fc8968-a349-4b2f-935c-77a7a3f7b4bd' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/all", "query", [], []),
42
- '6da66199-ce40-4b76-a0da-c0d25d26d86a' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/all", "create", [], []),
40
+ '78261f7b-e71a-48d3-84b5-41a40933cd02' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/all", "delete", [], []),
41
+ '6104b233-52fa-4242-a018-2e8c87cdfa66' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/all", "query", [], []),
42
+ '2ac25866-ff67-40cc-a50b-c308f2e00845' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/all", "create", [], []),
43
43
 
44
44
  }
45
45
 
46
46
  protected
47
47
 
48
- def self.getOperationConfig(uuid)
49
- if @__store.key?(uuid)
50
- return @__store[uuid]
48
+ def self.getOperationConfig(operationUUID)
49
+ if @__store.key?(operationUUID)
50
+ return @__store[operationUUID]
51
51
  end
52
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
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("53c55052-5808-4b77-ac52-454f154fbf81", mapObj)
86
+ return self.execute("78261f7b-e71a-48d3-84b5-41a40933cd02", 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("53c55052-5808-4b77-ac52-454f154fbf81", self)
99
+ return self.class.execute("78261f7b-e71a-48d3-84b5-41a40933cd02", 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("35fc8968-a349-4b2f-935c-77a7a3f7b4bd",Alertall.new(criteria))
118
+ return self.execute("6104b233-52fa-4242-a018-2e8c87cdfa66",Alertall.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 [Alertall] of the response of created instance.
128
128
  #@raise [APIException] an exception from the response status
129
- return self.execute("6da66199-ce40-4b76-a0da-c0d25d26d86a", Alertall.new(mapObj))
129
+ return self.execute("2ac25866-ff67-40cc-a50b-c308f2e00845", Alertall.new(mapObj))
130
130
  end
131
131
 
132
132
 
@@ -37,23 +37,23 @@ module MasterCard
37
37
  #
38
38
 
39
39
  @__store = {
40
- '8307f215-af2d-4bbf-a12d-69e4e0b02067' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts", "delete", [], []),
41
- 'eb3d8f9f-085a-4002-98e7-0fda9f52f5ff' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts", "query", [], []),
42
- '209ab3d3-c9da-44f5-9d7a-c0eb22d53fb9' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts", "create", [], []),
40
+ 'a55e2e2d-6950-488f-9344-ac082aea16e9' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts", "delete", [], []),
41
+ '5b66931a-e1df-4e07-b72f-ac3852eb5ca1' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts", "query", [], []),
42
+ '6f69b7a4-6b09-488c-b5c7-900d4d80f06e' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts", "create", [], []),
43
43
 
44
44
  }
45
45
 
46
46
  protected
47
47
 
48
- def self.getOperationConfig(uuid)
49
- if @__store.key?(uuid)
50
- return @__store[uuid]
48
+ def self.getOperationConfig(operationUUID)
49
+ if @__store.key?(operationUUID)
50
+ return @__store[operationUUID]
51
51
  end
52
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
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("8307f215-af2d-4bbf-a12d-69e4e0b02067", mapObj)
86
+ return self.execute("a55e2e2d-6950-488f-9344-ac082aea16e9", 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("8307f215-af2d-4bbf-a12d-69e4e0b02067", self)
99
+ return self.class.execute("a55e2e2d-6950-488f-9344-ac082aea16e9", 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("eb3d8f9f-085a-4002-98e7-0fda9f52f5ff",Alerts.new(criteria))
118
+ return self.execute("5b66931a-e1df-4e07-b72f-ac3852eb5ca1",Alerts.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 [Alerts] of the response of created instance.
128
128
  #@raise [APIException] an exception from the response status
129
- return self.execute("209ab3d3-c9da-44f5-9d7a-c0eb22d53fb9", Alerts.new(mapObj))
129
+ return self.execute("6f69b7a4-6b09-488c-b5c7-900d4d80f06e", Alerts.new(mapObj))
130
130
  end
131
131
 
132
132
 
@@ -37,23 +37,23 @@ module MasterCard
37
37
  #
38
38
 
39
39
  @__store = {
40
- '27e3b26a-7818-4153-aff9-a3d5b66f591a' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/transactionamount", "delete", [], []),
41
- '3eacb232-5fbc-4130-bd9f-f5ec70414980' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/transactionamount", "query", [], []),
42
- '540b1cf7-e6b2-48c4-9ffa-353d9913d000' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/transactionamount", "create", [], []),
40
+ '6ce760a7-0f38-4780-8f7f-fd089f5200d9' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/transactionamount", "delete", [], []),
41
+ '5a32e394-64b3-407c-8598-d48ef4848fc8' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/transactionamount", "query", [], []),
42
+ '38990348-8afb-44da-b4a2-f01011a70938' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/transactionamount", "create", [], []),
43
43
 
44
44
  }
45
45
 
46
46
  protected
47
47
 
48
- def self.getOperationConfig(uuid)
49
- if @__store.key?(uuid)
50
- return @__store[uuid]
48
+ def self.getOperationConfig(operationUUID)
49
+ if @__store.key?(operationUUID)
50
+ return @__store[operationUUID]
51
51
  end
52
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
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("27e3b26a-7818-4153-aff9-a3d5b66f591a", mapObj)
86
+ return self.execute("6ce760a7-0f38-4780-8f7f-fd089f5200d9", 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("27e3b26a-7818-4153-aff9-a3d5b66f591a", self)
99
+ return self.class.execute("6ce760a7-0f38-4780-8f7f-fd089f5200d9", 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("3eacb232-5fbc-4130-bd9f-f5ec70414980",Amount.new(criteria))
118
+ return self.execute("5a32e394-64b3-407c-8598-d48ef4848fc8",Amount.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 [Amount] of the response of created instance.
128
128
  #@raise [APIException] an exception from the response status
129
- return self.execute("540b1cf7-e6b2-48c4-9ffa-353d9913d000", Amount.new(mapObj))
129
+ return self.execute("38990348-8afb-44da-b4a2-f01011a70938", Amount.new(mapObj))
130
130
  end
131
131
 
132
132
 
@@ -37,23 +37,23 @@ module MasterCard
37
37
  #
38
38
 
39
39
  @__store = {
40
- '00cff725-21c0-4f34-8d18-cead0722a7df' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/transactionamount", "create", [], []),
41
- '0900e30d-ed5b-4d72-bc12-9fbbcaad3976' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/transactionamount", "delete", [], []),
42
- '969fe2b1-fcfb-491f-953c-81b19789f69b' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/transactionamount", "query", [], []),
40
+ '41d6daf7-2dd3-4e1c-8bee-69a47760d474' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/transactionamount", "create", [], []),
41
+ '6e698f92-5ae6-46f8-8234-8492e107f896' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/transactionamount", "delete", [], []),
42
+ '4ac4e8c0-21e2-4174-957d-3d39ba5e1dd9' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/declines/transactionamount", "query", [], []),
43
43
 
44
44
  }
45
45
 
46
46
  protected
47
47
 
48
- def self.getOperationConfig(uuid)
49
- if @__store.key?(uuid)
50
- return @__store[uuid]
48
+ def self.getOperationConfig(operationUUID)
49
+ if @__store.key?(operationUUID)
50
+ return @__store[operationUUID]
51
51
  end
52
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
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
@@ -66,7 +66,7 @@ module MasterCard
66
66
  #@param Dict mapObj, containing the required parameters to create a new object
67
67
  #@return [Amountdecline] of the response of created instance.
68
68
  #@raise [APIException] an exception from the response status
69
- return self.execute("00cff725-21c0-4f34-8d18-cead0722a7df", Amountdecline.new(mapObj))
69
+ return self.execute("41d6daf7-2dd3-4e1c-8bee-69a47760d474", Amountdecline.new(mapObj))
70
70
  end
71
71
 
72
72
 
@@ -99,7 +99,7 @@ module MasterCard
99
99
  end
100
100
  end
101
101
 
102
- return self.execute("0900e30d-ed5b-4d72-bc12-9fbbcaad3976", mapObj)
102
+ return self.execute("6e698f92-5ae6-46f8-8234-8492e107f896", mapObj)
103
103
  end
104
104
 
105
105
 
@@ -112,7 +112,7 @@ module MasterCard
112
112
  #@raise [APIException] an exception from the response status
113
113
  #
114
114
 
115
- return self.class.execute("0900e30d-ed5b-4d72-bc12-9fbbcaad3976", self)
115
+ return self.class.execute("6e698f92-5ae6-46f8-8234-8492e107f896", self)
116
116
  end
117
117
 
118
118
 
@@ -131,7 +131,7 @@ module MasterCard
131
131
  #@raise [APIException] an exception from the response status
132
132
  #
133
133
 
134
- return self.execute("969fe2b1-fcfb-491f-953c-81b19789f69b",Amountdecline.new(criteria))
134
+ return self.execute("4ac4e8c0-21e2-4174-957d-3d39ba5e1dd9",Amountdecline.new(criteria))
135
135
  end
136
136
 
137
137
 
@@ -0,0 +1,116 @@
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 Batch < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '65e1609f-ec0d-417e-8daa-49ec76201fb2' => OperationConfig.new("/issuer/spendcontrols/v1/controls/batch", "create", [], []),
41
+ '8d228454-399e-4096-810d-6fa3f52f728f' => OperationConfig.new("/issuer/spendcontrols/v1/controls/batch/{batchId}", "read", [], []),
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())
56
+ end
57
+
58
+ public
59
+
60
+
61
+ def self.create(mapObj)
62
+ #
63
+ #Creates object of type Batch
64
+ #
65
+ #@param Dict mapObj, containing the required parameters to create a new object
66
+ #@return [Batch] of the response of created instance.
67
+ #@raise [APIException] an exception from the response status
68
+ return self.execute("65e1609f-ec0d-417e-8daa-49ec76201fb2", Batch.new(mapObj))
69
+ end
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ def self.read(id, criteria = nil)
82
+ #
83
+ #Returns objects of type Batch by id and optional criteria
84
+ #@param [String] id
85
+ #@param [Dict] criteria
86
+ #@return [Batch] object representing the response
87
+ #@raise [APIException] an exception from the response status
88
+
89
+ mapObj = Batch.new
90
+ if !(id.nil? || id.to_s.empty?)
91
+ mapObj.set("id", id)
92
+ end
93
+ if !criteria.nil?
94
+ if criteria.instance_of? RequestMap
95
+ mapObj.setAll(criteria.getObject())
96
+ else
97
+ mapObj.setAll(criteria)
98
+ end
99
+ end
100
+
101
+ return self.execute("8d228454-399e-4096-810d-6fa3f52f728f",Batch.new(mapObj))
102
+ end
103
+
104
+
105
+
106
+ end
107
+ end
108
+ end
109
+ end
110
+
111
+
112
+
113
+
114
+
115
+
116
+
@@ -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 Budgetalert < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ '025159c2-23d9-4c1e-b844-f736905d9cab' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/budgets", "query", [], []),
41
+ '4fbbb9bd-1e29-43f5-87a2-13d2251479af' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/budgets", "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())
56
+ end
57
+
58
+ public
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ def self.query(criteria)
67
+ #
68
+ #Query objects of type Budgetalert by id and optional criteria
69
+ #@param [Dict] criteria
70
+ #@return [Budgetalert] object representing the response.
71
+ #@raise [APIException] an exception from the response status
72
+ #
73
+
74
+ return self.execute("025159c2-23d9-4c1e-b844-f736905d9cab",Budgetalert.new(criteria))
75
+ end
76
+
77
+
78
+ def self.create(mapObj)
79
+ #
80
+ #Creates object of type Budgetalert
81
+ #
82
+ #@param Dict mapObj, containing the required parameters to create a new object
83
+ #@return [Budgetalert] of the response of created instance.
84
+ #@raise [APIException] an exception from the response status
85
+ return self.execute("4fbbb9bd-1e29-43f5-87a2-13d2251479af", Budgetalert.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 BudgetalertwithbudgetId < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
38
+
39
+ @__store = {
40
+ 'e032a883-0d0b-4525-b949-ae050b40917b' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/budgets/{budgetId}", "delete", [], []),
41
+ 'b01f515c-dadf-4b46-82d5-1808e855435e' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/budgets/{budgetId}", "read", [], []),
42
+ '996ec79c-b777-45e0-b0ec-8297d46963c4' => OperationConfig.new("/issuer/spendcontrols/v1/card/{uuid}/controls/alerts/budgets/{budgetId}", "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 BudgetalertwithbudgetId by id
67
+
68
+ #@param [String] id
69
+ #@param [Dict] map, containing additional parameters
70
+ #@return [BudgetalertwithbudgetId] of the response of the deleted instance.
71
+ #@raise [APIException] an exception from the response status
72
+
73
+
74
+ mapObj = BudgetalertwithbudgetId.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("e032a883-0d0b-4525-b949-ae050b40917b", mapObj)
87
+ end
88
+
89
+
90
+ def delete
91
+ #
92
+ #Delete object of type BudgetalertwithbudgetId
93
+
94
+ #@param [String] id
95
+ #@return [BudgetalertwithbudgetId] of the response of the deleted instance.
96
+ #@raise [APIException] an exception from the response status
97
+ #
98
+
99
+ return self.class.execute("e032a883-0d0b-4525-b949-ae050b40917b", self)
100
+ end
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+ def self.read(id, criteria = nil)
110
+ #
111
+ #Returns objects of type BudgetalertwithbudgetId by id and optional criteria
112
+ #@param [String] id
113
+ #@param [Dict] criteria
114
+ #@return [BudgetalertwithbudgetId] object representing the response
115
+ #@raise [APIException] an exception from the response status
116
+
117
+ mapObj = BudgetalertwithbudgetId.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("b01f515c-dadf-4b46-82d5-1808e855435e",BudgetalertwithbudgetId.new(mapObj))
130
+ end
131
+
132
+
133
+
134
+ def self.create(mapObj)
135
+ #
136
+ #Creates object of type BudgetalertwithbudgetId
137
+ #
138
+ #@param Dict mapObj, containing the required parameters to create a new object
139
+ #@return [BudgetalertwithbudgetId] of the response of created instance.
140
+ #@raise [APIException] an exception from the response status
141
+ return self.execute("996ec79c-b777-45e0-b0ec-8297d46963c4", BudgetalertwithbudgetId.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
+