Using the Generated Proxy Classes

When the proxy classes have been generated into your schema, you can access the API as if it were your own classes. For example, you can perform a POST operation on a pet by simply instantiating the pet and passing it to the appropriate method of the appropriate resource proxy class, as shown in the following example.

exampleRest();
vars
    pet : Pet;
    api : Pets;
begin
    create pet transient;
    pet.name := "Fluffy";
    pet.status := "For Sale";
    pet.id := 314;

    create api transient;
    api.putPets(pet);
epilog
    delete pet;
    delete api;
end;