addPet
-Add a new pet to the store
--
/pet
- -
Usage and SDK Samples
- - - -curl -X POST "http://petstore.swagger.io/v2/pet"
- import io.swagger.client.*;
-import io.swagger.client.auth.*;
-import io.swagger.client.model.*;
-import io.swagger.client.api.PetApi;
-
-import java.io.File;
-import java.util.*;
-
-public class PetApiExample {
-
- public static void main(String[] args) {
- ApiClient defaultClient = Configuration.getDefaultApiClient();
-
- // Configure OAuth2 access token for authorization: petstore_auth
- OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
- petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
-
- PetApi apiInstance = new PetApi();
- Pet body = ; // Pet | Pet object that needs to be added to the store
- try {
- apiInstance.addPet(body);
- } catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
- }
+ defs["GetPaymentTransactionDetailsRequest"] = {
+ "type" : "object",
+ "required" : [ "my_institution", "uetr" ],
+ "properties" : {
+ "my_institution" : {
+ "type" : "array",
+ "description" : "Specifies the institution which payments are requested.",
+ "items" : {
+ "$ref" : "#/definitions/AnyBICIdentifier"
+ },
+ "maxItems" : 250
+ },
+ "uetr" : {
+ "description" : "Contains the unique end to end transaction reference (UETR) of a payment.",
+ "$ref" : "#/definitions/UUIDv4Identifier"
}
-}
- import io.swagger.client.api.PetApi;
-
-public class PetApiExample {
-
- public static void main(String[] args) {
- PetApi apiInstance = new PetApi();
- Pet body = ; // Pet | Pet object that needs to be added to the store
- try {
- apiInstance.addPet(body);
- } catch (ApiException e) {
- System.err.println("Exception when calling PetApi#addPet");
- e.printStackTrace();
- }
+ },
+ "description" : "This API is a payment query to get detailed information regarding a given payment transaction. It requires the UETR to be known.\r\nExamples of use cases are:\r\n•\tDebtor status check - debtor's agent or debtor wants to see the status\r\n•\tCreditor status check - creditor's agent or creditor wants to see the status\r\n"
+};
+ defs["GetPaymentTransactionDetailsResponse"] = {
+ "type" : "object",
+ "required" : [ "initiation_time", "last_update_time", "transaction_status", "uetr" ],
+ "properties" : {
+ "uetr" : {
+ "description" : "Contains the unique end to end transaction reference of a payment.",
+ "$ref" : "#/definitions/UUIDv4Identifier"
+ },
+ "transaction_status" : {
+ "description" : "Specifies the status of a transaction, in a coded form.",
+ "$ref" : "#/definitions/PaymentStatus3"
+ },
+ "cancellation_status" : {
+ "$ref" : "#/definitions/PaymentTransactionCancellationStatus1"
+ },
+ "initiation_time" : {
+ "description" : "Date and Time at which the message enters the tracking system (e.g. gpi).",
+ "$ref" : "#/definitions/ISODateTime"
+ },
+ "completion_time" : {
+ "description" : "Time at which the Instructed Bank reports that the transaction has been completed. \r\nDate and time based on the creation date of the status confirmation containing a final status ACSC",
+ "$ref" : "#/definitions/ISODateTime"
+ },
+ "last_update_time" : {
+ "description" : "Last date and time at which the status of this transaction was updated.",
+ "$ref" : "#/definitions/ISODateTime"
+ },
+ "payment_event" : {
+ "type" : "array",
+ "description" : "This groups the information of an event, i.e., of a payment message or status confirmation update. It is repeated as many times as there are events to be returned.",
+ "items" : {
+ "$ref" : "#/definitions/PaymentEvent7"
+ }
}
-}
- Configuration *apiConfig = [Configuration sharedConfig];
-
-// Configure OAuth2 access token for authorization: (authentication scheme: petstore_auth)
-[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];
-
-Pet *body = ; // Pet object that needs to be added to the store
-
-PetApi *apiInstance = [[PetApi alloc] init];
-
-// Add a new pet to the store
-[apiInstance addPetWith:body
- completionHandler: ^(NSError* error) {
- if (error) {
- NSLog(@"Error: %@", error);
- }
- }];
-
- var SwaggerPetstore = require('swagger_petstore');
-var defaultClient = SwaggerPetstore.ApiClient.instance;
-
-// Configure OAuth2 access token for authorization: petstore_auth
-var petstore_auth = defaultClient.authentications['petstore_auth'];
-petstore_auth.accessToken = "YOUR ACCESS TOKEN"
-
-var api = new SwaggerPetstore.PetApi()
-
-var body = ; // {Pet} Pet object that needs to be added to the store
-
-
-var callback = function(error, data, response) {
- if (error) {
- console.error(error);
- } else {
- console.log('API called successfully.');
- }
+ },
+ "description" : "This API is the response to a payment query to get detailed information regarding a given payment transaction.\r\nExamples of use cases are:\r\n•\tDebtor status check - debtor's agent or debtor wants to see the status\r\n•\tCreditor status check - creditor's agent or creditor wants to see the status\r\n"
};
-api.addPet(body, callback);
-
- using System;
-using System.Diagnostics;
-using IO.Swagger.Api;
-using IO.Swagger.Client;
-using IO.Swagger.Model;
-
-namespace Example
-{
- public class addPetExample
- {
- public void main()
- {
-
- // Configure OAuth2 access token for authorization: petstore_auth
- Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";
-
- var apiInstance = new PetApi();
- var body = new Pet(); // Pet | Pet object that needs to be added to the store
-
- try
- {
- // Add a new pet to the store
- apiInstance.addPet(body);
- }
- catch (Exception e)
- {
- Debug.Print("Exception when calling PetApi.addPet: " + e.Message );
- }
- }
+ defs["GetPaymentTransactionsRequest"] = {
+ "type" : "object",
+ "required" : [ "event", "maximum_number", "my_institution", "payment_scenario_return_criteria", "time_window" ],
+ "properties" : {
+ "my_institution" : {
+ "type" : "array",
+ "description" : "Specifies an institution that is owned by the sender, for which the sender can ask payment transaction details.",
+ "items" : {
+ "$ref" : "#/definitions/AnyBICIdentifier"
+ },
+ "maxItems" : 250
+ },
+ "time_window" : {
+ "description" : "Time window for this institution to which the search applies.",
+ "$ref" : "#/definitions/DateTimePeriodDetails"
+ },
+ "payment_scenario_return_criteria" : {
+ "description" : "Criteria that specify which payment scenario is to be returned by the search.",
+ "$ref" : "#/definitions/PaymentScenario2Code"
+ },
+ "agent" : {
+ "type" : "array",
+ "description" : "Identifies agent(s) involved in a payment transaction.",
+ "items" : {
+ "$ref" : "#/definitions/AgentType1"
+ }
+ },
+ "location" : {
+ "description" : "Specifies the location of the search.",
+ "$ref" : "#/definitions/Location1Code"
+ },
+ "instruction_identification" : {
+ "description" : "Unique identification, as assigned by an instructing party for an instructed party, to unambiguously identify the instruction.\n\nUsage: The instruction identification is a point to point reference that can be used between the instructing party and the instructed party to refer to the individual instruction. It can be included in several messages related to the instruction.",
+ "$ref" : "#/definitions/Max35Text"
+ },
+ "transaction_status" : {
+ "type" : "array",
+ "description" : "Specifies the status of a transaction, in a coded form.",
+ "items" : {
+ "$ref" : "#/definitions/PaymentStatus3"
+ }
+ },
+ "amount" : {
+ "description" : "Specifies the amount range for a given currency and amount type.",
+ "$ref" : "#/definitions/AmountType1"
+ },
+ "event" : {
+ "description" : "Specifies one of the states of the payment transaction.",
+ "$ref" : "#/definitions/PaymentTransactionState1Code"
+ },
+ "subject_to_cancellation_process_indicator" : {
+ "description" : "Indicates whether only payment transactions under a past or present stop and recall process should be retrieved. \r\nAbsence means no.",
+ "$ref" : "#/definitions/YesNoIndicator"
+ },
+ "maximum_number" : {
+ "description" : "Indicates the maximum number of entries returned.",
+ "$ref" : "#/definitions/Number"
+ },
+ "more" : {
+ "description" : "Contains the token to get the next set of responses.",
+ "$ref" : "#/definitions/Max350Text"
}
-}
-
- <?php
-require_once(__DIR__ . '/vendor/autoload.php');
-
-// Configure OAuth2 access token for authorization: petstore_auth
-Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
-
-$api_instance = new Swagger\Client\Api\PetApi();
-$body = ; // Pet | Pet object that needs to be added to the store
-
-try {
- $api_instance->addPet($body);
-} catch (Exception $e) {
- echo 'Exception when calling PetApi->addPet: ', $e->getMessage(), PHP_EOL;
-}
-?>
- use Data::Dumper;
-use WWW::SwaggerClient::Configuration;
-use WWW::SwaggerClient::PetApi;
-
-# Configure OAuth2 access token for authorization: petstore_auth
-$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';
-
-my $api_instance = WWW::SwaggerClient::PetApi->new();
-my $body = WWW::SwaggerClient::Object::Pet->new(); # Pet | Pet object that needs to be added to the store
-
-eval {
- $api_instance->addPet(body => $body);
+ },
+ "description" : "This API is a payment transaction search to get transaction-level information regarding all payments that match the search criteria. To have full information of a given payment transaction, the GetPaymentTransactionDetailsRequest can be used.\r\nExamples of use cases are:\r\n•\tInvestigation by a participating institution based on criteria given by a customer, such as instructed amount, time of initiation\r\n•\tFlow monitoring, for instance to find payments that are \"stuck\" for which the institution is the beneficiary institution\r\n•\tFeed a dashboard - give all payment transactions with their last status\r\n"
};
-if ($@) {
- warn "Exception when calling PetApi->addPet: $@\n";
-}
- from __future__ import print_statement
-import time
-import swagger_client
-from swagger_client.rest import ApiException
-from pprint import pprint
-
-# Configure OAuth2 access token for authorization: petstore_auth
-swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'
-
-# create an instance of the API class
-api_instance = swagger_client.PetApi()
-body = # Pet | Pet object that needs to be added to the store
-
-try:
- # Add a new pet to the store
- api_instance.add_pet(body)
-except ApiException as e:
- print("Exception when calling PetApi->addPet: %s\n" % e)
- Parameters
- - - -Name | -Description | -
---|---|
body * | -- - - - - | -