mastercard_spendalerts 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c65d4ca41e299e7df938e4c55366b0f3e1a3328d
4
- data.tar.gz: cc2afe5dbd4e724b0ed17b268f76ddf15f355372
3
+ metadata.gz: b0814c77148322af1c86337a5c0d6c30f7bdb255
4
+ data.tar.gz: 73638d31e96256ebeac41aad5673ea6f8be2daad
5
5
  SHA512:
6
- metadata.gz: f0c5a9b833b4c1eb49f342f40cad6176bfa605d682ef3d11db155b58071e42255d6e31eb7faebbc746d8b30313f9228f780d0ab497e42379092db0ebc4e30fbc
7
- data.tar.gz: 334d13d6a741b6f11c3c64ba3645a5fb7b98c2b7998bd92545cf8d137e4c2365acb0ce8af896dcc3cd4ce0533850e7ddc1d418fb2b6ed8e32179152f00cbfbd7
6
+ metadata.gz: 693a7ee779ff82d05be3305bda0c9023dbeeb226bd9d3a1960ef1e2ae115b5f9242e3de84c6d669bfe9c06dc661dbbc9237dc81d00f69c16dd9e7893a5731af9
7
+ data.tar.gz: 861b23bf4f60e51166111d2756a22ffa26143494fe5eaa4a546bca35c40a6dd85f49439d412b17887491a2837a9a15f142e7136d211fe527e1e21a977239c8aa
@@ -27,109 +27,117 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module Spendalerts
34
- class Alerts < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module Spendalerts
35
+ class Alerts < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- 'bd46aee9-cf02-478e-9ae1-aed8578078bf' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts", "query", [], []),
40
- '69b07938-54af-452e-8d28-2ffb9ca9aec1' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts", "create", [], []),
41
- '1ce3ca58-0bc0-4db8-9393-5521ca051198' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts", "delete", [], []),
42
-
43
- }
39
+ @__store = {
40
+ '377f4be1-43aa-4450-97cd-feb541b9faa8' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts", "delete", [], []),
41
+ 'ab21542c-4d27-4785-87cb-26f37dd8c349' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts", "query", [], []),
42
+ 'dce4fa8c-6aef-402d-a52e-4fc9857180b9' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts", "create", [], []),
43
+
44
+ }
44
45
 
45
- protected
46
+ protected
46
47
 
47
- def self.getOperationConfig(uuid)
48
- if @__store.key?(uuid)
49
- return @__store[uuid]
50
- end
51
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
- end
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
53
54
 
54
- def self.getOperationMetadata()
55
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
56
- end
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
57
+ end
57
58
 
58
- public
59
+ public
59
60
 
60
61
 
61
62
 
62
63
 
63
64
 
65
+ def self.deleteById(id, map = nil)
66
+ #Delete object of type Alerts by id
64
67
 
65
- def self.query(criteria)
66
- #
67
- #Query objects of type Alerts by id and optional criteria
68
- #@param type criteria
69
- #@return Alerts object representing the response.
70
- #
68
+ #@param [String] id
69
+ #@param [Dict] map, containing additional parameters
70
+ #@return [Alerts] of the response of the deleted instance.
71
+ #@raise [APIException] an exception from the response status
71
72
 
72
- return self.execute("bd46aee9-cf02-478e-9ae1-aed8578078bf",Alerts.new(criteria))
73
- end
74
73
 
75
- def self.create(mapObj)
76
- #
77
- #Creates object of type Alerts
78
- #
79
- #@param Dict mapObj, containing the required parameters to create a new object
80
- #@return Alerts of the response of created instance.
81
- #
82
- return self.execute("69b07938-54af-452e-8d28-2ffb9ca9aec1", Alerts.new(mapObj))
83
- end
74
+ mapObj = Alerts.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
84
85
 
86
+ return self.execute("377f4be1-43aa-4450-97cd-feb541b9faa8", mapObj)
87
+ end
85
88
 
86
89
 
90
+ def delete
91
+ #
92
+ #Delete object of type Alerts
87
93
 
94
+ #@param [String] id
95
+ #@return [Alerts] of the response of the deleted instance.
96
+ #@raise [APIException] an exception from the response status
97
+ #
88
98
 
99
+ return self.class.execute("377f4be1-43aa-4450-97cd-feb541b9faa8", self)
100
+ end
89
101
 
90
102
 
91
103
 
92
104
 
93
- def self.deleteById(id, map = nil)
94
- #Delete object of type Alerts by id
95
105
 
96
- #@param str id
97
- #@param Dict map, containing additional parameters
98
- #@return Alerts of the response of the deleted instance.
99
106
 
100
107
 
101
- mapObj = Alerts.new
102
- if !(id.nil? || id.to_s.empty?)
103
- mapObj.set("id", id)
104
- end
105
- if !map.nil?
106
- if map.instance_of? RequestMap
107
- mapObj.setAll(map.getObject())
108
- else
109
- mapObj.setAll(map)
110
- end
111
- end
112
108
 
113
- return self.execute("1ce3ca58-0bc0-4db8-9393-5521ca051198", mapObj)
114
- end
115
109
 
110
+ def self.query(criteria)
111
+ #
112
+ #Query objects of type Alerts by id and optional criteria
113
+ #@param [Dict] criteria
114
+ #@return [Alerts] object representing the response.
115
+ #@raise [APIException] an exception from the response status
116
+ #
116
117
 
117
- def delete
118
- #
119
- #Delete object of type Alerts
118
+ return self.execute("ab21542c-4d27-4785-87cb-26f37dd8c349",Alerts.new(criteria))
119
+ end
120
120
 
121
- #@param str id
122
- #@return Alerts of the response of the deleted instance.
123
- #
124
121
 
125
- return self.class.execute("1ce3ca58-0bc0-4db8-9393-5521ca051198", self)
126
- end
122
+ def self.create(mapObj)
123
+ #
124
+ #Creates object of type Alerts
125
+ #
126
+ #@param Dict mapObj, containing the required parameters to create a new object
127
+ #@return [Alerts] of the response of created instance.
128
+ #@raise [APIException] an exception from the response status
129
+ return self.execute("dce4fa8c-6aef-402d-a52e-4fc9857180b9", Alerts.new(mapObj))
130
+ end
127
131
 
128
132
 
129
133
 
130
- end
131
- end
132
- end
134
+
135
+
136
+
137
+
138
+ end
139
+ end
140
+ end
133
141
  end
134
142
 
135
143
 
@@ -27,109 +27,117 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module Spendalerts
34
- class Amount < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module Spendalerts
35
+ class Amount < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- 'b535df10-7629-4dbd-a1c3-8eb7c7d888be' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/transactionamount", "query", [], []),
40
- '84ed20a2-41b5-44d9-9962-bc2dc7a59920' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/transactionamount", "create", [], []),
41
- '85938e99-920f-4745-bbcc-40fca423405a' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/transactionamount", "delete", [], []),
42
-
43
- }
39
+ @__store = {
40
+ '51296ea5-1918-4887-a8ad-1cf19ce1a827' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/transactionamount", "delete", [], []),
41
+ '2b91695f-8375-4331-9f5c-8c2edb4eff85' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/transactionamount", "query", [], []),
42
+ 'd8cc903d-0493-4127-bef0-4df0c6999839' => OperationConfig.new("/issuer/v1/card/{uuid}/controls/alerts/transactionamount", "create", [], []),
43
+
44
+ }
44
45
 
45
- protected
46
+ protected
46
47
 
47
- def self.getOperationConfig(uuid)
48
- if @__store.key?(uuid)
49
- return @__store[uuid]
50
- end
51
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
- end
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
53
54
 
54
- def self.getOperationMetadata()
55
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
56
- end
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
57
+ end
57
58
 
58
- public
59
+ public
59
60
 
60
61
 
61
62
 
62
63
 
63
64
 
65
+ def self.deleteById(id, map = nil)
66
+ #Delete object of type Amount by id
64
67
 
65
- def self.query(criteria)
66
- #
67
- #Query objects of type Amount by id and optional criteria
68
- #@param type criteria
69
- #@return Amount object representing the response.
70
- #
68
+ #@param [String] id
69
+ #@param [Dict] map, containing additional parameters
70
+ #@return [Amount] of the response of the deleted instance.
71
+ #@raise [APIException] an exception from the response status
71
72
 
72
- return self.execute("b535df10-7629-4dbd-a1c3-8eb7c7d888be",Amount.new(criteria))
73
- end
74
73
 
75
- def self.create(mapObj)
76
- #
77
- #Creates object of type Amount
78
- #
79
- #@param Dict mapObj, containing the required parameters to create a new object
80
- #@return Amount of the response of created instance.
81
- #
82
- return self.execute("84ed20a2-41b5-44d9-9962-bc2dc7a59920", Amount.new(mapObj))
83
- end
74
+ mapObj = Amount.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
84
85
 
86
+ return self.execute("51296ea5-1918-4887-a8ad-1cf19ce1a827", mapObj)
87
+ end
85
88
 
86
89
 
90
+ def delete
91
+ #
92
+ #Delete object of type Amount
87
93
 
94
+ #@param [String] id
95
+ #@return [Amount] of the response of the deleted instance.
96
+ #@raise [APIException] an exception from the response status
97
+ #
88
98
 
99
+ return self.class.execute("51296ea5-1918-4887-a8ad-1cf19ce1a827", self)
100
+ end
89
101
 
90
102
 
91
103
 
92
104
 
93
- def self.deleteById(id, map = nil)
94
- #Delete object of type Amount by id
95
105
 
96
- #@param str id
97
- #@param Dict map, containing additional parameters
98
- #@return Amount of the response of the deleted instance.
99
106
 
100
107
 
101
- mapObj = Amount.new
102
- if !(id.nil? || id.to_s.empty?)
103
- mapObj.set("id", id)
104
- end
105
- if !map.nil?
106
- if map.instance_of? RequestMap
107
- mapObj.setAll(map.getObject())
108
- else
109
- mapObj.setAll(map)
110
- end
111
- end
112
108
 
113
- return self.execute("85938e99-920f-4745-bbcc-40fca423405a", mapObj)
114
- end
115
109
 
110
+ def self.query(criteria)
111
+ #
112
+ #Query objects of type Amount by id and optional criteria
113
+ #@param [Dict] criteria
114
+ #@return [Amount] object representing the response.
115
+ #@raise [APIException] an exception from the response status
116
+ #
116
117
 
117
- def delete
118
- #
119
- #Delete object of type Amount
118
+ return self.execute("2b91695f-8375-4331-9f5c-8c2edb4eff85",Amount.new(criteria))
119
+ end
120
120
 
121
- #@param str id
122
- #@return Amount of the response of the deleted instance.
123
- #
124
121
 
125
- return self.class.execute("85938e99-920f-4745-bbcc-40fca423405a", self)
126
- end
122
+ def self.create(mapObj)
123
+ #
124
+ #Creates object of type Amount
125
+ #
126
+ #@param Dict mapObj, containing the required parameters to create a new object
127
+ #@return [Amount] of the response of created instance.
128
+ #@raise [APIException] an exception from the response status
129
+ return self.execute("d8cc903d-0493-4127-bef0-4df0c6999839", Amount.new(mapObj))
130
+ end
127
131
 
128
132
 
129
133
 
130
- end
131
- end
132
- end
134
+
135
+
136
+
137
+
138
+ end
139
+ end
140
+ end
133
141
  end
134
142
 
135
143
 
@@ -27,109 +27,116 @@
27
27
 
28
28
 
29
29
  require "mastercard/core/model"
30
+ require "mastercard/core/baseobject"
30
31
 
31
32
  module MasterCard
32
- module API
33
- module Spendalerts
34
- class Card < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module Spendalerts
35
+ class Card < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '918f0882-175c-4642-a28b-05bd31d9ee83' => OperationConfig.new("/issuer/v1/card", "create", [], []),
40
- 'd93e1104-7d82-4436-8fa5-d022479b6fa4' => OperationConfig.new("/issuer/v1/card/{uuid}", "create", [], []),
41
- '1a6ac9f5-255b-4216-bbf7-78f667fd6c01' => OperationConfig.new("/issuer/v1/card/{uuid}", "delete", [], []),
42
-
43
- }
39
+ @__store = {
40
+ '93c7001b-8973-45fe-b202-10a472a7c7cf' => OperationConfig.new("/issuer/v1/card", "create", [], []),
41
+ 'a781c829-b018-4759-8dc0-67f2a73a1db0' => OperationConfig.new("/issuer/v1/card/{uuid}", "delete", [], []),
42
+ '04621994-24c9-458e-844e-5269549b9a07' => OperationConfig.new("/issuer/v1/card/{uuid}", "create", [], []),
43
+
44
+ }
44
45
 
45
- protected
46
+ protected
46
47
 
47
- def self.getOperationConfig(uuid)
48
- if @__store.key?(uuid)
49
- return @__store[uuid]
50
- end
51
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
52
- end
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
53
54
 
54
- def self.getOperationMetadata()
55
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
56
- end
55
+ def self.getOperationMetadata()
56
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
57
+ end
57
58
 
58
- public
59
+ public
59
60
 
60
- def self.create(mapObj)
61
- #
62
- #Creates object of type Card
63
- #
64
- #@param Dict mapObj, containing the required parameters to create a new object
65
- #@return Card of the response of created instance.
66
- #
67
- return self.execute("918f0882-175c-4642-a28b-05bd31d9ee83", Card.new(mapObj))
68
- end
69
61
 
62
+ def self.create(mapObj)
63
+ #
64
+ #Creates object of type Card
65
+ #
66
+ #@param Dict mapObj, containing the required parameters to create a new object
67
+ #@return [Card] of the response of created instance.
68
+ #@raise [APIException] an exception from the response status
69
+ return self.execute("93c7001b-8973-45fe-b202-10a472a7c7cf", Card.new(mapObj))
70
+ end
70
71
 
71
72
 
72
73
 
73
74
 
74
75
 
75
- def self.update(mapObj)
76
- #
77
- #Creates object of type Card
78
- #
79
- #@param Dict mapObj, containing the required parameters to create a new object
80
- #@return Card of the response of created instance.
81
- #
82
- return self.execute("d93e1104-7d82-4436-8fa5-d022479b6fa4", Card.new(mapObj))
83
- end
84
76
 
85
77
 
86
78
 
87
79
 
88
80
 
81
+ def self.deleteById(id, map = nil)
82
+ #Delete object of type Card by id
89
83
 
84
+ #@param [String] id
85
+ #@param [Dict] map, containing additional parameters
86
+ #@return [Card] of the response of the deleted instance.
87
+ #@raise [APIException] an exception from the response status
90
88
 
91
89
 
90
+ mapObj = Card.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
92
101
 
93
- def self.deleteById(id, map = nil)
94
- #Delete object of type Card by id
102
+ return self.execute("a781c829-b018-4759-8dc0-67f2a73a1db0", mapObj)
103
+ end
95
104
 
96
- #@param str id
97
- #@param Dict map, containing additional parameters
98
- #@return Card of the response of the deleted instance.
99
105
 
106
+ def delete
107
+ #
108
+ #Delete object of type Card
100
109
 
101
- mapObj = Card.new
102
- if !(id.nil? || id.to_s.empty?)
103
- mapObj.set("id", id)
104
- end
105
- if !map.nil?
106
- if map.instance_of? RequestMap
107
- mapObj.setAll(map.getObject())
108
- else
109
- mapObj.setAll(map)
110
- end
111
- end
110
+ #@param [String] id
111
+ #@return [Card] of the response of the deleted instance.
112
+ #@raise [APIException] an exception from the response status
113
+ #
112
114
 
113
- return self.execute("1a6ac9f5-255b-4216-bbf7-78f667fd6c01", mapObj)
114
- end
115
+ return self.class.execute("a781c829-b018-4759-8dc0-67f2a73a1db0", self)
116
+ end
115
117
 
116
118
 
117
- def delete
118
- #
119
- #Delete object of type Card
120
119
 
121
- #@param str id
122
- #@return Card of the response of the deleted instance.
123
- #
124
120
 
125
- return self.class.execute("1a6ac9f5-255b-4216-bbf7-78f667fd6c01", self)
126
- end
121
+ def self.update(mapObj)
122
+ #
123
+ #Creates object of type Card
124
+ #
125
+ #@param Dict mapObj, containing the required parameters to create a new object
126
+ #@return [Card] of the response of created instance.
127
+ #@raise [APIException] an exception from the response status
128
+ return self.execute("04621994-24c9-458e-844e-5269549b9a07", Card.new(mapObj))
129
+ end
127
130
 
128
131
 
129
132
 
130
- end
131
- end
132
- end
133
+
134
+
135
+
136
+
137
+ end
138
+ end
139
+ end
133
140
  end
134
141
 
135
142