addExpense
지출 내역 저장
영수증 수기 입력 또는 분석 내역 조회 후 수정 값을 저장하는 API
/api/receipts/{teamId}
Usage and SDK Samples
curl -X POST\
-H "Authorization: Bearer [[accessToken]]"\
-H "Accept: application/json"\
-H "Content-Type: application/json"\
"http://localhost:8080/api/receipts/{teamId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api._Api;
import java.io.File;
import java.util.*;
public class _ApiExample {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
_Api apiInstance = new _Api();
SaveExpenseRequest body = ; // SaveExpenseRequest |
Long teamId = 789; // Long | 해당 지출이 저장될 teamId
try {
SaveExpenseResponse result = apiInstance.addExpense(body, teamId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling _Api#addExpense");
e.printStackTrace();
}
}
}
import io.swagger.client.api._Api;
public class _ApiExample {
public static void main(String[] args) {
_Api apiInstance = new _Api();
SaveExpenseRequest body = ; // SaveExpenseRequest |
Long teamId = 789; // Long | 해당 지출이 저장될 teamId
try {
SaveExpenseResponse result = apiInstance.addExpense(body, teamId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling _Api#addExpense");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
SaveExpenseRequest *body = ; //
Long *teamId = 789; // 해당 지출이 저장될 teamId
_Api *apiInstance = [[_Api alloc] init];
// 지출 내역 저장
[apiInstance addExpenseWith:body
teamId:teamId
completionHandler: ^(SaveExpenseResponse output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var KakaoTechCampusJeongSanApi_ = require('kakao_tech_campus__jeong_san__api_');
var defaultClient = KakaoTechCampusJeongSanApi_.ApiClient.instance;
var api = new KakaoTechCampusJeongSanApi_._Api()
var body = ; // {{SaveExpenseRequest}}
var teamId = 789; // {{Long}} 해당 지출이 저장될 teamId
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.addExpense(bodyteamId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class addExpenseExample
{
public void main()
{
var apiInstance = new _Api();
var body = new SaveExpenseRequest(); // SaveExpenseRequest |
var teamId = 789; // Long | 해당 지출이 저장될 teamId
try
{
// 지출 내역 저장
SaveExpenseResponse result = apiInstance.addExpense(body, teamId);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling _Api.addExpense: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$api_instance = new Swagger\Client\Api_Api();
$body = ; // SaveExpenseRequest |
$teamId = 789; // Long | 해당 지출이 저장될 teamId
try {
$result = $api_instance->addExpense($body, $teamId);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling _Api->addExpense: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::_Api;
my $api_instance = WWW::SwaggerClient::_Api->new();
my $body = WWW::SwaggerClient::Object::SaveExpenseRequest->new(); # SaveExpenseRequest |
my $teamId = 789; # Long | 해당 지출이 저장될 teamId
eval {
my $result = $api_instance->addExpense(body => $body, teamId => $teamId);
print Dumper($result);
};
if ($@) {
warn "Exception when calling _Api->addExpense: $@\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._Api()
body = # SaveExpenseRequest |
teamId = 789 # Long | 해당 지출이 저장될 teamId
try:
# 지출 내역 저장
api_response = api_instance.add_expense(body, teamId)
pprint(api_response)
except ApiException as e:
print("Exception when calling _Api->addExpense: %s\n" % e)
Parameters
Name | Description |
---|---|
teamId* |
Long
(int64)
해당 지출이 저장될 teamId
Required
|
Name | Description |
---|---|
body * |