Class: MasterCard::API::RiskBasedDecisioning::ECommerceMessage

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/mastercard/api/riskbaseddecisioning/ecommercemessage.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.getApiVersionObject



76
77
78
# File 'lib/mastercard/api/riskbaseddecisioning/ecommercemessage.rb', line 76

def self.getApiVersion
    return "0.0.2"
end

Instance Method Details

#getHeaderParams(action) ⇒ Object

Raises:

  • (StandardError)


52
53
54
55
56
57
58
59
60
61
62
# File 'lib/mastercard/api/riskbaseddecisioning/ecommercemessage.rb', line 52

def getHeaderParams(action)
    #Returns a list containing header params
    #@return list
    action = action.upcase
    
    if action == "UPDATE"
        return []
    end
    
    raise StandardError.new("Invalid action supplied: #{action.to_s}")
end

#getQueryParams(action) ⇒ Object

Raises:

  • (StandardError)


64
65
66
67
68
69
70
71
72
73
74
# File 'lib/mastercard/api/riskbaseddecisioning/ecommercemessage.rb', line 64

def getQueryParams(action)
    #Returns a list containing query params
    #@return list
    action = action.upcase
    
    if action == "UPDATE"
        return []
    end
    
    raise StandardError.new("Invalid action supplied: #{action.to_s}")
end

#getResourcePath(action) ⇒ Object

Raises:

  • (StandardError)


38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/mastercard/api/riskbaseddecisioning/ecommercemessage.rb', line 38

def getResourcePath(action)
    #Returns the resource path based on the action
    #@return str

    action = action.upcase
    
    if action == "UPDATE"
        return "/rest/fraud/riskbaseddecisioning/v1/notify-event"
    end
    
    raise StandardError.new("Invalid action supplied: #{action.to_s}")

end

#updateObject



84
85
86
87
88
89
90
91
# File 'lib/mastercard/api/riskbaseddecisioning/ecommercemessage.rb', line 84

def update
    #
    #Updates an object of type ECommerceMessage
    #
    #@return ECommerceMessage object representing the response.
    #
    return self.class.updateObject(self)
end