createAddress
Insertar nueva dirección
/Clientes/Direcciones/Insertar/{apikey}
Usage and SDK Samples
curl -X POST\
-H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"https://api.pktunotests.cf/ws/Api/Clientes/Direcciones/Insertar/{apikey}?iduser="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ClientesApi;
import java.io.File;
import java.util.*;
public class ClientesApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
ClientesApi apiInstance = new ClientesApi();
Address body = ; // Address | Datos de la dirección a crear
Integer iduser = 56; // Integer | id del usuario
String apikey = apikey_example; // String | API key, insertar directo en path
try {
AddressResponse result = apiInstance.createAddress(body, iduser, apikey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ClientesApi#createAddress");
e.printStackTrace();
}
}
}
import io.swagger.client.api.ClientesApi;
public class ClientesApiExample {
public static void main(String[] args) {
ClientesApi apiInstance = new ClientesApi();
Address body = ; // Address | Datos de la dirección a crear
Integer iduser = 56; // Integer | id del usuario
String apikey = apikey_example; // String | API key, insertar directo en path
try {
AddressResponse result = apiInstance.createAddress(body, iduser, apikey);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling ClientesApi#createAddress");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
Address *body = ; // Datos de la dirección a crear
Integer *iduser = 56; // id del usuario
String *apikey = apikey_example; // API key, insertar directo en path
ClientesApi *apiInstance = [[ClientesApi alloc] init];
// Insertar nueva dirección
[apiInstance createAddressWith:body
iduser:iduser
apikey:apikey
completionHandler: ^(AddressResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var Pkt1 = require('pkt1');
var defaultClient = Pkt1.ApiClient.instance;
var api = new Pkt1.ClientesApi()
var body = ; // {{Address}} Datos de la dirección a crear
var iduser = 56; // {{Integer}} id del usuario
var apikey = apikey_example; // {{String}} API key, insertar directo en path
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.createAddress(bodyiduserapikey, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class createAddressExample
{
public void main()
{
var apiInstance = new ClientesApi();
var body = new Address(); // Address | Datos de la dirección a crear
var iduser = 56; // Integer | id del usuario
var apikey = apikey_example; // String | API key, insertar directo en path
try
{
// Insertar nueva dirección
AddressResponse result = apiInstance.createAddress(body, iduser, apikey);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling ClientesApi.createAddress: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\ApiClientesApi();
$body = ; // Address | Datos de la dirección a crear
$iduser = 56; // Integer | id del usuario
$apikey = apikey_example; // String | API key, insertar directo en path
try {
$result = $api_instance->createAddress($body, $iduser, $apikey);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ClientesApi->createAddress: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ClientesApi;
my $api_instance = WWW::SwaggerClient::ClientesApi->new();
my $body = WWW::SwaggerClient::Object::Address->new(); # Address | Datos de la dirección a crear
my $iduser = 56; # Integer | id del usuario
my $apikey = apikey_example; # String | API key, insertar directo en path
eval {
my $result = $api_instance->createAddress(body => $body, iduser => $iduser, apikey => $apikey);
print Dumper($result);
};
if ($@) {
warn "Exception when calling ClientesApi->createAddress: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = swagger_client.ClientesApi()
body = # Address | Datos de la dirección a crear
iduser = 56 # Integer | id del usuario
apikey = apikey_example # String | API key, insertar directo en path
try:
# Insertar nueva dirección
api_response = api_instance.create_address(body, iduser, apikey)
pprint(api_response)
except ApiException as e:
print("Exception when calling ClientesApi->createAddress: %s\n" % e)
Parameters
Name | Description |
---|---|
apikey* |
String
API key, insertar directo en path
Required
|
Name | Description |
---|---|
body * |
Name | Description |
---|---|
iduser* |
Integer
id del usuario
Required
|