Created
March 10, 2019 02:47
-
-
Save alexed1/0bf3a4a199baaa23025b5e338fbf5535 to your computer and use it in GitHub Desktop.
This file contains 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
global with sharing class GetVehicle { | |
@InvocableMethod | |
public static List<Results> getVehicle(List<Requests> requests) | |
{ | |
Vehicle curVehicle = new Vehicle(); | |
curVehicle.model = 'Tesla'; | |
Vehicle.Wheel curWheel = new Vehicle.Wheel(); | |
curWheel.tireSize = '240/R15'; | |
curWheel.tireBrand = 'Goodyear'; | |
curVehicle.Wheels.add(curWheel); | |
Results curResult = new Results(); | |
curResult.vehicle = curVehicle; | |
List<Results> resultsList = new List<results>(); | |
resultsList.add(curResult); | |
return resultsList; | |
} | |
global class Requests { | |
@InvocableVariable | |
global String price; | |
@InvocableVariable | |
global String modelName; | |
@InvocableVariable | |
global String transactionDate; | |
@InvocableVariable | |
global String orderTaker; | |
} | |
global class Results { | |
@InvocableVariable | |
global Vehicle vehicle; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment