Class: MasterCard::API::Blockchain::Node

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/blockchain/node.rb

Class Method Summary collapse

Class Method Details

.invite(mapObj) ⇒ Object



80
81
82
83
84
85
86
87
88
# File 'lib/mastercard/api/blockchain/node.rb', line 80

def self.invite(mapObj)
  #
  #Creates object of type Node
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Node] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("a6dac6ba-4311-47fd-97a2-b4ed1a57ad9e", Node.new(mapObj))
end

.join(mapObj) ⇒ Object



96
97
98
99
100
101
102
103
104
# File 'lib/mastercard/api/blockchain/node.rb', line 96

def self.join(mapObj)
  #
  #Creates object of type Node
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Node] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("71a907a6-38fd-4daa-86f3-4318d1c293fd", Node.new(mapObj))
end

.provision(mapObj) ⇒ Object



64
65
66
67
68
69
70
71
72
# File 'lib/mastercard/api/blockchain/node.rb', line 64

def self.provision(mapObj)
  #
  #Creates object of type Node
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Node] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("1821179a-c369-4fde-9c75-4113067d721f", Node.new(mapObj))
end

.query(criteria) ⇒ Object



146
147
148
149
150
151
152
153
154
155
# File 'lib/mastercard/api/blockchain/node.rb', line 146

def self.query(criteria)
  #
  #Query objects of type Node by id and optional criteria
  #@param [Dict] criteria
  #@return [Node] object representing the response.
  #@raise [APIException] an exception from the response status
  #

  return self.execute("de1b9b11-9c11-43a3-9e27-6ab499102e29",Node.new(criteria))
end

.read(id, criteria = nil) ⇒ Object



116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/mastercard/api/blockchain/node.rb', line 116

def self.read(id, criteria = nil)
  #
  #Returns objects of type Node by id and optional criteria
  #@param [String] id
  #@param [Dict] criteria
  #@return [Node] object representing the response
  #@raise [APIException] an exception from the response status

  mapObj = Node.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("4b8ba080-2613-4b15-9785-e1fe8b33a06d",Node.new(mapObj))
end