This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public <R extends Object, S extends Object, A extends IdempotencyRequest> Response process( | |
String idempotencyKey, | |
UriInfo uriInfo, | |
SetupExecutable<A> preRpcExecutable, // Pre-RPC lambda | |
ProcessExecutable<R, A> rpcExecutable, // RPC lambda | |
PostProcessExecutable<R, S> postRpcExecutable) // Post-RPC lambda | |
throws YourCustomException { | |
try { | |
// Find previous request (for retries), otherwise create | |
IdempotencyRequest idempotencyRequest = createOrFindRequest(idempotencyKey, apiUri); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Response processPayment(InitiatePaymentRequest request, UriInfo uriInfo) | |
throws YourCustomException { | |
return orpheusManager.process( | |
request.getIdempotencyKey(), | |
uriInfo, | |
// 1. Pre-RPC | |
() -> { | |
// Record payment request information from the request object | |
PaymentRequestResource paymentRequestResource = recordPaymentRequest(request); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public String weekday1(int day) { | |
switch (day) { | |
case 1: | |
return "Monday"; | |
case 2: | |
return "Tuesday"; | |
case 3: | |
return "Wednesday"; | |
case 4: | |
return "Thursday"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract boolean isCustom(); | |
public abstract Map<String, Object> getExtData(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* version1: convert online image | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat='image/png'] | |
* @author HaNdTriX | |
* @example | |
convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
console.log('IMAGE:',base64Img); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def action_with(context) | |
nested_element(identifier: "#{context}").click | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Movie | |
def self.cinema(name) | |
@cinema = name | |
end | |
def self.shouting | |
puts "this will be play at #{@cinema}" | |
end | |
end |