Class: MasterCard::API::Blockchain::Block
- Inherits:
-
Core::Model::BaseObject
- Object
- Core::Model::BaseObject
- MasterCard::API::Blockchain::Block
- Includes:
- Core::Model
- Defined in:
- lib/mastercard/api/blockchain/block.rb
Class Method Summary collapse
Class Method Details
.listByCriteria(criteria = nil) ⇒ Object
63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mastercard/api/blockchain/block.rb', line 63 def self.listByCriteria(criteria = nil) # #List objects of type Block # #@param [Dict] criteria #@return Array [Block] object matching the criteria. #@raise [APIException] an exception from the response status if criteria.nil? return self.execute("44f88516-de8b-4b5e-9509-3e4de20c2d46",Block.new) else return self.execute("44f88516-de8b-4b5e-9509-3e4de20c2d46",Block.new(criteria)) end end |
.read(id, criteria = nil) ⇒ Object
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mastercard/api/blockchain/block.rb', line 85 def self.read(id, criteria = nil) # #Returns objects of type Block by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Block] object representing the response #@raise [APIException] an exception from the response status mapObj = Block.new if !(id.nil? || id.to_s.empty?) mapObj.set("id", id) end if !criteria.nil? if criteria.instance_of? RequestMap mapObj.setAll(criteria.getObject()) else mapObj.setAll(criteria) end end return self.execute("f2600e8c-8c24-423a-98ba-7c2a4edeae6c",Block.new(mapObj)) end |