curl -X PUT \
-H "Accept: */*" \
-H "Content-Type: application/json" \
"https://localhost:8080/api/transactions/{id}" \
-d '{
"date" : "date",
"totalPrice" : 9.301444243932576,
"id" : 0,
"type" : "type",
"user" : {
"lastName" : "lastName",
"password" : "password",
"address" : "address",
"birthdate" : "birthdate",
"role" : "role",
"mobileNumber" : 6,
"name" : "name",
"id" : 0,
"email" : "email",
"username" : "username"
},
"usedCoupon" : {
"dateOfExpiry" : "dateOfExpiry",
"code" : "code",
"affectedProducts" : [ {
"images" : [ "images", "images" ],
"size" : "XS",
"price" : 2.3021358869347655,
"name" : "name",
"description" : "description",
"id" : 5,
"stock" : 7
}, {
"images" : [ "images", "images" ],
"size" : "XS",
"price" : 2.3021358869347655,
"name" : "name",
"description" : "description",
"id" : 5,
"stock" : 7
} ],
"discount" : 5.962134,
"id" : 6,
"type" : "type",
"minimum" : 1.4658129,
"startDate" : "startDate"
},
"products" : [ {
"images" : [ "images", "images" ],
"size" : "XS",
"price" : 2.3021358869347655,
"name" : "name",
"description" : "description",
"id" : 5,
"stock" : 7
}, {
"images" : [ "images", "images" ],
"size" : "XS",
"price" : 2.3021358869347655,
"name" : "name",
"description" : "description",
"id" : 5,
"stock" : 7
} ]
}'
import org.openapitools.client.*;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.RestTransactionControllerApi;
import java.io.File;
import java.util.*;
public class RestTransactionControllerApiExample {
public static void main(String[] args) {
// Create an instance of the API class
RestTransactionControllerApi apiInstance = new RestTransactionControllerApi();
Long id = 789; // Long |
Transaction transaction = ; // Transaction |
try {
Transaction result = apiInstance.editTransaction(id, transaction);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RestTransactionControllerApi#editTransaction");
e.printStackTrace();
}
}
}
import org.openapitools.client.api.RestTransactionControllerApi;
public class RestTransactionControllerApiExample {
public static void main(String[] args) {
RestTransactionControllerApi apiInstance = new RestTransactionControllerApi();
Long id = 789; // Long |
Transaction transaction = ; // Transaction |
try {
Transaction result = apiInstance.editTransaction(id, transaction);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RestTransactionControllerApi#editTransaction");
e.printStackTrace();
}
}
}
// Create an instance of the API class
RestTransactionControllerApi *apiInstance = [[RestTransactionControllerApi alloc] init];
Long *id = 789; // (default to null)
Transaction *transaction = ; //
[apiInstance editTransactionWith:id
transaction:transaction
completionHandler: ^(Transaction output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var OpenApiDefinition = require('open_api_definition');
// Create an instance of the API class
var api = new OpenApiDefinition.RestTransactionControllerApi()
var id = 789; // {Long}
var transaction = ; // {Transaction}
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.editTransaction(id, transaction, callback);
using System;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class editTransactionExample
{
public void main()
{
// Create an instance of the API class
var apiInstance = new RestTransactionControllerApi();
var id = 789; // Long | (default to null)
var transaction = new Transaction(); // Transaction |
try {
Transaction result = apiInstance.editTransaction(id, transaction);
Debug.WriteLine(result);
} catch (Exception e) {
Debug.Print("Exception when calling RestTransactionControllerApi.editTransaction: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Create an instance of the API class
$api_instance = new OpenAPITools\Client\Api\RestTransactionControllerApi();
$id = 789; // Long |
$transaction = ; // Transaction |
try {
$result = $api_instance->editTransaction($id, $transaction);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RestTransactionControllerApi->editTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::OPenAPIClient::Configuration;
use WWW::OPenAPIClient::RestTransactionControllerApi;
# Create an instance of the API class
my $api_instance = WWW::OPenAPIClient::RestTransactionControllerApi->new();
my $id = 789; # Long |
my $transaction = WWW::OPenAPIClient::Object::Transaction->new(); # Transaction |
eval {
my $result = $api_instance->editTransaction(id => $id, transaction => $transaction);
print Dumper($result);
};
if ($@) {
warn "Exception when calling RestTransactionControllerApi->editTransaction: $@\n";
}
from __future__ import print_statement
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Create an instance of the API class
api_instance = openapi_client.RestTransactionControllerApi()
id = 789 # Long | (default to null)
transaction = # Transaction |
try:
api_response = api_instance.edit_transaction(id, transaction)
pprint(api_response)
except ApiException as e:
print("Exception when calling RestTransactionControllerApi->editTransaction: %s\n" % e)
extern crate RestTransactionControllerApi;
pub fn main() {
let id = 789; // Long
let transaction = ; // Transaction
let mut context = RestTransactionControllerApi::Context::default();
let result = client.editTransaction(id, transaction, &context).wait();
println!("{:?}", result);
}