mastercard_disbursements 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mastercard/api/disbursements/accountinfo.rb +35 -31
- data/lib/mastercard/api/disbursements/accountverification.rb +35 -32
- data/lib/mastercard/api/disbursements/consumer.rb +120 -107
- data/lib/mastercard/api/disbursements/consumeraccount.rb +109 -97
- data/lib/mastercard/api/disbursements/consumercontactid.rb +109 -97
- data/lib/mastercard/api/disbursements/consumergovernmentid.rb +109 -97
- data/lib/mastercard/api/disbursements/disbursement.rb +68 -61
- data/lib/mastercard/api/disbursements/{skdconfig.rb → resourceconfig.rb} +70 -22
- data/lib/mastercard/api/disbursements/sanctionscreening.rb +35 -31
- data/lib/mastercard_disbursements.rb +8 -6
- metadata +7 -7
@@ -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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
module API
|
34
|
+
module Disbursements
|
35
|
+
class ConsumerAccount < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
@__store = {
|
40
|
+
'8cd0a6ea-c91d-4a04-999e-5ffb385c6dce' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "create", [], []),
|
41
|
+
'9eaddcd7-7da6-4b89-84a3-afc68011d43f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "delete", [], []),
|
42
|
+
'af0e8c6a-7004-4ca4-9a84-be841d40267a' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "read", [], []),
|
43
|
+
'71f00d03-b746-445a-8573-03dd8d7721eb' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "query", [], ["ref"]),
|
44
|
+
'394a7807-b3dd-47a2-8b01-706a68e64361' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "update", [], []),
|
45
|
+
|
46
|
+
}
|
46
47
|
|
47
|
-
|
48
|
+
protected
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
57
|
+
def self.getOperationMetadata()
|
58
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
59
|
+
end
|
59
60
|
|
60
|
-
|
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("8cd0a6ea-c91d-4a04-999e-5ffb385c6dce", 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("af202426-accc-4464-a9d7-407b78febb5c",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("d8605479-6d22-47e2-b627-7c414e5d3f8f", 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("9eaddcd7-7da6-4b89-84a3-afc68011d43f", mapObj)
|
105
|
+
end
|
94
106
|
|
95
107
|
|
96
|
-
|
97
|
-
|
98
|
-
|
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
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
-
|
116
|
-
|
117
|
+
return self.class.execute("9eaddcd7-7da6-4b89-84a3-afc68011d43f", 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("52110807-e8e7-4ea3-b426-b5f788b67da4",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("af0e8c6a-7004-4ca4-9a84-be841d40267a",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("c44432ea-31ce-4805-bfef-1b876a35e94b", mapObj)
|
158
|
-
end
|
159
155
|
|
160
156
|
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
|
166
|
-
|
167
|
-
#
|
165
|
+
return self.execute("71f00d03-b746-445a-8573-03dd8d7721eb",ConsumerAccount.new(criteria))
|
166
|
+
end
|
168
167
|
|
169
|
-
return self.class.execute("c44432ea-31ce-4805-bfef-1b876a35e94b", 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("394a7807-b3dd-47a2-8b01-706a68e64361",self)
|
178
|
+
end
|
173
179
|
|
174
|
-
|
175
|
-
|
176
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
module API
|
34
|
+
module Disbursements
|
35
|
+
class ConsumerContactID < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
37
38
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
@__store = {
|
40
|
+
'a79a7108-2aaa-49ec-a1fc-522692aa26fa' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "create", [], []),
|
41
|
+
'9a725e0f-7d57-48d6-81b7-b93adb5e892f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "delete", [], []),
|
42
|
+
'a6479c2b-125c-45cb-a9f7-cdc7036aa684' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "read", [], []),
|
43
|
+
'dfbec1bd-8c95-4f8a-a16c-c206183c3303' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids", "query", [], []),
|
44
|
+
'cb653a60-ee8a-40ce-9a39-04b25451103d' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/contact_ids/{contactId}", "update", [], []),
|
45
|
+
|
46
|
+
}
|
46
47
|
|
47
|
-
|
48
|
+
protected
|
48
49
|
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
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
|
-
|
57
|
-
|
58
|
-
|
57
|
+
def self.getOperationMetadata()
|
58
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext())
|
59
|
+
end
|
59
60
|
|
60
|
-
|
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("a79a7108-2aaa-49ec-a1fc-522692aa26fa", 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("f938bb7a-30f2-48a8-8db1-57e8f9b4cc86",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("a4e95dbf-20f1-4abe-9f63-ac49cf213db5", 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("9a725e0f-7d57-48d6-81b7-b93adb5e892f", mapObj)
|
105
|
+
end
|
94
106
|
|
95
107
|
|
96
|
-
|
97
|
-
|
98
|
-
|
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
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
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
|
-
|
116
|
-
|
117
|
+
return self.class.execute("9a725e0f-7d57-48d6-81b7-b93adb5e892f", 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("23c91eec-7002-484b-b80b-b4927ad7e4f3",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("a6479c2b-125c-45cb-a9f7-cdc7036aa684",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("205356a7-5e50-480c-a6f4-384c078648eb", mapObj)
|
158
|
-
end
|
159
155
|
|
160
156
|
|
161
|
-
|
162
|
-
|
163
|
-
|
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
|
-
|
166
|
-
|
167
|
-
#
|
165
|
+
return self.execute("dfbec1bd-8c95-4f8a-a16c-c206183c3303",ConsumerContactID.new(criteria))
|
166
|
+
end
|
168
167
|
|
169
|
-
return self.class.execute("205356a7-5e50-480c-a6f4-384c078648eb", 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("cb653a60-ee8a-40ce-9a39-04b25451103d",self)
|
178
|
+
end
|
173
179
|
|
174
|
-
|
175
|
-
|
176
|
-
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
177
189
|
end
|
178
190
|
|
179
191
|
|