Class: MasterCard::API::Stp::Payment
- Inherits:
-
Core::Model::BaseObject
- Object
- Core::Model::BaseObject
- MasterCard::API::Stp::Payment
- Includes:
- Core::Model
- Defined in:
- lib/mastercard/api/stp/payment.rb
Class Method Summary collapse
Class Method Details
.query(criteria) ⇒ Object
95 96 97 98 99 100 101 102 103 104 |
# File 'lib/mastercard/api/stp/payment.rb', line 95 def self.query(criteria) # #Query objects of type Payment by id and optional criteria #@param [Dict] criteria #@return [Payment] object representing the response. #@raise [APIException] an exception from the response status # return self.execute("96d61187-dbb2-41f3-914b-5d659f5a08f2",Payment.new(criteria)) end |
.read(id, criteria = nil) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mastercard/api/stp/payment.rb', line 65 def self.read(id, criteria = nil) # #Returns objects of type Payment by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Payment] object representing the response #@raise [APIException] an exception from the response status mapObj = Payment.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("8b9c6910-d1fc-46e8-8df4-c98183802e1a",Payment.new(mapObj)) end |