forked from loafle/openapi-generator-original
rpelace api with api_instance
This commit is contained in:
@@ -28,11 +28,11 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or non
|
||||
```perl
|
||||
use Data::Dumper;
|
||||
|
||||
my $api = WWW::SwaggerClient::StoreApi->new();
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $order_id = 'order_id_example'; # string | ID of the order that needs to be deleted
|
||||
|
||||
eval {
|
||||
$api->delete_order(order_id => $order_id);
|
||||
$api_instance->delete_order(order_id => $order_id);
|
||||
};
|
||||
if ($@) {
|
||||
warn "Exception when calling StoreApi->delete_order: $@\n";
|
||||
@@ -80,11 +80,11 @@ WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
||||
|
||||
my $api = WWW::SwaggerClient::StoreApi->new();
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $status = 'status_example'; # string | Status value that needs to be considered for query
|
||||
|
||||
eval {
|
||||
my $result = $api->find_orders_by_status(status => $status);
|
||||
my $result = $api_instance->find_orders_by_status(status => $status);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@@ -129,10 +129,10 @@ WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||
|
||||
my $api = WWW::SwaggerClient::StoreApi->new();
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
|
||||
eval {
|
||||
my $result = $api->get_inventory();
|
||||
my $result = $api_instance->get_inventory();
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@@ -174,10 +174,10 @@ WWW::SwaggerClient::Configuration::api_key->{'api_key'} = 'YOUR_API_KEY';
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'api_key'} = "BEARER";
|
||||
|
||||
my $api = WWW::SwaggerClient::StoreApi->new();
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
|
||||
eval {
|
||||
my $result = $api->get_inventory_in_object();
|
||||
my $result = $api_instance->get_inventory_in_object();
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@@ -223,11 +223,11 @@ WWW::SwaggerClient::Configuration::api_key->{'test_api_key_query'} = 'YOUR_API_K
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'test_api_key_query'} = "BEARER";
|
||||
|
||||
my $api = WWW::SwaggerClient::StoreApi->new();
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $order_id = 'order_id_example'; # string | ID of pet that needs to be fetched
|
||||
|
||||
eval {
|
||||
my $result = $api->get_order_by_id(order_id => $order_id);
|
||||
my $result = $api_instance->get_order_by_id(order_id => $order_id);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
@@ -276,11 +276,11 @@ WWW::SwaggerClient::Configuration::api_key->{'x-test_api_client_secret'} = 'YOUR
|
||||
# uncomment below to setup prefix (e.g. BEARER) for API key, if needed
|
||||
#WWW::SwaggerClient::Configuration::api_key_prefix->{'x-test_api_client_secret'} = "BEARER";
|
||||
|
||||
my $api = WWW::SwaggerClient::StoreApi->new();
|
||||
my $api_instance = WWW::SwaggerClient::StoreApi->new();
|
||||
my $body = WWW::SwaggerClient::Object::Order->new(); # Order | order placed for purchasing the pet
|
||||
|
||||
eval {
|
||||
my $result = $api->place_order(body => $body);
|
||||
my $result = $api_instance->place_order(body => $body);
|
||||
print Dumper($result);
|
||||
};
|
||||
if ($@) {
|
||||
|
||||
Reference in New Issue
Block a user