Class: MasterCard::API::Mastercom::Claims

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



62
63
64
65
66
67
68
69
70
# File 'lib/mastercard/api/mastercom/claims.rb', line 62

def self.create(mapObj)
    #
    #Creates object of type Claims
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [Claims] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("767c56f6-e41c-4845-974b-6a25d90608c7", Claims.new(mapObj))
end

.retrieve(id, criteria = nil) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/mastercard/api/mastercom/claims.rb', line 82

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

    mapObj = Claims.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("6c4f87f3-ebb9-4367-9a98-3299aa6b02df",Claims.new(mapObj))
end

Instance Method Details

#updateObject



108
109
110
111
112
113
114
115
116
# File 'lib/mastercard/api/mastercom/claims.rb', line 108

def update
    #
    #Updates an object of type Claims
    #
    #@return [Claims] object representing the response.
    #@raise [APIException] an exception from the response status
    #
    return self.class.execute("2375e5f0-fa8c-4b78-b020-e51da4ba2e82",self)
end