mastercard_disbursements 1.0.3 → 1.0.4
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/accountbalance.rb +105 -0
- data/lib/mastercard/api/disbursements/accountinfo.rb +32 -32
- data/lib/mastercard/api/disbursements/accountmapping.rb +32 -32
- data/lib/mastercard/api/disbursements/accountverification.rb +32 -32
- data/lib/mastercard/api/disbursements/consumer.rb +112 -112
- data/lib/mastercard/api/disbursements/consumeraccount.rb +102 -102
- data/lib/mastercard/api/disbursements/consumercontactid.rb +102 -102
- data/lib/mastercard/api/disbursements/consumergovernmentid.rb +102 -102
- data/lib/mastercard/api/disbursements/disbursement.rb +63 -63
- data/lib/mastercard/api/disbursements/resourceconfig.rb +54 -54
- data/lib/mastercard/api/disbursements/sanctionscreening.rb +32 -32
- data/lib/mastercard/api/disbursements/transfernotification.rb +32 -32
- data/lib/mastercard_disbursements.rb +1 -0
- metadata +5 -4
@@ -30,90 +30,90 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module Disbursements
|
35
|
+
class Consumer < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
@__store = {
|
40
|
+
'c0031473-fdfa-4dd6-a0be-785dcf9c2032' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}", "delete", [], []),
|
41
|
+
'39de170c-7746-45b5-ac06-0610738c7cd2' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers", "create", [], []),
|
42
|
+
'186c52f8-2576-414f-af61-0e2ae54a2831' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}", "read", [], []),
|
43
|
+
'96f5a9cc-7d8c-4708-b72f-c41b97a5fe2a' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers", "query", [], ["ref","contact_id_uri"]),
|
44
|
+
'52b1eaf9-11d5-4ebf-bb5c-61dca656fade' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/search", "create", [], []),
|
45
|
+
'90f226f5-5bba-4257-9ac5-937d2e4c6984' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}", "update", [], []),
|
46
|
+
|
47
|
+
}
|
48
48
|
|
49
|
-
|
49
|
+
protected
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
def self.getOperationConfig(operationUUID)
|
52
|
+
if @__store.key?(operationUUID)
|
53
|
+
return @__store[operationUUID]
|
54
|
+
end
|
55
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
56
|
+
end
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
def self.getOperationMetadata()
|
59
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
60
|
+
end
|
61
61
|
|
62
|
-
|
62
|
+
public
|
63
63
|
|
64
64
|
|
65
65
|
|
66
66
|
|
67
67
|
|
68
|
-
|
69
|
-
|
68
|
+
def self.deleteById(id, map = nil)
|
69
|
+
#Delete object of type Consumer by id
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
71
|
+
#@param [String] id
|
72
|
+
#@param [Dict] map, containing additional parameters
|
73
|
+
#@return [Consumer] of the response of the deleted instance.
|
74
|
+
#@raise [APIException] an exception from the response status
|
75
75
|
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
77
|
+
mapObj = Consumer.new
|
78
|
+
if !(id.nil? || id.to_s.empty?)
|
79
|
+
mapObj.set("id", id)
|
80
|
+
end
|
81
|
+
if !map.nil?
|
82
|
+
if map.instance_of? RequestMap
|
83
|
+
mapObj.setAll(map.getObject())
|
84
|
+
else
|
85
|
+
mapObj.setAll(map)
|
86
|
+
end
|
87
|
+
end
|
88
88
|
|
89
|
-
|
90
|
-
|
89
|
+
return self.execute("c0031473-fdfa-4dd6-a0be-785dcf9c2032", mapObj)
|
90
|
+
end
|
91
91
|
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
93
|
+
def delete
|
94
|
+
#
|
95
|
+
#Delete object of type Consumer
|
96
96
|
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
97
|
+
#@param [String] id
|
98
|
+
#@return [Consumer] of the response of the deleted instance.
|
99
|
+
#@raise [APIException] an exception from the response status
|
100
|
+
#
|
101
101
|
|
102
|
-
|
103
|
-
|
102
|
+
return self.class.execute("c0031473-fdfa-4dd6-a0be-785dcf9c2032", self)
|
103
|
+
end
|
104
104
|
|
105
105
|
|
106
106
|
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
108
|
+
def self.create(mapObj)
|
109
|
+
#
|
110
|
+
#Creates object of type Consumer
|
111
|
+
#
|
112
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
113
|
+
#@return [Consumer] of the response of created instance.
|
114
|
+
#@raise [APIException] an exception from the response status
|
115
|
+
return self.execute("39de170c-7746-45b5-ac06-0610738c7cd2", Consumer.new(mapObj))
|
116
|
+
end
|
117
117
|
|
118
118
|
|
119
119
|
|
@@ -125,28 +125,28 @@ module MasterCard
|
|
125
125
|
|
126
126
|
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
128
|
+
def self.readByID(id, criteria = nil)
|
129
|
+
#
|
130
|
+
#Returns objects of type Consumer by id and optional criteria
|
131
|
+
#@param [String] id
|
132
|
+
#@param [Dict] criteria
|
133
|
+
#@return [Consumer] object representing the response
|
134
|
+
#@raise [APIException] an exception from the response status
|
135
135
|
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
136
|
+
mapObj = Consumer.new
|
137
|
+
if !(id.nil? || id.to_s.empty?)
|
138
|
+
mapObj.set("id", id)
|
139
|
+
end
|
140
|
+
if !criteria.nil?
|
141
|
+
if criteria.instance_of? RequestMap
|
142
|
+
mapObj.setAll(criteria.getObject())
|
143
|
+
else
|
144
|
+
mapObj.setAll(criteria)
|
145
|
+
end
|
146
|
+
end
|
147
147
|
|
148
|
-
|
149
|
-
|
148
|
+
return self.execute("186c52f8-2576-414f-af61-0e2ae54a2831",Consumer.new(mapObj))
|
149
|
+
end
|
150
150
|
|
151
151
|
|
152
152
|
|
@@ -155,27 +155,27 @@ module MasterCard
|
|
155
155
|
|
156
156
|
|
157
157
|
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
158
|
+
def self.listByReferenceOrContactID(criteria)
|
159
|
+
#
|
160
|
+
#Query objects of type Consumer by id and optional criteria
|
161
|
+
#@param [Dict] criteria
|
162
|
+
#@return [Consumer] object representing the response.
|
163
|
+
#@raise [APIException] an exception from the response status
|
164
|
+
#
|
165
165
|
|
166
|
-
|
167
|
-
|
166
|
+
return self.execute("96f5a9cc-7d8c-4708-b72f-c41b97a5fe2a",Consumer.new(criteria))
|
167
|
+
end
|
168
168
|
|
169
169
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
170
|
+
def self.listByReferenceContactIDOrGovernmentID(mapObj)
|
171
|
+
#
|
172
|
+
#Creates object of type Consumer
|
173
|
+
#
|
174
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
175
|
+
#@return [Consumer] of the response of created instance.
|
176
|
+
#@raise [APIException] an exception from the response status
|
177
|
+
return self.execute("52b1eaf9-11d5-4ebf-bb5c-61dca656fade", Consumer.new(mapObj))
|
178
|
+
end
|
179
179
|
|
180
180
|
|
181
181
|
|
@@ -184,15 +184,15 @@ module MasterCard
|
|
184
184
|
|
185
185
|
|
186
186
|
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
187
|
+
def update
|
188
|
+
#
|
189
|
+
#Updates an object of type Consumer
|
190
|
+
#
|
191
|
+
#@return [Consumer] object representing the response.
|
192
|
+
#@raise [APIException] an exception from the response status
|
193
|
+
#
|
194
|
+
return self.class.execute("90f226f5-5bba-4257-9ac5-937d2e4c6984",self)
|
195
|
+
end
|
196
196
|
|
197
197
|
|
198
198
|
|
@@ -200,9 +200,9 @@ module MasterCard
|
|
200
200
|
|
201
201
|
|
202
202
|
|
203
|
-
|
204
|
-
|
205
|
-
|
203
|
+
end
|
204
|
+
end
|
205
|
+
end
|
206
206
|
end
|
207
207
|
|
208
208
|
|
@@ -30,46 +30,46 @@ require "mastercard/core/model"
|
|
30
30
|
require "mastercard/core/baseobject"
|
31
31
|
|
32
32
|
module MasterCard
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
module API
|
34
|
+
module Disbursements
|
35
|
+
class ConsumerAccount < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
39
|
+
@__store = {
|
40
|
+
'9c736744-0cdd-41e1-af27-2bb862dd7495' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "create", [], []),
|
41
|
+
'5068db13-0ad7-455b-8cfb-a47f064fbbfc' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "delete", [], []),
|
42
|
+
'ba6b85ef-1898-4bfb-a95e-12e0791cdf2b' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "read", [], []),
|
43
|
+
'433d1c30-193b-40e3-8dfa-42b3c1f97c5f' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts", "query", [], ["ref"]),
|
44
|
+
'2bd77855-298b-42ae-8350-1394ee0d33e3' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/{consumerId}/accounts/{accountId}", "update", [], []),
|
45
|
+
|
46
|
+
}
|
47
47
|
|
48
|
-
|
48
|
+
protected
|
49
49
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
50
|
+
def self.getOperationConfig(operationUUID)
|
51
|
+
if @__store.key?(operationUUID)
|
52
|
+
return @__store[operationUUID]
|
53
|
+
end
|
54
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
55
|
+
end
|
56
56
|
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
def self.getOperationMetadata()
|
58
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
59
|
+
end
|
60
60
|
|
61
|
-
|
61
|
+
public
|
62
62
|
|
63
63
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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("9c736744-0cdd-41e1-af27-2bb862dd7495", ConsumerAccount.new(mapObj))
|
72
|
+
end
|
73
73
|
|
74
74
|
|
75
75
|
|
@@ -80,42 +80,42 @@ module MasterCard
|
|
80
80
|
|
81
81
|
|
82
82
|
|
83
|
-
|
84
|
-
|
83
|
+
def self.deleteById(id, map = nil)
|
84
|
+
#Delete object of type ConsumerAccount by id
|
85
85
|
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
90
90
|
|
91
91
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
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
|
103
103
|
|
104
|
-
|
105
|
-
|
104
|
+
return self.execute("5068db13-0ad7-455b-8cfb-a47f064fbbfc", mapObj)
|
105
|
+
end
|
106
106
|
|
107
107
|
|
108
|
-
|
109
|
-
|
110
|
-
|
108
|
+
def delete
|
109
|
+
#
|
110
|
+
#Delete object of type ConsumerAccount
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
112
|
+
#@param [String] id
|
113
|
+
#@return [ConsumerAccount] of the response of the deleted instance.
|
114
|
+
#@raise [APIException] an exception from the response status
|
115
|
+
#
|
116
116
|
|
117
|
-
|
118
|
-
|
117
|
+
return self.class.execute("5068db13-0ad7-455b-8cfb-a47f064fbbfc", self)
|
118
|
+
end
|
119
119
|
|
120
120
|
|
121
121
|
|
@@ -124,28 +124,28 @@ module MasterCard
|
|
124
124
|
|
125
125
|
|
126
126
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
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
|
134
134
|
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
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
|
146
146
|
|
147
|
-
|
148
|
-
|
147
|
+
return self.execute("ba6b85ef-1898-4bfb-a95e-12e0791cdf2b",ConsumerAccount.new(mapObj))
|
148
|
+
end
|
149
149
|
|
150
150
|
|
151
151
|
|
@@ -154,28 +154,28 @@ module MasterCard
|
|
154
154
|
|
155
155
|
|
156
156
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
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
|
-
|
165
|
+
return self.execute("433d1c30-193b-40e3-8dfa-42b3c1f97c5f",ConsumerAccount.new(criteria))
|
166
|
+
end
|
167
167
|
|
168
168
|
|
169
169
|
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
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("2bd77855-298b-42ae-8350-1394ee0d33e3",self)
|
178
|
+
end
|
179
179
|
|
180
180
|
|
181
181
|
|
@@ -183,9 +183,9 @@ module MasterCard
|
|
183
183
|
|
184
184
|
|
185
185
|
|
186
|
-
|
187
|
-
|
188
|
-
|
186
|
+
end
|
187
|
+
end
|
188
|
+
end
|
189
189
|
end
|
190
190
|
|
191
191
|
|