mastercard_p2p 1.0.1 → 1.0.2

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.
@@ -27,153 +27,165 @@
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 P2p
34
- class ConsumerAccount < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module P2p
35
+ class ConsumerAccount < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- '38606076-1a9b-455c-a525-892d3a29e5cb' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "query", [], ["ref"]),
40
- 'ad30d126-530a-493b-b2c3-83005b749ddc' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "create", [], []),
41
- 'df5bf6b1-2a71-4341-a0ff-a34064ffc7d6' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "read", [], []),
42
- 'b43956b9-01f1-48ca-a4f0-6af29b7370e3' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "update", [], []),
43
- 'f9a9c285-3b75-4174-944f-dd78a4e20349' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "delete", [], []),
44
-
45
- }
39
+ @__store = {
40
+ 'db8abe07-5a1c-4b11-a402-09f9538fe388' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "create", [], []),
41
+ '32f122e6-70c6-4878-a9e5-c37903d8e3f9' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "delete", [], []),
42
+ 'a0ccac81-1f8d-48e7-a5a2-60a4e94648dc' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "read", [], []),
43
+ 'f0fcc101-f6c0-4b14-b0e7-526682ae427f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "query", [], ["ref"]),
44
+ '1672c634-aaf2-48f6-9709-f30c88efdfc9' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "update", [], []),
45
+
46
+ }
46
47
 
47
- protected
48
+ protected
48
49
 
49
- def self.getOperationConfig(uuid)
50
- if @__store.key?(uuid)
51
- return @__store[uuid]
52
- end
53
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
54
- end
50
+ def self.getOperationConfig(uuid)
51
+ if @__store.key?(uuid)
52
+ return @__store[uuid]
53
+ end
54
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
55
+ end
55
56
 
56
- def self.getOperationMetadata()
57
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
58
- end
57
+ def self.getOperationMetadata()
58
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
59
+ end
59
60
 
60
- public
61
+ public
61
62
 
62
63
 
64
+ def self.create(mapObj)
65
+ #
66
+ #Creates object of type ConsumerAccount
67
+ #
68
+ #@param Dict mapObj, containing the required parameters to create a new object
69
+ #@return [ConsumerAccount] of the response of created instance.
70
+ #@raise [APIException] an exception from the response status
71
+ return self.execute("db8abe07-5a1c-4b11-a402-09f9538fe388", ConsumerAccount.new(mapObj))
72
+ end
63
73
 
64
74
 
65
75
 
66
76
 
67
- def self.listAll(criteria)
68
- #
69
- #Query objects of type ConsumerAccount by id and optional criteria
70
- #@param type criteria
71
- #@return ConsumerAccount object representing the response.
72
- #
73
77
 
74
- return self.execute("38606076-1a9b-455c-a525-892d3a29e5cb",ConsumerAccount.new(criteria))
75
- end
76
78
 
77
- def self.create(mapObj)
78
- #
79
- #Creates object of type ConsumerAccount
80
- #
81
- #@param Dict mapObj, containing the required parameters to create a new object
82
- #@return ConsumerAccount of the response of created instance.
83
- #
84
- return self.execute("ad30d126-530a-493b-b2c3-83005b749ddc", ConsumerAccount.new(mapObj))
85
- end
86
79
 
87
80
 
88
81
 
89
82
 
83
+ def self.deleteById(id, map = nil)
84
+ #Delete object of type ConsumerAccount by id
90
85
 
86
+ #@param [String] id
87
+ #@param [Dict] map, containing additional parameters
88
+ #@return [ConsumerAccount] of the response of the deleted instance.
89
+ #@raise [APIException] an exception from the response status
91
90
 
92
91
 
92
+ mapObj = ConsumerAccount.new
93
+ if !(id.nil? || id.to_s.empty?)
94
+ mapObj.set("id", id)
95
+ end
96
+ if !map.nil?
97
+ if map.instance_of? RequestMap
98
+ mapObj.setAll(map.getObject())
99
+ else
100
+ mapObj.setAll(map)
101
+ end
102
+ end
93
103
 
104
+ return self.execute("32f122e6-70c6-4878-a9e5-c37903d8e3f9", mapObj)
105
+ end
94
106
 
95
107
 
96
- def self.readByID(id, criteria = nil)
97
- #
98
- #Returns objects of type ConsumerAccount by id and optional criteria
99
- #@param str id
100
- #@param dict criteria
101
- #@return instance of ConsumerAccount
108
+ def delete
109
+ #
110
+ #Delete object of type ConsumerAccount
102
111
 
103
- mapObj = ConsumerAccount.new
104
- if !(id.nil? || id.to_s.empty?)
105
- mapObj.set("id", id)
106
- end
107
- if !criteria.nil?
108
- if criteria.instance_of? RequestMap
109
- mapObj.setAll(criteria.getObject())
110
- else
111
- mapObj.setAll(criteria)
112
- end
113
- end
112
+ #@param [String] id
113
+ #@return [ConsumerAccount] of the response of the deleted instance.
114
+ #@raise [APIException] an exception from the response status
115
+ #
114
116
 
115
- return self.execute("df5bf6b1-2a71-4341-a0ff-a34064ffc7d6",ConsumerAccount.new(mapObj))
116
- end
117
+ return self.class.execute("32f122e6-70c6-4878-a9e5-c37903d8e3f9", self)
118
+ end
117
119
 
118
120
 
119
121
 
120
- def update
121
- #
122
- #Updates an object of type ConsumerAccount
123
- #
124
- #@return ConsumerAccount object representing the response.
125
- #
126
- return self.class.execute("b43956b9-01f1-48ca-a4f0-6af29b7370e3",self)
127
- end
128
122
 
129
123
 
130
124
 
131
125
 
132
126
 
127
+ def self.readByID(id, criteria = nil)
128
+ #
129
+ #Returns objects of type ConsumerAccount by id and optional criteria
130
+ #@param [String] id
131
+ #@param [Dict] criteria
132
+ #@return [ConsumerAccount] object representing the response
133
+ #@raise [APIException] an exception from the response status
133
134
 
135
+ mapObj = ConsumerAccount.new
136
+ if !(id.nil? || id.to_s.empty?)
137
+ mapObj.set("id", id)
138
+ end
139
+ if !criteria.nil?
140
+ if criteria.instance_of? RequestMap
141
+ mapObj.setAll(criteria.getObject())
142
+ else
143
+ mapObj.setAll(criteria)
144
+ end
145
+ end
134
146
 
147
+ return self.execute("a0ccac81-1f8d-48e7-a5a2-60a4e94648dc",ConsumerAccount.new(mapObj))
148
+ end
135
149
 
136
150
 
137
- def self.deleteById(id, map = nil)
138
- #Delete object of type ConsumerAccount by id
139
151
 
140
- #@param str id
141
- #@param Dict map, containing additional parameters
142
- #@return ConsumerAccount of the response of the deleted instance.
143
152
 
144
153
 
145
- mapObj = ConsumerAccount.new
146
- if !(id.nil? || id.to_s.empty?)
147
- mapObj.set("id", id)
148
- end
149
- if !map.nil?
150
- if map.instance_of? RequestMap
151
- mapObj.setAll(map.getObject())
152
- else
153
- mapObj.setAll(map)
154
- end
155
- end
156
154
 
157
- return self.execute("f9a9c285-3b75-4174-944f-dd78a4e20349", mapObj)
158
- end
159
155
 
160
156
 
161
- def delete
162
- #
163
- #Delete object of type ConsumerAccount
157
+ def self.listAll(criteria)
158
+ #
159
+ #Query objects of type ConsumerAccount by id and optional criteria
160
+ #@param [Dict] criteria
161
+ #@return [ConsumerAccount] object representing the response.
162
+ #@raise [APIException] an exception from the response status
163
+ #
164
164
 
165
- #@param str id
166
- #@return ConsumerAccount of the response of the deleted instance.
167
- #
165
+ return self.execute("f0fcc101-f6c0-4b14-b0e7-526682ae427f",ConsumerAccount.new(criteria))
166
+ end
168
167
 
169
- return self.class.execute("f9a9c285-3b75-4174-944f-dd78a4e20349", self)
170
- end
171
168
 
172
169
 
170
+ def update
171
+ #
172
+ #Updates an object of type ConsumerAccount
173
+ #
174
+ #@return [ConsumerAccount] object representing the response.
175
+ #@raise [APIException] an exception from the response status
176
+ #
177
+ return self.class.execute("1672c634-aaf2-48f6-9709-f30c88efdfc9",self)
178
+ end
173
179
 
174
- end
175
- end
176
- end
180
+
181
+
182
+
183
+
184
+
185
+
186
+ end
187
+ end
188
+ end
177
189
  end
178
190
 
179
191
 
@@ -27,153 +27,165 @@
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 P2p
34
- class ConsumerContactID < MasterCard::Core::Model::BaseObject
35
- include MasterCard::Core::Model
36
- #
33
+ module API
34
+ module P2p
35
+ class ConsumerContactID < MasterCard::Core::Model::BaseObject
36
+ include MasterCard::Core::Model
37
+ #
37
38
 
38
- @__store = {
39
- 'eaac77eb-dc38-4be6-928d-5feec247e54c' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "query", [], []),
40
- '021ed7f9-55c4-4803-8498-0a65e092c819' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "create", [], []),
41
- '7972218b-2e0e-4da4-b2e0-3b0b0f7afaf9' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "read", [], []),
42
- '74d98545-c94c-4743-9573-a06b03408915' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "update", [], []),
43
- 'a713cbce-5b0e-4783-b0d9-d29fb9876561' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "delete", [], []),
44
-
45
- }
39
+ @__store = {
40
+ 'b05753f2-29fa-46ed-a610-39448052737f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "create", [], []),
41
+ 'a719c0ce-6595-49bd-8e2f-b76f3a3f0437' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "delete", [], []),
42
+ '0807eca8-af54-401d-8db3-bae828d1a863' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "read", [], []),
43
+ '80f9077e-520b-48ae-a751-8b42e7a55818' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "query", [], []),
44
+ 'b9b88de0-48a3-47c8-9ed4-8aaaca0c20cb' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "update", [], []),
45
+
46
+ }
46
47
 
47
- protected
48
+ protected
48
49
 
49
- def self.getOperationConfig(uuid)
50
- if @__store.key?(uuid)
51
- return @__store[uuid]
52
- end
53
- raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
54
- end
50
+ def self.getOperationConfig(uuid)
51
+ if @__store.key?(uuid)
52
+ return @__store[uuid]
53
+ end
54
+ raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
55
+ end
55
56
 
56
- def self.getOperationMetadata()
57
- return OperationMetadata.new(SDKConfig.getVersion(), SDKConfig.getHost())
58
- end
57
+ def self.getOperationMetadata()
58
+ return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
59
+ end
59
60
 
60
- public
61
+ public
61
62
 
62
63
 
64
+ def self.create(mapObj)
65
+ #
66
+ #Creates object of type ConsumerContactID
67
+ #
68
+ #@param Dict mapObj, containing the required parameters to create a new object
69
+ #@return [ConsumerContactID] of the response of created instance.
70
+ #@raise [APIException] an exception from the response status
71
+ return self.execute("b05753f2-29fa-46ed-a610-39448052737f", ConsumerContactID.new(mapObj))
72
+ end
63
73
 
64
74
 
65
75
 
66
76
 
67
- def self.listAll(criteria)
68
- #
69
- #Query objects of type ConsumerContactID by id and optional criteria
70
- #@param type criteria
71
- #@return ConsumerContactID object representing the response.
72
- #
73
77
 
74
- return self.execute("eaac77eb-dc38-4be6-928d-5feec247e54c",ConsumerContactID.new(criteria))
75
- end
76
78
 
77
- def self.create(mapObj)
78
- #
79
- #Creates object of type ConsumerContactID
80
- #
81
- #@param Dict mapObj, containing the required parameters to create a new object
82
- #@return ConsumerContactID of the response of created instance.
83
- #
84
- return self.execute("021ed7f9-55c4-4803-8498-0a65e092c819", ConsumerContactID.new(mapObj))
85
- end
86
79
 
87
80
 
88
81
 
89
82
 
83
+ def self.deleteById(id, map = nil)
84
+ #Delete object of type ConsumerContactID by id
90
85
 
86
+ #@param [String] id
87
+ #@param [Dict] map, containing additional parameters
88
+ #@return [ConsumerContactID] of the response of the deleted instance.
89
+ #@raise [APIException] an exception from the response status
91
90
 
92
91
 
92
+ mapObj = ConsumerContactID.new
93
+ if !(id.nil? || id.to_s.empty?)
94
+ mapObj.set("id", id)
95
+ end
96
+ if !map.nil?
97
+ if map.instance_of? RequestMap
98
+ mapObj.setAll(map.getObject())
99
+ else
100
+ mapObj.setAll(map)
101
+ end
102
+ end
93
103
 
104
+ return self.execute("a719c0ce-6595-49bd-8e2f-b76f3a3f0437", mapObj)
105
+ end
94
106
 
95
107
 
96
- def self.read(id, criteria = nil)
97
- #
98
- #Returns objects of type ConsumerContactID by id and optional criteria
99
- #@param str id
100
- #@param dict criteria
101
- #@return instance of ConsumerContactID
108
+ def delete
109
+ #
110
+ #Delete object of type ConsumerContactID
102
111
 
103
- mapObj = ConsumerContactID.new
104
- if !(id.nil? || id.to_s.empty?)
105
- mapObj.set("id", id)
106
- end
107
- if !criteria.nil?
108
- if criteria.instance_of? RequestMap
109
- mapObj.setAll(criteria.getObject())
110
- else
111
- mapObj.setAll(criteria)
112
- end
113
- end
112
+ #@param [String] id
113
+ #@return [ConsumerContactID] of the response of the deleted instance.
114
+ #@raise [APIException] an exception from the response status
115
+ #
114
116
 
115
- return self.execute("7972218b-2e0e-4da4-b2e0-3b0b0f7afaf9",ConsumerContactID.new(mapObj))
116
- end
117
+ return self.class.execute("a719c0ce-6595-49bd-8e2f-b76f3a3f0437", self)
118
+ end
117
119
 
118
120
 
119
121
 
120
- def update
121
- #
122
- #Updates an object of type ConsumerContactID
123
- #
124
- #@return ConsumerContactID object representing the response.
125
- #
126
- return self.class.execute("74d98545-c94c-4743-9573-a06b03408915",self)
127
- end
128
122
 
129
123
 
130
124
 
131
125
 
132
126
 
127
+ def self.read(id, criteria = nil)
128
+ #
129
+ #Returns objects of type ConsumerContactID by id and optional criteria
130
+ #@param [String] id
131
+ #@param [Dict] criteria
132
+ #@return [ConsumerContactID] object representing the response
133
+ #@raise [APIException] an exception from the response status
133
134
 
135
+ mapObj = ConsumerContactID.new
136
+ if !(id.nil? || id.to_s.empty?)
137
+ mapObj.set("id", id)
138
+ end
139
+ if !criteria.nil?
140
+ if criteria.instance_of? RequestMap
141
+ mapObj.setAll(criteria.getObject())
142
+ else
143
+ mapObj.setAll(criteria)
144
+ end
145
+ end
134
146
 
147
+ return self.execute("0807eca8-af54-401d-8db3-bae828d1a863",ConsumerContactID.new(mapObj))
148
+ end
135
149
 
136
150
 
137
- def self.deleteById(id, map = nil)
138
- #Delete object of type ConsumerContactID by id
139
151
 
140
- #@param str id
141
- #@param Dict map, containing additional parameters
142
- #@return ConsumerContactID of the response of the deleted instance.
143
152
 
144
153
 
145
- mapObj = ConsumerContactID.new
146
- if !(id.nil? || id.to_s.empty?)
147
- mapObj.set("id", id)
148
- end
149
- if !map.nil?
150
- if map.instance_of? RequestMap
151
- mapObj.setAll(map.getObject())
152
- else
153
- mapObj.setAll(map)
154
- end
155
- end
156
154
 
157
- return self.execute("a713cbce-5b0e-4783-b0d9-d29fb9876561", mapObj)
158
- end
159
155
 
160
156
 
161
- def delete
162
- #
163
- #Delete object of type ConsumerContactID
157
+ def self.listAll(criteria)
158
+ #
159
+ #Query objects of type ConsumerContactID by id and optional criteria
160
+ #@param [Dict] criteria
161
+ #@return [ConsumerContactID] object representing the response.
162
+ #@raise [APIException] an exception from the response status
163
+ #
164
164
 
165
- #@param str id
166
- #@return ConsumerContactID of the response of the deleted instance.
167
- #
165
+ return self.execute("80f9077e-520b-48ae-a751-8b42e7a55818",ConsumerContactID.new(criteria))
166
+ end
168
167
 
169
- return self.class.execute("a713cbce-5b0e-4783-b0d9-d29fb9876561", self)
170
- end
171
168
 
172
169
 
170
+ def update
171
+ #
172
+ #Updates an object of type ConsumerContactID
173
+ #
174
+ #@return [ConsumerContactID] object representing the response.
175
+ #@raise [APIException] an exception from the response status
176
+ #
177
+ return self.class.execute("b9b88de0-48a3-47c8-9ed4-8aaaca0c20cb",self)
178
+ end
173
179
 
174
- end
175
- end
176
- end
180
+
181
+
182
+
183
+
184
+
185
+
186
+ end
187
+ end
188
+ end
177
189
  end
178
190
 
179
191