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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a978a2c3dd3177d367f35221c8e3d58f46fa2c4f3d5a6af90195e31b4769966
4
- data.tar.gz: ecee78d02a11f3a90da71740677d7c0d7c0769822106e2fcdba5d8816d4f2751
3
+ metadata.gz: e48cca3285c18cf319ba2b7ac02738df6a4c37977e6c09a10a50bfd4897d37e9
4
+ data.tar.gz: b020963af0e53c91b152df83fea4739cd9fa4a0bf94773e6adfc37315d1e875d
5
5
  SHA512:
6
- metadata.gz: 843a51d22c032f598aaf39c78f16404c08eed0f5c23af3bf47e693266be88398bff07b9ad35277d232cb6af72ed64814cd1c3eec86fd6f255f0c71c29d757eb2
7
- data.tar.gz: 3c3f2cc3fed400e9cd4968d803b991fb14937fe8cf25a26ff4c046b4c52e6cc0693846831578006fd6abf62d13c32eea5ac9cb5291cf3eb385c4c8c6e19ee4c4
6
+ metadata.gz: 7662770ab6cececf59bc1b2f3907d8613cf18a61270150bb49bd1ae4edd19a83c4e9172b1bf45702253aeb26933014e8ec74105876654f5a3f168f87ffbd2454
7
+ data.tar.gz: '09089c5016ef60e759de5fef31d956b5108023e5607493bdf6af1d4b67361defb2c700babf108bce0ed2812430b988d573ec25163d572ec25c8ca370626ce574'
@@ -37,8 +37,8 @@ module MasterCard
37
37
  #
38
38
 
39
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", [], []),
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("391fbbb2-1734-402c-89d8-81591d4a9d92",Block.new)
72
+ return self.execute("6fa74e2a-fc21-413b-bf66-787baf2fdf47",Block.new)
73
73
  else
74
- return self.execute("391fbbb2-1734-402c-89d8-81591d4a9d92",Block.new(criteria))
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("91d1412c-c7f3-46a7-87d0-3da090cc281c",Block.new(mapObj))
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
- 'fe54f38f-e61b-4d1f-9aa7-a87178dea21b' => OperationConfig.new("/labs/proxy/chain/api/v1/network/node", "query", [], []),
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("fe54f38f-e61b-4d1f-9aa7-a87178dea21b",Node.new(criteria))
103
+ return self.execute("66f36b7d-526f-4276-9e3a-f7f4bb0e5d99",Node.new(criteria))
74
104
  end
75
105
 
76
106
 
@@ -71,7 +71,7 @@ module MasterCard
71
71
  end
72
72
 
73
73
  def getVersion
74
- return "blockchain:0.0.6"
74
+ return "blockchain:19.8.0"
75
75
  end
76
76
 
77
77
  def getJsonNative
@@ -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
- '315f067a-8861-4d77-a685-3db3ea110008' => OperationConfig.new("/labs/proxy/chain/api/v1/network/status", "query", [], []),
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("315f067a-8861-4d77-a685-3db3ea110008",Status.new(criteria))
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
- '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", [], []),
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("a8a586ff-3a1f-45eb-8f7f-c44525e7b6af",TransactionEntry.new(mapObj))
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("b1db4894-92b6-418f-a497-ea72c4290b1b", TransactionEntry.new(mapObj))
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: 0.0.6
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-02-20 00:00:00.000000000 Z
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