pfApiExpensesCreate
Create new instance of monthly expenses
/pf/api/expenses/
Usage and SDK Samples
curl -X POST\
-H "Authorization: Basic [[basicHash]]"\
\
-H "Accept: application/json"\
-H "Content-Type: application/json,application/x-www-form-urlencoded,multipart/form-data"\
"//pf/api/expenses/?"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PfApi;
import java.io.File;
import java.util.*;
public class PfApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
// Configure API key authorization: cookieAuth
ApiKeyAuth cookieAuth = (ApiKeyAuth) defaultClient.getAuthentication("cookieAuth");
cookieAuth.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.setApiKeyPrefix("Token");
PfApi apiInstance = new PfApi();
Expenses body = ; // Expenses |
try {
Expenses result = apiInstance.pfApiExpensesCreate(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PfApi#pfApiExpensesCreate");
e.printStackTrace();
}
}
}
import io.swagger.client.api.PfApi;
public class PfApiExample {
public static void main(String[] args) {
PfApi apiInstance = new PfApi();
Expenses body = ; // Expenses |
try {
Expenses result = apiInstance.pfApiExpensesCreate(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PfApi#pfApiExpensesCreate");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: basicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
// Configure API key authorization: (authentication scheme: cookieAuth)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"sessionid"];
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//[apiConfig setApiKeyPrefix:@"Bearer" forApiKeyIdentifier:@"sessionid"];
Expenses *body = ; //
PfApi *apiInstance = [[PfApi alloc] init];
[apiInstance pfApiExpensesCreateWith:body
completionHandler: ^(Expenses output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var PersonalFinanceApi = require('personal_finance_api');
var defaultClient = PersonalFinanceApi.ApiClient.instance;
// Configure HTTP basic authorization: basicAuth
var basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME'
basicAuth.password = 'YOUR PASSWORD'
// Configure API key authorization: cookieAuth
var cookieAuth = defaultClient.authentications['cookieAuth'];
cookieAuth.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//cookieAuth.apiKeyPrefix['sessionid'] = "Token"
var api = new PersonalFinanceApi.PfApi()
var body = ; //
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.pfApiExpensesCreate(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class pfApiExpensesCreateExample
{
public void main()
{
// Configure HTTP basic authorization: basicAuth
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
// Configure API key authorization: cookieAuth
Configuration.Default.ApiKey.Add("sessionid", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Configuration.Default.ApiKeyPrefix.Add("sessionid", "Bearer");
var apiInstance = new PfApi();
var body = new Expenses(); // Expenses |
try
{
Expenses result = apiInstance.pfApiExpensesCreate(body);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling PfApi.pfApiExpensesCreate: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
// Configure API key authorization: cookieAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('sessionid', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('sessionid', 'Bearer');
$api_instance = new Swagger\Client\ApiPfApi();
$body = ; // Expenses |
try {
$result = $api_instance->pfApiExpensesCreate($body);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling PfApi->pfApiExpensesCreate: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PfApi;
# Configure HTTP basic authorization: basicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
# Configure API key authorization: cookieAuth
$WWW::SwaggerClient::Configuration::api_key->{'sessionid'} = 'YOUR_API_KEY';
# uncomment below to setup prefix (e.g. Bearer) for API key, if needed
#$WWW::SwaggerClient::Configuration::api_key_prefix->{'sessionid'} = "Bearer";
my $api_instance = WWW::SwaggerClient::PfApi->new();
my $body = WWW::SwaggerClient::Object::Expenses->new(); # Expenses |
eval {
my $result = $api_instance->pfApiExpensesCreate(body => $body);
print Dumper($result);
};
if ($@) {
warn "Exception when calling PfApi->pfApiExpensesCreate: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: basicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# Configure API key authorization: cookieAuth
swagger_client.configuration.api_key['sessionid'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# swagger_client.configuration.api_key_prefix['sessionid'] = 'Bearer'
# create an instance of the API class
api_instance = swagger_client.PfApi()
body = # Expenses |
try:
api_response = api_instance.pf_api_expenses_create(body)
pprint(api_response)
except ApiException as e:
print("Exception when calling PfApi->pfApiExpensesCreate: %s\n" % e)
Parameters
Name | Description |
---|---|
body * |
Name | Description |
---|---|
date* |
date
(date)
Required
|
eatingOut* |
Double
(double)
Required
|
groceries* |
Double
(double)
Required
|
restaurants* |
Double
(double)
Required
|
personalItems* |
Double
(double)
Required
|
extra* |
Double
(double)
Required
|
transportation* |
Double
(double)
Required
|
housing* |
Double
(double)
Required
|
help* |
Double
(double)
Required
|
date* |
date
(date)
Required
|
eatingOut* |
Double
(double)
Required
|
groceries* |
Double
(double)
Required
|
restaurants* |
Double
(double)
Required
|
personalItems* |
Double
(double)
Required
|
extra* |
Double
(double)
Required
|
transportation* |
Double
(double)
Required
|
housing* |
Double
(double)
Required
|
help* |
Double
(double)
Required
|
Name | Description |
---|