class MasterCard::API::TravelRecommender::Card

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/travelrecommender/card.rb, line 62
def self.create(mapObj)
        #
        #Creates object of type Card
        #
        #@param Dict mapObj, containing the required parameters to create a new object
        #@return [Card] of the response of created instance.
        #@raise [APIException] an exception from the response status
        return self.execute("a6bd8175-cc80-480a-aaac-126cf1eefbea", Card.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/travelrecommender/card.rb, line 81
def self.deleteById(id, map = nil)
        #Delete object of type Card by id

        #@param [String] id
        #@param [Dict] map, containing additional parameters
        #@return [Card] of the response of the deleted instance.
        #@raise [APIException] an exception from the response status


        mapObj = Card.new
        if !(id.nil? || id.to_s.empty?)
          mapObj.set("id", id)
        end
        if !map.nil?
                if map.instance_of? RequestMap
                  mapObj.setAll(map.getObject())
                else
                  mapObj.setAll(map)
                end
        end

        return self.execute("5f9ce1a4-2d9c-483c-96a4-f0f4f9b84e39", mapObj)
end

Protected Class Methods

getOperationConfig(operationUUID) click to toggle source
# File lib/mastercard/api/travelrecommender/card.rb, line 48
def self.getOperationConfig(operationUUID)
        if @__store.key?(operationUUID)
                return @__store[operationUUID]
        end
        raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
end
getOperationMetadata() click to toggle source
# File lib/mastercard/api/travelrecommender/card.rb, line 55
def self.getOperationMetadata()
        return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
end

Public Instance Methods

delete() click to toggle source
# File lib/mastercard/api/travelrecommender/card.rb, line 106
def delete
        #
        #Delete object of type Card

        #@param [String] id
        #@return [Card] of the response of the deleted instance.
        #@raise [APIException] an exception from the response status
        #

        return self.class.execute("5f9ce1a4-2d9c-483c-96a4-f0f4f9b84e39", self)
end
update() click to toggle source
# File lib/mastercard/api/travelrecommender/card.rb, line 122
def update
        #
        #Updates an object of type Card
        #
        #@return [Card] object representing the response.
        #@raise [APIException] an exception from the response status
        #
        return self.class.execute("ca4034d7-d105-4c9b-ad46-3c3b2f2e54d2",self)
end