class MasterCard::API::StpApiSdk::Supplier
Public Class Methods
read(id, criteria = nil)
click to toggle source
# File lib/mastercard/api/stpapisdk/supplier.rb, line 65 def self.read(id, criteria = nil) # #Returns objects of type Supplier by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Supplier] object representing the response #@raise [APIException] an exception from the response status mapObj = Supplier.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("807f78d2-0a64-4626-9a69-9270609ead90",Supplier.new(mapObj)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/stpapisdk/supplier.rb, line 47 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/stpapisdk/supplier.rb, line 54 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
update()
click to toggle source
# File lib/mastercard/api/stpapisdk/supplier.rb, line 91 def update # #Updates an object of type Supplier # #@return [Supplier] object representing the response. #@raise [APIException] an exception from the response status # return self.class.execute("8118af73-5b74-4174-bd6f-5f5f0802f21c",self) end