Class: MasterCard::API::BlockchainB2bxb::Payments

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

Class Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



79
80
81
82
83
84
85
86
87
# File 'lib/mastercard/api/blockchainb2bxb/payments.rb', line 79

def self.create(mapObj)
	#
	#Creates object of type Payments
	#
	#@param Dict mapObj, containing the required parameters to create a new object
	#@return [Payments] of the response of created instance.
	#@raise [APIException] an exception from the response status
	return self.execute("862c7648-7d68-4f6f-97c7-34514feb2917", Payments.new(mapObj))
end

.query(criteria) ⇒ Object



67
68
69
70
71
72
73
74
75
76
# File 'lib/mastercard/api/blockchainb2bxb/payments.rb', line 67

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

	return self.execute("2c0ee91a-d847-4ca2-a629-c82475c8f3ae",Payments.new(criteria))
end

.read(id, criteria = nil) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/mastercard/api/blockchainb2bxb/payments.rb', line 99

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

	mapObj = Payments.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("239e408c-40de-4bc8-a42c-3db1dfc730a4",Payments.new(mapObj))
end