mastercard_blockchain 0.0.6 → 19.8.0
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/blockchain/block.rb +5 -5
- data/lib/mastercard/api/blockchain/node.rb +32 -2
- data/lib/mastercard/api/blockchain/resourceconfig.rb +1 -1
- data/lib/mastercard/api/blockchain/send.rb +86 -0
- data/lib/mastercard/api/blockchain/status.rb +2 -2
- data/lib/mastercard/api/blockchain/transactionentry.rb +4 -4
- data/lib/mastercard_blockchain.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e48cca3285c18cf319ba2b7ac02738df6a4c37977e6c09a10a50bfd4897d37e9
|
4
|
+
data.tar.gz: b020963af0e53c91b152df83fea4739cd9fa4a0bf94773e6adfc37315d1e875d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7662770ab6cececf59bc1b2f3907d8613cf18a61270150bb49bd1ae4edd19a83c4e9172b1bf45702253aeb26933014e8ec74105876654f5a3f168f87ffbd2454
|
7
|
+
data.tar.gz: '09089c5016ef60e759de5fef31d956b5108023e5607493bdf6af1d4b67361defb2c700babf108bce0ed2812430b988d573ec25163d572ec25c8ca370626ce574'
|
@@ -37,8 +37,8 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
41
|
-
'
|
40
|
+
'6fa74e2a-fc21-413b-bf66-787baf2fdf47' => OperationConfig.new("/chain/api/network/blocks", "list", [], ["offset","count"]),
|
41
|
+
'64f17374-6d96-4f30-99e9-2a18280c04d8' => OperationConfig.new("/chain/api/network/blocks/{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("6fa74e2a-fc21-413b-bf66-787baf2fdf47",Block.new)
|
73
73
|
else
|
74
|
-
return self.execute("
|
74
|
+
return self.execute("6fa74e2a-fc21-413b-bf66-787baf2fdf47",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("64f17374-6d96-4f30-99e9-2a18280c04d8",Block.new(mapObj))
|
106
106
|
end
|
107
107
|
|
108
108
|
|
@@ -37,7 +37,8 @@ module MasterCard
|
|
37
37
|
#
|
38
38
|
|
39
39
|
@__store = {
|
40
|
-
'
|
40
|
+
'd2676155-1d17-447c-a74e-3be8eea961eb' => OperationConfig.new("/chain/api/network/nodes/{address}", "read", [], []),
|
41
|
+
'66f36b7d-526f-4276-9e3a-f7f4bb0e5d99' => OperationConfig.new("/chain/api/network/nodes", "query", [], []),
|
41
42
|
|
42
43
|
}
|
43
44
|
|
@@ -61,6 +62,35 @@ module MasterCard
|
|
61
62
|
|
62
63
|
|
63
64
|
|
65
|
+
def self.read(id, criteria = nil)
|
66
|
+
#
|
67
|
+
#Returns objects of type Node by id and optional criteria
|
68
|
+
#@param [String] id
|
69
|
+
#@param [Dict] criteria
|
70
|
+
#@return [Node] object representing the response
|
71
|
+
#@raise [APIException] an exception from the response status
|
72
|
+
|
73
|
+
mapObj = Node.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("d2676155-1d17-447c-a74e-3be8eea961eb",Node.new(mapObj))
|
86
|
+
end
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
64
94
|
|
65
95
|
def self.query(criteria)
|
66
96
|
#
|
@@ -70,7 +100,7 @@ module MasterCard
|
|
70
100
|
#@raise [APIException] an exception from the response status
|
71
101
|
#
|
72
102
|
|
73
|
-
return self.execute("
|
103
|
+
return self.execute("66f36b7d-526f-4276-9e3a-f7f4bb0e5d99",Node.new(criteria))
|
74
104
|
end
|
75
105
|
|
76
106
|
|
@@ -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 Send < MasterCard::Core::Model::BaseObject
|
36
|
+
include MasterCard::Core::Model
|
37
|
+
#
|
38
|
+
|
39
|
+
@__store = {
|
40
|
+
'1fc6125a-645f-4bdc-91a5-e6477ad73134' => OperationConfig.new("/chain/api/network/messages", "create", [], []),
|
41
|
+
|
42
|
+
}
|
43
|
+
|
44
|
+
protected
|
45
|
+
|
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
|
+
|
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
|
+
|
57
|
+
public
|
58
|
+
|
59
|
+
|
60
|
+
def self.create(mapObj)
|
61
|
+
#
|
62
|
+
#Creates object of type Send
|
63
|
+
#
|
64
|
+
#@param Dict mapObj, containing the required parameters to create a new object
|
65
|
+
#@return [Send] of the response of created instance.
|
66
|
+
#@raise [APIException] an exception from the response status
|
67
|
+
return self.execute("1fc6125a-645f-4bdc-91a5-e6477ad73134", Send.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
|
+
'7445f81b-1fbb-46c4-92b5-a56163cdd85d' => OperationConfig.new("/chain/api/network/general-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("7445f81b-1fbb-46c4-92b5-a56163cdd85d",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
|
+
'6972f031-b1ab-4993-99ff-6bd3b2530077' => OperationConfig.new("/chain/api/network/entries/{hash}", "read", [], []),
|
41
|
+
'bfe6db7a-c751-4de9-8c5e-0dfdad754123' => OperationConfig.new("/chain/api/network/entries", "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("6972f031-b1ab-4993-99ff-6bd3b2530077",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("bfe6db7a-c751-4de9-8c5e-0dfdad754123", TransactionEntry.new(mapObj))
|
98
98
|
end
|
99
99
|
|
100
100
|
|
@@ -4,5 +4,6 @@ require 'mastercard/api/blockchain/resourceconfig'
|
|
4
4
|
|
5
5
|
require 'mastercard/api/blockchain/block'
|
6
6
|
require 'mastercard/api/blockchain/node'
|
7
|
+
require 'mastercard/api/blockchain/send'
|
7
8
|
require 'mastercard/api/blockchain/status'
|
8
9
|
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:
|
4
|
+
version: 19.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MasterCard Worldwide
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mastercard_api_core
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- lib/mastercard/api/blockchain/block.rb
|
55
55
|
- lib/mastercard/api/blockchain/node.rb
|
56
56
|
- lib/mastercard/api/blockchain/resourceconfig.rb
|
57
|
+
- lib/mastercard/api/blockchain/send.rb
|
57
58
|
- lib/mastercard/api/blockchain/status.rb
|
58
59
|
- lib/mastercard/api/blockchain/transactionentry.rb
|
59
60
|
- lib/mastercard_blockchain.rb
|