class MasterCard::API::MerchantRetailLocations::RetailUnits

Public Class Methods

getApiVersion() click to toggle source
# File lib/mastercard/api/merchantretaillocations/retailunits.rb, line 76
def self.getApiVersion
    return "0.0.1"
end
query(criteria) click to toggle source
# File lib/mastercard/api/merchantretaillocations/retailunits.rb, line 88
def self.query(criteria)
    #
    #Query objects of type RetailUnits by id and optional criteria
    #@param type criteria
    #@return RetailUnits object representing the response.
    #

    obj = RetailUnits.new(criteria)
    return self.queryObject(obj)
end

Public Instance Methods

getHeaderParams(action) click to toggle source
# File lib/mastercard/api/merchantretaillocations/retailunits.rb, line 52
def getHeaderParams(action)
    #Returns a list containing header params
    #@return list
    action = action.upcase
    
    if action == "QUERY"
        return []
        end
    
    raise StandardError.new("Invalid action supplied: #{action.to_s}")
end
getQueryParams(action) click to toggle source
# File lib/mastercard/api/merchantretaillocations/retailunits.rb, line 64
def getQueryParams(action)
    #Returns a list containing query params
    #@return list
    action = action.upcase
    
    if action == "QUERY"
        return ["PageOffset","PageLength","CountryCode","StateId","CountyId","CensusTract","PostalCode","RetailUnitType","RetailUnitId"]
    end
    
    raise StandardError.new("Invalid action supplied: #{action.to_s}")
end
getResourcePath(action) click to toggle source
# File lib/mastercard/api/merchantretaillocations/retailunits.rb, line 38
def getResourcePath(action)
    #Returns the resource path based on the action
    #@return str

    action = action.upcase
    
    if action == "QUERY"
        return "/upfront/v1/upfront/retailunits"
        end
    
    raise StandardError.new("Invalid action supplied: #{action.to_s}")

end