mastercard_p2p 1.0.3 → 1.0.4
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 +4 -4
- data/lib/mastercard/api/p2p/accountbalance.rb +105 -0
- data/lib/mastercard/api/p2p/accountinfo.rb +32 -32
- data/lib/mastercard/api/p2p/accountmapping.rb +32 -32
- data/lib/mastercard/api/p2p/accountverification.rb +32 -32
- data/lib/mastercard/api/p2p/consumer.rb +112 -112
- data/lib/mastercard/api/p2p/consumeraccount.rb +102 -102
- data/lib/mastercard/api/p2p/consumercontactid.rb +102 -102
- data/lib/mastercard/api/p2p/consumergovernmentid.rb +102 -102
- data/lib/mastercard/api/p2p/paymenttransfer.rb +63 -63
- data/lib/mastercard/api/p2p/resourceconfig.rb +54 -54
- data/lib/mastercard/api/p2p/sanctionscreening.rb +32 -32
- data/lib/mastercard/api/p2p/transfernotification.rb +32 -32
- data/lib/mastercard_p2p.rb +1 -0
- metadata +5 -4
@@ -30,44 +30,44 @@ 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 P2p
|
35
|
+
class PaymentTransfer < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
39
|
+
@__store = {
|
40
|
+
'6d2b5353-a7f7-4f8d-afd1-c1ffa8a38ae8' => OperationConfig.new("/send/v1/partners/{partnerId}/transfers/payment", "create", [], []),
|
41
|
+
'27905490-d9f7-4e47-bd65-c56474c333be' => OperationConfig.new("/send/v1/partners/{partnerId}/transfers/{transferId}", "read", [], []),
|
42
|
+
'd6d64a7b-712a-46c6-bd8f-79065ae7f735' => OperationConfig.new("/send/v1/partners/{partnerId}/transfers", "query", [], ["ref"]),
|
43
|
+
|
44
|
+
}
|
45
45
|
|
46
|
-
|
46
|
+
protected
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
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
54
|
|
55
|
-
|
56
|
-
|
57
|
-
|
55
|
+
def self.getOperationMetadata()
|
56
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
57
|
+
end
|
58
58
|
|
59
|
-
|
59
|
+
public
|
60
60
|
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
62
|
+
def self.create(mapObj)
|
63
|
+
#
|
64
|
+
#Creates object of type PaymentTransfer
|
65
|
+
#
|
66
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
67
|
+
#@return [PaymentTransfer] of the response of created instance.
|
68
|
+
#@raise [APIException] an exception from the response status
|
69
|
+
return self.execute("6d2b5353-a7f7-4f8d-afd1-c1ffa8a38ae8", PaymentTransfer.new(mapObj))
|
70
|
+
end
|
71
71
|
|
72
72
|
|
73
73
|
|
@@ -79,28 +79,28 @@ module MasterCard
|
|
79
79
|
|
80
80
|
|
81
81
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
82
|
+
def self.readByID(id, criteria = nil)
|
83
|
+
#
|
84
|
+
#Returns objects of type PaymentTransfer by id and optional criteria
|
85
|
+
#@param [String] id
|
86
|
+
#@param [Dict] criteria
|
87
|
+
#@return [PaymentTransfer] object representing the response
|
88
|
+
#@raise [APIException] an exception from the response status
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
90
|
+
mapObj = PaymentTransfer.new
|
91
|
+
if !(id.nil? || id.to_s.empty?)
|
92
|
+
mapObj.set("id", id)
|
93
|
+
end
|
94
|
+
if !criteria.nil?
|
95
|
+
if criteria.instance_of? RequestMap
|
96
|
+
mapObj.setAll(criteria.getObject())
|
97
|
+
else
|
98
|
+
mapObj.setAll(criteria)
|
99
|
+
end
|
100
|
+
end
|
101
101
|
|
102
|
-
|
103
|
-
|
102
|
+
return self.execute("27905490-d9f7-4e47-bd65-c56474c333be",PaymentTransfer.new(mapObj))
|
103
|
+
end
|
104
104
|
|
105
105
|
|
106
106
|
|
@@ -109,21 +109,21 @@ module MasterCard
|
|
109
109
|
|
110
110
|
|
111
111
|
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
112
|
+
def self.readByReference(criteria)
|
113
|
+
#
|
114
|
+
#Query objects of type PaymentTransfer by id and optional criteria
|
115
|
+
#@param [Dict] criteria
|
116
|
+
#@return [PaymentTransfer] object representing the response.
|
117
|
+
#@raise [APIException] an exception from the response status
|
118
|
+
#
|
119
119
|
|
120
|
-
|
121
|
-
|
120
|
+
return self.execute("d6d64a7b-712a-46c6-bd8f-79065ae7f735",PaymentTransfer.new(criteria))
|
121
|
+
end
|
122
122
|
|
123
123
|
|
124
|
-
|
125
|
-
|
126
|
-
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
127
|
end
|
128
128
|
|
129
129
|
|
@@ -29,76 +29,76 @@ require "mastercard/core/constants"
|
|
29
29
|
require "mastercard/core/config"
|
30
30
|
|
31
31
|
module MasterCard
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
32
|
+
module API
|
33
|
+
module P2p
|
34
|
+
class ResourceConfig
|
35
|
+
include MasterCard::Core
|
36
36
|
|
37
|
-
|
37
|
+
@@instance = nil
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
def initialize
|
40
|
+
@override = nil
|
41
|
+
@host = nil
|
42
|
+
@context = nil
|
43
43
|
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
Config.registerResourceConfig(self)
|
45
|
+
currentEnvironment = Config.getEnvironment()
|
46
|
+
self.setEnvironment(currentEnvironment)
|
47
47
|
|
48
|
-
|
48
|
+
end
|
49
49
|
|
50
50
|
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
def self.instance
|
52
|
+
return @@instance
|
53
|
+
end
|
54
54
|
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
def getName
|
57
|
+
return "p2p"
|
58
|
+
end
|
59
59
|
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
def getHost
|
62
|
+
unless @override.nil? || @override == 0
|
63
|
+
return @override
|
64
|
+
else
|
65
|
+
return @host
|
66
|
+
end
|
67
|
+
end
|
68
68
|
|
69
|
-
|
70
|
-
|
71
|
-
|
69
|
+
def getContext
|
70
|
+
return @context
|
71
|
+
end
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
def getVersion
|
74
|
+
return "p2p:1.0.4"
|
75
|
+
end
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
def getJsonNative
|
78
|
+
return false
|
79
|
+
end
|
80
80
|
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
def getContentTypeOverride
|
82
|
+
return nil
|
83
|
+
end
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
85
|
+
def setEnvironment(environmet)
|
86
|
+
if Environment::MAPPING.key?(environmet)
|
87
|
+
tuple = Environment::MAPPING[environmet]
|
88
|
+
@host = tuple[0]
|
89
|
+
@context = tuple[1]
|
90
|
+
end
|
91
|
+
end
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
93
|
+
def setCustomEnvironment(host,context)
|
94
|
+
@host = host
|
95
|
+
@context = context
|
96
|
+
end
|
97
97
|
|
98
|
-
|
98
|
+
@@instance = ResourceConfig.new
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
100
|
+
private_class_method :new
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
104
|
end
|
@@ -30,43 +30,43 @@ 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 P2p
|
35
|
+
class SanctionScreening < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'abb17fdc-0ea5-4bf3-a764-3620e58392d4' => OperationConfig.new("/send/v1/partners/{partnerId}/consumers/sanction_screening", "update", [], []),
|
41
|
+
|
42
|
+
}
|
43
43
|
|
44
|
-
|
44
|
+
protected
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
public
|
58
58
|
|
59
59
|
|
60
60
|
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
61
|
+
def read
|
62
|
+
#
|
63
|
+
#Updates an object of type SanctionScreening
|
64
|
+
#
|
65
|
+
#@return [SanctionScreening] object representing the response.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
#
|
68
|
+
return self.class.execute("abb17fdc-0ea5-4bf3-a764-3620e58392d4",self)
|
69
|
+
end
|
70
70
|
|
71
71
|
|
72
72
|
|
@@ -74,9 +74,9 @@ module MasterCard
|
|
74
74
|
|
75
75
|
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
80
|
end
|
81
81
|
|
82
82
|
|
@@ -30,42 +30,42 @@ 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 P2p
|
35
|
+
class TransferNotification < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'4a8e4bb6-8358-4152-a8c7-2bb2151ae137' => OperationConfig.new("/inbound/notification/v1/", "create", [], []),
|
41
|
+
|
42
|
+
}
|
43
43
|
|
44
|
-
|
44
|
+
protected
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
46
|
+
def self.getOperationConfig(operationUUID)
|
47
|
+
if @__store.key?(operationUUID)
|
48
|
+
return @__store[operationUUID]
|
49
|
+
end
|
50
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
def self.getOperationMetadata()
|
54
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
55
|
+
end
|
56
56
|
|
57
|
-
|
57
|
+
public
|
58
58
|
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
60
|
+
def self.notification(mapObj)
|
61
|
+
#
|
62
|
+
#Creates object of type TransferNotification
|
63
|
+
#
|
64
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
+
#@return [TransferNotification] of the response of created instance.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
return self.execute("4a8e4bb6-8358-4152-a8c7-2bb2151ae137", TransferNotification.new(mapObj))
|
68
|
+
end
|
69
69
|
|
70
70
|
|
71
71
|
|
@@ -73,9 +73,9 @@ module MasterCard
|
|
73
73
|
|
74
74
|
|
75
75
|
|
76
|
-
|
77
|
-
|
78
|
-
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
79
|
end
|
80
80
|
|
81
81
|
|
data/lib/mastercard_p2p.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mastercard_p2p
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MasterCard Worldwide
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mastercard_api_core
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 1.4.0
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 1.4.
|
22
|
+
version: 1.4.8
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 1.4.0
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.4.
|
32
|
+
version: 1.4.8
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: ci_reporter_minitest
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -51,6 +51,7 @@ executables: []
|
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
|
+
- lib/mastercard/api/p2p/accountbalance.rb
|
54
55
|
- lib/mastercard/api/p2p/accountinfo.rb
|
55
56
|
- lib/mastercard/api/p2p/accountmapping.rb
|
56
57
|
- lib/mastercard/api/p2p/accountverification.rb
|