mastercard_blockchain 0.0.1 → 0.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.
- checksums.yaml +4 -4
- data/lib/mastercard/api/blockchain/app.rb +4 -4
- data/lib/mastercard/api/blockchain/authorize.rb +86 -0
- data/lib/mastercard/api/blockchain/block.rb +5 -5
- data/lib/mastercard/api/blockchain/encoding.rb +2 -2
- data/lib/mastercard/api/blockchain/node.rb +10 -10
- data/lib/mastercard/api/blockchain/resourceconfig.rb +1 -1
- data/lib/mastercard/api/blockchain/settle.rb +86 -0
- data/lib/mastercard/api/blockchain/sign.rb +2 -2
- data/lib/mastercard/api/blockchain/status.rb +2 -2
- data/lib/mastercard/api/blockchain/transactionentry.rb +4 -4
- data/lib/mastercard_blockchain.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6291c2d9c8f109eca144aad5161aaf1e795554b9
|
4
|
+
data.tar.gz: 30b103cda8c337f4f007c86575383077f1d04f5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e4ae487b75ef8065cd6cdb0d5068616ce3b5bf7c8070b386657abd753ea669dab35e5b534ef198b3a119ace8b3861b27eb1af4d6008b8acaaaeca30ab968220
|
7
|
+
data.tar.gz: 84e63e5b8e8640cb02a2bf595009e3121bb8ac64db2aa7c61cff6650dd197d3c317c518efa19cf645cd3a2fa0ea0cde47cef185d5a564e3c2da65b9cb8e1aa07
|
@@ -37,8 +37,8 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
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
42
|
|
43
43
|
}
|
44
44
|
|
@@ -82,7 +82,7 @@ module MasterCard
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
-
return self.execute("
|
85
|
+
return self.execute("9d34a46e-5864-4961-8c3f-a8c0c0cf2f83",App.new(mapObj))
|
86
86
|
end
|
87
87
|
|
88
88
|
|
@@ -95,7 +95,7 @@ module MasterCard
|
|
95
95
|
#@return [App] object representing the response.
|
96
96
|
#@raise [APIException] an exception from the response status
|
97
97
|
#
|
98
|
-
return self.class.execute("
|
98
|
+
return self.class.execute("365c3bdc-43f8-46e4-8de9-773b4aaadb94",self)
|
99
99
|
end
|
100
100
|
|
101
101
|
|
@@ -0,0 +1,86 @@
|
|
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
|
+
|
@@ -37,8 +37,8 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
40
|
+
'44f88516-de8b-4b5e-9509-3e4de20c2d46' => OperationConfig.new("/labs/proxy/chain/api/v1/network/block", "list", [], ["from","to"]),
|
41
|
+
'f2600e8c-8c24-423a-98ba-7c2a4edeae6c' => OperationConfig.new("/labs/proxy/chain/api/v1/network/block/{id}", "read", [], []),
|
42
42
|
|
43
43
|
}
|
44
44
|
|
@@ -69,9 +69,9 @@ module MasterCard
|
|
69
69
|
#@raise [APIException] an exception from the response status
|
70
70
|
|
71
71
|
if criteria.nil?
|
72
|
-
return self.execute("
|
72
|
+
return self.execute("44f88516-de8b-4b5e-9509-3e4de20c2d46",Block.new)
|
73
73
|
else
|
74
|
-
return self.execute("
|
74
|
+
return self.execute("44f88516-de8b-4b5e-9509-3e4de20c2d46",Block.new(criteria))
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
@@ -102,7 +102,7 @@ module MasterCard
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
105
|
-
return self.execute("
|
105
|
+
return self.execute("f2600e8c-8c24-423a-98ba-7c2a4edeae6c",Block.new(mapObj))
|
106
106
|
end
|
107
107
|
|
108
108
|
|
@@ -37,7 +37,7 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
40
|
+
'ae1b5b9c-032e-4475-88c3-b9f2129d97ad' => OperationConfig.new("/labs/proxy/chain/api/v1/network/support/encoding", "create", [], []),
|
41
41
|
|
42
42
|
}
|
43
43
|
|
@@ -64,7 +64,7 @@ module MasterCard
|
|
64
64
|
#@param Dict mapObj, containing the required parameters to create a new object
|
65
65
|
#@return [Encoding] of the response of created instance.
|
66
66
|
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("
|
67
|
+
return self.execute("ae1b5b9c-032e-4475-88c3-b9f2129d97ad", Encoding.new(mapObj))
|
68
68
|
end
|
69
69
|
|
70
70
|
|
@@ -37,11 +37,11 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
42
|
-
'
|
43
|
-
'
|
44
|
-
'
|
40
|
+
'1821179a-c369-4fde-9c75-4113067d721f' => OperationConfig.new("/labs/proxy/chain/api/v1/network/create", "create", [], []),
|
41
|
+
'a6dac6ba-4311-47fd-97a2-b4ed1a57ad9e' => OperationConfig.new("/labs/proxy/chain/api/v1/network/invite", "create", [], []),
|
42
|
+
'71a907a6-38fd-4daa-86f3-4318d1c293fd' => OperationConfig.new("/labs/proxy/chain/api/v1/network/join", "create", [], []),
|
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
45
|
|
46
46
|
}
|
47
47
|
|
@@ -68,7 +68,7 @@ module MasterCard
|
|
68
68
|
#@param Dict mapObj, containing the required parameters to create a new object
|
69
69
|
#@return [Node] of the response of created instance.
|
70
70
|
#@raise [APIException] an exception from the response status
|
71
|
-
return self.execute("
|
71
|
+
return self.execute("1821179a-c369-4fde-9c75-4113067d721f", Node.new(mapObj))
|
72
72
|
end
|
73
73
|
|
74
74
|
|
@@ -84,7 +84,7 @@ module MasterCard
|
|
84
84
|
#@param Dict mapObj, containing the required parameters to create a new object
|
85
85
|
#@return [Node] of the response of created instance.
|
86
86
|
#@raise [APIException] an exception from the response status
|
87
|
-
return self.execute("
|
87
|
+
return self.execute("a6dac6ba-4311-47fd-97a2-b4ed1a57ad9e", Node.new(mapObj))
|
88
88
|
end
|
89
89
|
|
90
90
|
|
@@ -100,7 +100,7 @@ module MasterCard
|
|
100
100
|
#@param Dict mapObj, containing the required parameters to create a new object
|
101
101
|
#@return [Node] of the response of created instance.
|
102
102
|
#@raise [APIException] an exception from the response status
|
103
|
-
return self.execute("
|
103
|
+
return self.execute("71a907a6-38fd-4daa-86f3-4318d1c293fd", Node.new(mapObj))
|
104
104
|
end
|
105
105
|
|
106
106
|
|
@@ -133,7 +133,7 @@ module MasterCard
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
-
return self.execute("
|
136
|
+
return self.execute("4b8ba080-2613-4b15-9785-e1fe8b33a06d",Node.new(mapObj))
|
137
137
|
end
|
138
138
|
|
139
139
|
|
@@ -151,7 +151,7 @@ module MasterCard
|
|
151
151
|
#@raise [APIException] an exception from the response status
|
152
152
|
#
|
153
153
|
|
154
|
-
return self.execute("
|
154
|
+
return self.execute("de1b9b11-9c11-43a3-9e27-6ab499102e29",Node.new(criteria))
|
155
155
|
end
|
156
156
|
|
157
157
|
|
@@ -0,0 +1,86 @@
|
|
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
|
+
|
@@ -37,7 +37,7 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
40
|
+
'be20d697-d24e-4fa8-8a74-e4aaa173c708' => OperationConfig.new("/labs/proxy/chain/api/v1/network/sign", "create", [], []),
|
41
41
|
|
42
42
|
}
|
43
43
|
|
@@ -64,7 +64,7 @@ module MasterCard
|
|
64
64
|
#@param Dict mapObj, containing the required parameters to create a new object
|
65
65
|
#@return [Sign] of the response of created instance.
|
66
66
|
#@raise [APIException] an exception from the response status
|
67
|
-
return self.execute("
|
67
|
+
return self.execute("be20d697-d24e-4fa8-8a74-e4aaa173c708", Sign.new(mapObj))
|
68
68
|
end
|
69
69
|
|
70
70
|
|
@@ -37,7 +37,7 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
40
|
+
'b1002f01-f841-4b20-b05d-f0b32422ff1c' => OperationConfig.new("/labs/proxy/chain/api/v1/network/status", "query", [], []),
|
41
41
|
|
42
42
|
}
|
43
43
|
|
@@ -70,7 +70,7 @@ module MasterCard
|
|
70
70
|
#@raise [APIException] an exception from the response status
|
71
71
|
#
|
72
72
|
|
73
|
-
return self.execute("
|
73
|
+
return self.execute("b1002f01-f841-4b20-b05d-f0b32422ff1c",Status.new(criteria))
|
74
74
|
end
|
75
75
|
|
76
76
|
|
@@ -37,8 +37,8 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
40
|
+
'055001bf-4a21-4da1-a519-7fe8ba6aef72' => OperationConfig.new("/labs/proxy/chain/api/v1/network/entry/{hash}", "read", [], []),
|
41
|
+
'ef71142f-9e18-4053-b35e-e71f95e388b9' => OperationConfig.new("/labs/proxy/chain/api/v1/network/entry", "create", [], []),
|
42
42
|
|
43
43
|
}
|
44
44
|
|
@@ -82,7 +82,7 @@ module MasterCard
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
-
return self.execute("
|
85
|
+
return self.execute("055001bf-4a21-4da1-a519-7fe8ba6aef72",TransactionEntry.new(mapObj))
|
86
86
|
end
|
87
87
|
|
88
88
|
|
@@ -94,7 +94,7 @@ module MasterCard
|
|
94
94
|
#@param Dict mapObj, containing the required parameters to create a new object
|
95
95
|
#@return [TransactionEntry] of the response of created instance.
|
96
96
|
#@raise [APIException] an exception from the response status
|
97
|
-
return self.execute("
|
97
|
+
return self.execute("ef71142f-9e18-4053-b35e-e71f95e388b9", TransactionEntry.new(mapObj))
|
98
98
|
end
|
99
99
|
|
100
100
|
|
@@ -3,9 +3,11 @@ require 'mastercard_api_core'
|
|
3
3
|
require 'mastercard/api/blockchain/resourceconfig'
|
4
4
|
|
5
5
|
require 'mastercard/api/blockchain/app'
|
6
|
+
require 'mastercard/api/blockchain/authorize'
|
6
7
|
require 'mastercard/api/blockchain/block'
|
7
8
|
require 'mastercard/api/blockchain/encoding'
|
8
9
|
require 'mastercard/api/blockchain/node'
|
10
|
+
require 'mastercard/api/blockchain/settle'
|
9
11
|
require 'mastercard/api/blockchain/sign'
|
10
12
|
require 'mastercard/api/blockchain/status'
|
11
13
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MasterCard Worldwide
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mastercard_api_core
|
@@ -52,10 +52,12 @@ extensions: []
|
|
52
52
|
extra_rdoc_files: []
|
53
53
|
files:
|
54
54
|
- lib/mastercard/api/blockchain/app.rb
|
55
|
+
- lib/mastercard/api/blockchain/authorize.rb
|
55
56
|
- lib/mastercard/api/blockchain/block.rb
|
56
57
|
- lib/mastercard/api/blockchain/encoding.rb
|
57
58
|
- lib/mastercard/api/blockchain/node.rb
|
58
59
|
- lib/mastercard/api/blockchain/resourceconfig.rb
|
60
|
+
- lib/mastercard/api/blockchain/settle.rb
|
59
61
|
- lib/mastercard/api/blockchain/sign.rb
|
60
62
|
- lib/mastercard/api/blockchain/status.rb
|
61
63
|
- lib/mastercard/api/blockchain/transactionentry.rb
|