mastercard_blockchain 0.0.2 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/mastercard/api/blockchain/block.rb +57 -57
- data/lib/mastercard/api/blockchain/node.rb +32 -113
- data/lib/mastercard/api/blockchain/resourceconfig.rb +55 -54
- data/lib/mastercard/api/blockchain/status.rb +32 -32
- data/lib/mastercard/api/blockchain/transactionentry.rb +53 -53
- data/lib/mastercard_blockchain.rb +0 -5
- metadata +5 -10
- data/lib/mastercard/api/blockchain/app.rb +0 -117
- data/lib/mastercard/api/blockchain/authorize.rb +0 -86
- data/lib/mastercard/api/blockchain/encoding.rb +0 -86
- data/lib/mastercard/api/blockchain/settle.rb +0 -86
- data/lib/mastercard/api/blockchain/sign.rb +0 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1a978a2c3dd3177d367f35221c8e3d58f46fa2c4f3d5a6af90195e31b4769966
|
4
|
+
data.tar.gz: ecee78d02a11f3a90da71740677d7c0d7c0769822106e2fcdba5d8816d4f2751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 843a51d22c032f598aaf39c78f16404c08eed0f5c23af3bf47e693266be88398bff07b9ad35277d232cb6af72ed64814cd1c3eec86fd6f255f0c71c29d757eb2
|
7
|
+
data.tar.gz: 3c3f2cc3fed400e9cd4968d803b991fb14937fe8cf25a26ff4c046b4c52e6cc0693846831578006fd6abf62d13c32eea5ac9cb5291cf3eb385c4c8c6e19ee4c4
|
@@ -30,50 +30,50 @@ 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 Blockchain
|
35
|
+
class Block < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
@__store = {
|
40
|
+
'391fbbb2-1734-402c-89d8-81591d4a9d92' => OperationConfig.new("/labs/proxy/chain/api/v1/network/block", "list", [], ["offset","count"]),
|
41
|
+
'91d1412c-c7f3-46a7-87d0-3da090cc281c' => OperationConfig.new("/labs/proxy/chain/api/v1/network/block/{id}", "read", [], []),
|
42
|
+
|
43
|
+
}
|
44
44
|
|
45
|
-
|
45
|
+
protected
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
def self.getOperationConfig(operationUUID)
|
48
|
+
if @__store.key?(operationUUID)
|
49
|
+
return @__store[operationUUID]
|
50
|
+
end
|
51
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def self.getOperationMetadata()
|
55
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
56
|
+
end
|
57
57
|
|
58
|
-
|
58
|
+
public
|
59
59
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
63
|
+
def self.listByCriteria(criteria = nil)
|
64
|
+
#
|
65
|
+
#List objects of type Block
|
66
|
+
#
|
67
|
+
#@param [Dict] criteria
|
68
|
+
#@return Array [Block] object matching the criteria.
|
69
|
+
#@raise [APIException] an exception from the response status
|
70
70
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
71
|
+
if criteria.nil?
|
72
|
+
return self.execute("391fbbb2-1734-402c-89d8-81591d4a9d92",Block.new)
|
73
|
+
else
|
74
|
+
return self.execute("391fbbb2-1734-402c-89d8-81591d4a9d92",Block.new(criteria))
|
75
|
+
end
|
76
|
+
end
|
77
77
|
|
78
78
|
|
79
79
|
|
@@ -82,34 +82,34 @@ module MasterCard
|
|
82
82
|
|
83
83
|
|
84
84
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
85
|
+
def self.read(id, criteria = nil)
|
86
|
+
#
|
87
|
+
#Returns objects of type Block by id and optional criteria
|
88
|
+
#@param [String] id
|
89
|
+
#@param [Dict] criteria
|
90
|
+
#@return [Block] object representing the response
|
91
|
+
#@raise [APIException] an exception from the response status
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
93
|
+
mapObj = Block.new
|
94
|
+
if !(id.nil? || id.to_s.empty?)
|
95
|
+
mapObj.set("id", id)
|
96
|
+
end
|
97
|
+
if !criteria.nil?
|
98
|
+
if criteria.instance_of? RequestMap
|
99
|
+
mapObj.setAll(criteria.getObject())
|
100
|
+
else
|
101
|
+
mapObj.setAll(criteria)
|
102
|
+
end
|
103
|
+
end
|
104
104
|
|
105
|
-
|
106
|
-
|
105
|
+
return self.execute("91d1412c-c7f3-46a7-87d0-3da090cc281c",Block.new(mapObj))
|
106
|
+
end
|
107
107
|
|
108
108
|
|
109
109
|
|
110
|
-
|
111
|
-
|
112
|
-
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
113
|
end
|
114
114
|
|
115
115
|
|
@@ -30,134 +30,53 @@ 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 Blockchain
|
35
|
+
class Node < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
'4b8ba080-2613-4b15-9785-e1fe8b33a06d' => OperationConfig.new("/labs/proxy/chain/api/v1/network/node/{address}", "read", [], []),
|
44
|
-
'de1b9b11-9c11-43a3-9e27-6ab499102e29' => OperationConfig.new("/labs/proxy/chain/api/v1/network/node", "query", [], []),
|
45
|
-
|
46
|
-
}
|
39
|
+
@__store = {
|
40
|
+
'fe54f38f-e61b-4d1f-9aa7-a87178dea21b' => OperationConfig.new("/labs/proxy/chain/api/v1/network/node", "query", [], []),
|
41
|
+
|
42
|
+
}
|
47
43
|
|
48
|
-
|
44
|
+
protected
|
49
45
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
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
|
56
52
|
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
60
56
|
|
61
|
-
|
57
|
+
public
|
62
58
|
|
63
59
|
|
64
|
-
def self.provision(mapObj)
|
65
|
-
#
|
66
|
-
#Creates object of type Node
|
67
|
-
#
|
68
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
69
|
-
#@return [Node] of the response of created instance.
|
70
|
-
#@raise [APIException] an exception from the response status
|
71
|
-
return self.execute("1821179a-c369-4fde-9c75-4113067d721f", Node.new(mapObj))
|
72
|
-
end
|
73
60
|
|
74
61
|
|
75
62
|
|
76
63
|
|
77
64
|
|
65
|
+
def self.query(criteria)
|
66
|
+
#
|
67
|
+
#Query objects of type Node by id and optional criteria
|
68
|
+
#@param [Dict] criteria
|
69
|
+
#@return [Node] object representing the response.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
#
|
78
72
|
|
73
|
+
return self.execute("fe54f38f-e61b-4d1f-9aa7-a87178dea21b",Node.new(criteria))
|
74
|
+
end
|
79
75
|
|
80
|
-
def self.invite(mapObj)
|
81
|
-
#
|
82
|
-
#Creates object of type Node
|
83
|
-
#
|
84
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
85
|
-
#@return [Node] of the response of created instance.
|
86
|
-
#@raise [APIException] an exception from the response status
|
87
|
-
return self.execute("a6dac6ba-4311-47fd-97a2-b4ed1a57ad9e", Node.new(mapObj))
|
88
|
-
end
|
89
76
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
def self.join(mapObj)
|
97
|
-
#
|
98
|
-
#Creates object of type Node
|
99
|
-
#
|
100
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
101
|
-
#@return [Node] of the response of created instance.
|
102
|
-
#@raise [APIException] an exception from the response status
|
103
|
-
return self.execute("71a907a6-38fd-4daa-86f3-4318d1c293fd", Node.new(mapObj))
|
104
|
-
end
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
def self.read(id, criteria = nil)
|
117
|
-
#
|
118
|
-
#Returns objects of type Node by id and optional criteria
|
119
|
-
#@param [String] id
|
120
|
-
#@param [Dict] criteria
|
121
|
-
#@return [Node] object representing the response
|
122
|
-
#@raise [APIException] an exception from the response status
|
123
|
-
|
124
|
-
mapObj = Node.new
|
125
|
-
if !(id.nil? || id.to_s.empty?)
|
126
|
-
mapObj.set("id", id)
|
127
|
-
end
|
128
|
-
if !criteria.nil?
|
129
|
-
if criteria.instance_of? RequestMap
|
130
|
-
mapObj.setAll(criteria.getObject())
|
131
|
-
else
|
132
|
-
mapObj.setAll(criteria)
|
133
|
-
end
|
134
|
-
end
|
135
|
-
|
136
|
-
return self.execute("4b8ba080-2613-4b15-9785-e1fe8b33a06d",Node.new(mapObj))
|
137
|
-
end
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
def self.query(criteria)
|
147
|
-
#
|
148
|
-
#Query objects of type Node by id and optional criteria
|
149
|
-
#@param [Dict] criteria
|
150
|
-
#@return [Node] object representing the response.
|
151
|
-
#@raise [APIException] an exception from the response status
|
152
|
-
#
|
153
|
-
|
154
|
-
return self.execute("de1b9b11-9c11-43a3-9e27-6ab499102e29",Node.new(criteria))
|
155
|
-
end
|
156
|
-
|
157
|
-
|
158
|
-
end
|
159
|
-
end
|
160
|
-
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
161
80
|
end
|
162
81
|
|
163
82
|
|
@@ -29,75 +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 Blockchain
|
34
|
+
class ResourceConfig
|
35
|
+
include MasterCard::Core
|
36
36
|
|
37
|
-
|
37
|
+
@@instance = nil
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
@context = nil
|
44
|
-
@version = "blockchain:0.0.2"
|
45
|
-
@jsonNative = true
|
39
|
+
def initialize
|
40
|
+
@override = nil
|
41
|
+
@host = nil
|
42
|
+
@context = nil
|
46
43
|
|
47
|
-
|
48
|
-
|
49
|
-
|
44
|
+
Config.registerResourceConfig(self)
|
45
|
+
currentEnvironment = Config.getEnvironment()
|
46
|
+
self.setEnvironment(currentEnvironment)
|
50
47
|
|
51
|
-
|
48
|
+
end
|
52
49
|
|
53
50
|
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
def self.instance
|
52
|
+
return @@instance
|
53
|
+
end
|
57
54
|
|
58
55
|
|
59
|
-
|
60
|
-
|
61
|
-
|
56
|
+
def getName
|
57
|
+
return "blockchain"
|
58
|
+
end
|
62
59
|
|
63
60
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
61
|
+
def getHost
|
62
|
+
unless @override.nil? || @override == 0
|
63
|
+
return @override
|
64
|
+
else
|
65
|
+
return @host
|
66
|
+
end
|
67
|
+
end
|
71
68
|
|
72
|
-
|
73
|
-
|
74
|
-
|
69
|
+
def getContext
|
70
|
+
return @context
|
71
|
+
end
|
75
72
|
|
76
|
-
|
77
|
-
|
78
|
-
|
73
|
+
def getVersion
|
74
|
+
return "blockchain:0.0.6"
|
75
|
+
end
|
79
76
|
|
80
|
-
|
81
|
-
|
82
|
-
|
77
|
+
def getJsonNative
|
78
|
+
return true
|
79
|
+
end
|
83
80
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
@host = tuple[0]
|
88
|
-
@context = tuple[1]
|
89
|
-
end
|
90
|
-
end
|
81
|
+
def getContentTypeOverride
|
82
|
+
return nil
|
83
|
+
end
|
91
84
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
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
|
96
92
|
|
97
|
-
|
93
|
+
def setCustomEnvironment(host,context)
|
94
|
+
@host = host
|
95
|
+
@context = context
|
96
|
+
end
|
98
97
|
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
98
|
+
@@instance = ResourceConfig.new
|
99
|
+
|
100
|
+
private_class_method :new
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
103
104
|
end
|
@@ -30,31 +30,31 @@ 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 Blockchain
|
35
|
+
class Status < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
@__store = {
|
40
|
+
'315f067a-8861-4d77-a685-3db3ea110008' => OperationConfig.new("/labs/proxy/chain/api/v1/network/status", "query", [], []),
|
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
|
|
@@ -62,21 +62,21 @@ module MasterCard
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
def self.query(criteria)
|
66
|
+
#
|
67
|
+
#Query objects of type Status by id and optional criteria
|
68
|
+
#@param [Dict] criteria
|
69
|
+
#@return [Status] object representing the response.
|
70
|
+
#@raise [APIException] an exception from the response status
|
71
|
+
#
|
72
72
|
|
73
|
-
|
74
|
-
|
73
|
+
return self.execute("315f067a-8861-4d77-a685-3db3ea110008",Status.new(criteria))
|
74
|
+
end
|
75
75
|
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
80
|
end
|
81
81
|
|
82
82
|
|
@@ -30,72 +30,72 @@ 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 Blockchain
|
35
|
+
class TransactionEntry < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
@__store = {
|
40
|
+
'a8a586ff-3a1f-45eb-8f7f-c44525e7b6af' => OperationConfig.new("/labs/proxy/chain/api/v1/network/entry/{hash}", "read", [], []),
|
41
|
+
'b1db4894-92b6-418f-a497-ea72c4290b1b' => OperationConfig.new("/labs/proxy/chain/api/v1/network/entry", "create", [], []),
|
42
|
+
|
43
|
+
}
|
44
44
|
|
45
|
-
|
45
|
+
protected
|
46
46
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
def self.getOperationConfig(operationUUID)
|
48
|
+
if @__store.key?(operationUUID)
|
49
|
+
return @__store[operationUUID]
|
50
|
+
end
|
51
|
+
raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
|
52
|
+
end
|
53
53
|
|
54
|
-
|
55
|
-
|
56
|
-
|
54
|
+
def self.getOperationMetadata()
|
55
|
+
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
|
56
|
+
end
|
57
57
|
|
58
|
-
|
58
|
+
public
|
59
59
|
|
60
60
|
|
61
61
|
|
62
62
|
|
63
63
|
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
def self.read(id, criteria = nil)
|
66
|
+
#
|
67
|
+
#Returns objects of type TransactionEntry by id and optional criteria
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] criteria
|
70
|
+
#@return [TransactionEntry] object representing the response
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
73
|
+
mapObj = TransactionEntry.new
|
74
|
+
if !(id.nil? || id.to_s.empty?)
|
75
|
+
mapObj.set("id", id)
|
76
|
+
end
|
77
|
+
if !criteria.nil?
|
78
|
+
if criteria.instance_of? RequestMap
|
79
|
+
mapObj.setAll(criteria.getObject())
|
80
|
+
else
|
81
|
+
mapObj.setAll(criteria)
|
82
|
+
end
|
83
|
+
end
|
84
84
|
|
85
|
-
|
86
|
-
|
85
|
+
return self.execute("a8a586ff-3a1f-45eb-8f7f-c44525e7b6af",TransactionEntry.new(mapObj))
|
86
|
+
end
|
87
87
|
|
88
88
|
|
89
89
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
90
|
+
def self.create(mapObj)
|
91
|
+
#
|
92
|
+
#Creates object of type TransactionEntry
|
93
|
+
#
|
94
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
95
|
+
#@return [TransactionEntry] of the response of created instance.
|
96
|
+
#@raise [APIException] an exception from the response status
|
97
|
+
return self.execute("b1db4894-92b6-418f-a497-ea72c4290b1b", TransactionEntry.new(mapObj))
|
98
|
+
end
|
99
99
|
|
100
100
|
|
101
101
|
|
@@ -103,9 +103,9 @@ module MasterCard
|
|
103
103
|
|
104
104
|
|
105
105
|
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
109
109
|
end
|
110
110
|
|
111
111
|
|
@@ -2,12 +2,7 @@ require 'mastercard_api_core'
|
|
2
2
|
|
3
3
|
require 'mastercard/api/blockchain/resourceconfig'
|
4
4
|
|
5
|
-
require 'mastercard/api/blockchain/app'
|
6
|
-
require 'mastercard/api/blockchain/authorize'
|
7
5
|
require 'mastercard/api/blockchain/block'
|
8
|
-
require 'mastercard/api/blockchain/encoding'
|
9
6
|
require 'mastercard/api/blockchain/node'
|
10
|
-
require 'mastercard/api/blockchain/settle'
|
11
|
-
require 'mastercard/api/blockchain/sign'
|
12
7
|
require 'mastercard/api/blockchain/status'
|
13
8
|
require 'mastercard/api/blockchain/transactionentry'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mastercard_blockchain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MasterCard Worldwide
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-20 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,14 +51,9 @@ executables: []
|
|
51
51
|
extensions: []
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
|
-
- lib/mastercard/api/blockchain/app.rb
|
55
|
-
- lib/mastercard/api/blockchain/authorize.rb
|
56
54
|
- lib/mastercard/api/blockchain/block.rb
|
57
|
-
- lib/mastercard/api/blockchain/encoding.rb
|
58
55
|
- lib/mastercard/api/blockchain/node.rb
|
59
56
|
- lib/mastercard/api/blockchain/resourceconfig.rb
|
60
|
-
- lib/mastercard/api/blockchain/settle.rb
|
61
|
-
- lib/mastercard/api/blockchain/sign.rb
|
62
57
|
- lib/mastercard/api/blockchain/status.rb
|
63
58
|
- lib/mastercard/api/blockchain/transactionentry.rb
|
64
59
|
- lib/mastercard_blockchain.rb
|
@@ -82,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
77
|
version: '0'
|
83
78
|
requirements: []
|
84
79
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
80
|
+
rubygems_version: 2.7.7
|
86
81
|
signing_key:
|
87
82
|
specification_version: 4
|
88
83
|
summary: MasterCard Blockchain SDK
|
@@ -1,117 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
-
# All rights reserved.
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
-
# permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
-
# conditions and the following disclaimer.
|
10
|
-
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
-
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
-
# provided with the distribution.
|
13
|
-
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
-
# contributors may be used to endorse or promote products derived from this software
|
15
|
-
# without specific prior written permission.
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
-
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
-
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
-
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
-
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
-
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
-
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
-
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
-
# SUCH DAMAGE.
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
require "mastercard/core/model"
|
30
|
-
require "mastercard/core/baseobject"
|
31
|
-
|
32
|
-
module MasterCard
|
33
|
-
module API
|
34
|
-
module Blockchain
|
35
|
-
class App < MasterCard::Core::Model::BaseObject
|
36
|
-
include MasterCard::Core::Model
|
37
|
-
#
|
38
|
-
|
39
|
-
@__store = {
|
40
|
-
'9d34a46e-5864-4961-8c3f-a8c0c0cf2f83' => OperationConfig.new("/labs/proxy/chain/api/v1/network/app/{id}", "read", [], []),
|
41
|
-
'365c3bdc-43f8-46e4-8de9-773b4aaadb94' => OperationConfig.new("/labs/proxy/chain/api/v1/network/app/{id}", "update", [], []),
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
protected
|
46
|
-
|
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
|
53
|
-
|
54
|
-
def self.getOperationMetadata()
|
55
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
56
|
-
end
|
57
|
-
|
58
|
-
public
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
def self.read(id, criteria = nil)
|
66
|
-
#
|
67
|
-
#Returns objects of type App by id and optional criteria
|
68
|
-
#@param [String] id
|
69
|
-
#@param [Dict] criteria
|
70
|
-
#@return [App] object representing the response
|
71
|
-
#@raise [APIException] an exception from the response status
|
72
|
-
|
73
|
-
mapObj = App.new
|
74
|
-
if !(id.nil? || id.to_s.empty?)
|
75
|
-
mapObj.set("id", id)
|
76
|
-
end
|
77
|
-
if !criteria.nil?
|
78
|
-
if criteria.instance_of? RequestMap
|
79
|
-
mapObj.setAll(criteria.getObject())
|
80
|
-
else
|
81
|
-
mapObj.setAll(criteria)
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
return self.execute("9d34a46e-5864-4961-8c3f-a8c0c0cf2f83",App.new(mapObj))
|
86
|
-
end
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
def update
|
92
|
-
#
|
93
|
-
#Updates an object of type App
|
94
|
-
#
|
95
|
-
#@return [App] object representing the response.
|
96
|
-
#@raise [APIException] an exception from the response status
|
97
|
-
#
|
98
|
-
return self.class.execute("365c3bdc-43f8-46e4-8de9-773b4aaadb94",self)
|
99
|
-
end
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
@@ -1,86 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
-
# All rights reserved.
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
-
# permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
-
# conditions and the following disclaimer.
|
10
|
-
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
-
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
-
# provided with the distribution.
|
13
|
-
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
-
# contributors may be used to endorse or promote products derived from this software
|
15
|
-
# without specific prior written permission.
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
-
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
-
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
-
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
-
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
-
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
-
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
-
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
-
# SUCH DAMAGE.
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
require "mastercard/core/model"
|
30
|
-
require "mastercard/core/baseobject"
|
31
|
-
|
32
|
-
module MasterCard
|
33
|
-
module API
|
34
|
-
module Blockchain
|
35
|
-
class Authorize < MasterCard::Core::Model::BaseObject
|
36
|
-
include MasterCard::Core::Model
|
37
|
-
#
|
38
|
-
|
39
|
-
@__store = {
|
40
|
-
'dc9d293d-640d-45e1-bbc4-4154a64c7bf6' => OperationConfig.new("/labs/proxy/chain/api/v1/network/authorize", "create", [], []),
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
protected
|
45
|
-
|
46
|
-
def self.getOperationConfig(uuid)
|
47
|
-
if @__store.key?(uuid)
|
48
|
-
return @__store[uuid]
|
49
|
-
end
|
50
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
|
51
|
-
end
|
52
|
-
|
53
|
-
def self.getOperationMetadata()
|
54
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
55
|
-
end
|
56
|
-
|
57
|
-
public
|
58
|
-
|
59
|
-
|
60
|
-
def self.create(mapObj)
|
61
|
-
#
|
62
|
-
#Creates object of type Authorize
|
63
|
-
#
|
64
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
-
#@return [Authorize] of the response of created instance.
|
66
|
-
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("dc9d293d-640d-45e1-bbc4-4154a64c7bf6", Authorize.new(mapObj))
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
@@ -1,86 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
-
# All rights reserved.
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
-
# permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
-
# conditions and the following disclaimer.
|
10
|
-
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
-
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
-
# provided with the distribution.
|
13
|
-
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
-
# contributors may be used to endorse or promote products derived from this software
|
15
|
-
# without specific prior written permission.
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
-
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
-
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
-
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
-
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
-
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
-
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
-
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
-
# SUCH DAMAGE.
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
require "mastercard/core/model"
|
30
|
-
require "mastercard/core/baseobject"
|
31
|
-
|
32
|
-
module MasterCard
|
33
|
-
module API
|
34
|
-
module Blockchain
|
35
|
-
class Encoding < MasterCard::Core::Model::BaseObject
|
36
|
-
include MasterCard::Core::Model
|
37
|
-
#
|
38
|
-
|
39
|
-
@__store = {
|
40
|
-
'ae1b5b9c-032e-4475-88c3-b9f2129d97ad' => OperationConfig.new("/labs/proxy/chain/api/v1/network/support/encoding", "create", [], []),
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
protected
|
45
|
-
|
46
|
-
def self.getOperationConfig(uuid)
|
47
|
-
if @__store.key?(uuid)
|
48
|
-
return @__store[uuid]
|
49
|
-
end
|
50
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
|
51
|
-
end
|
52
|
-
|
53
|
-
def self.getOperationMetadata()
|
54
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
55
|
-
end
|
56
|
-
|
57
|
-
public
|
58
|
-
|
59
|
-
|
60
|
-
def self.create(mapObj)
|
61
|
-
#
|
62
|
-
#Creates object of type Encoding
|
63
|
-
#
|
64
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
-
#@return [Encoding] of the response of created instance.
|
66
|
-
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("ae1b5b9c-032e-4475-88c3-b9f2129d97ad", Encoding.new(mapObj))
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
@@ -1,86 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
-
# All rights reserved.
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
-
# permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
-
# conditions and the following disclaimer.
|
10
|
-
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
-
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
-
# provided with the distribution.
|
13
|
-
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
-
# contributors may be used to endorse or promote products derived from this software
|
15
|
-
# without specific prior written permission.
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
-
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
-
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
-
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
-
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
-
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
-
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
-
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
-
# SUCH DAMAGE.
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
require "mastercard/core/model"
|
30
|
-
require "mastercard/core/baseobject"
|
31
|
-
|
32
|
-
module MasterCard
|
33
|
-
module API
|
34
|
-
module Blockchain
|
35
|
-
class Settle < MasterCard::Core::Model::BaseObject
|
36
|
-
include MasterCard::Core::Model
|
37
|
-
#
|
38
|
-
|
39
|
-
@__store = {
|
40
|
-
'1b2af876-5f34-480c-9003-a05acbc50ac2' => OperationConfig.new("/labs/proxy/chain/api/v1/network/settle", "create", [], []),
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
protected
|
45
|
-
|
46
|
-
def self.getOperationConfig(uuid)
|
47
|
-
if @__store.key?(uuid)
|
48
|
-
return @__store[uuid]
|
49
|
-
end
|
50
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
|
51
|
-
end
|
52
|
-
|
53
|
-
def self.getOperationMetadata()
|
54
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
55
|
-
end
|
56
|
-
|
57
|
-
public
|
58
|
-
|
59
|
-
|
60
|
-
def self.create(mapObj)
|
61
|
-
#
|
62
|
-
#Creates object of type Settle
|
63
|
-
#
|
64
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
-
#@return [Settle] of the response of created instance.
|
66
|
-
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("1b2af876-5f34-480c-9003-a05acbc50ac2", Settle.new(mapObj))
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
@@ -1,86 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Copyright (c) 2016 MasterCard International Incorporated
|
3
|
-
# All rights reserved.
|
4
|
-
#
|
5
|
-
# Redistribution and use in source and binary forms, with or without modification, are
|
6
|
-
# permitted provided that the following conditions are met:
|
7
|
-
#
|
8
|
-
# Redistributions of source code must retain the above copyright notice, this list of
|
9
|
-
# conditions and the following disclaimer.
|
10
|
-
# Redistributions in binary form must reproduce the above copyright notice, this list of
|
11
|
-
# conditions and the following disclaimer in the documentation and/or other materials
|
12
|
-
# provided with the distribution.
|
13
|
-
# Neither the name of the MasterCard International Incorporated nor the names of its
|
14
|
-
# contributors may be used to endorse or promote products derived from this software
|
15
|
-
# without specific prior written permission.
|
16
|
-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
17
|
-
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
18
|
-
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
19
|
-
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
20
|
-
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
|
21
|
-
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
22
|
-
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
23
|
-
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
24
|
-
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
25
|
-
# SUCH DAMAGE.
|
26
|
-
#
|
27
|
-
|
28
|
-
|
29
|
-
require "mastercard/core/model"
|
30
|
-
require "mastercard/core/baseobject"
|
31
|
-
|
32
|
-
module MasterCard
|
33
|
-
module API
|
34
|
-
module Blockchain
|
35
|
-
class Sign < MasterCard::Core::Model::BaseObject
|
36
|
-
include MasterCard::Core::Model
|
37
|
-
#
|
38
|
-
|
39
|
-
@__store = {
|
40
|
-
'be20d697-d24e-4fa8-8a74-e4aaa173c708' => OperationConfig.new("/labs/proxy/chain/api/v1/network/sign", "create", [], []),
|
41
|
-
|
42
|
-
}
|
43
|
-
|
44
|
-
protected
|
45
|
-
|
46
|
-
def self.getOperationConfig(uuid)
|
47
|
-
if @__store.key?(uuid)
|
48
|
-
return @__store[uuid]
|
49
|
-
end
|
50
|
-
raise NotImplementedError.new("Invalid operationUUID supplied:"+ uuid)
|
51
|
-
end
|
52
|
-
|
53
|
-
def self.getOperationMetadata()
|
54
|
-
return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative())
|
55
|
-
end
|
56
|
-
|
57
|
-
public
|
58
|
-
|
59
|
-
|
60
|
-
def self.create(mapObj)
|
61
|
-
#
|
62
|
-
#Creates object of type Sign
|
63
|
-
#
|
64
|
-
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
-
#@return [Sign] of the response of created instance.
|
66
|
-
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("be20d697-d24e-4fa8-8a74-e4aaa173c708", Sign.new(mapObj))
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|