POST | /ext/powens/connection_synced |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Stability implements IConvertible
{
String? status;
DateTime? lastUpdate;
Stability({this.status,this.lastUpdate});
Stability.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
status = json['status'];
lastUpdate = JsonConverters.fromJson(json['lastUpdate'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'status': status,
'lastUpdate': JsonConverters.toJson(lastUpdate,'DateTime',context!)
};
getTypeName() => "Stability";
TypeContext? context = _ctx;
}
enum AuthMechanism
{
Credentials,
WebAuth,
}
// @DataContract
class ConnectorReq implements IConvertible
{
// @DataMember(Name="id")
int? id;
// @DataMember(Name="name")
String? name;
// @DataMember(Name="hidden")
bool? hidden;
// @DataMember(Name="charged")
bool? charged;
// @DataMember(Name="code")
String? code;
// @DataMember(Name="beta")
bool? beta;
// @DataMember(Name="color")
String? color;
// @DataMember(Name="slug")
String? slug;
// @DataMember(Name="sync_periodicity")
double? sync_periodicity;
// @DataMember(Name="months_to_fetch")
int? months_to_fetch;
// @DataMember(Name="siret")
String? siret;
// @DataMember(Name="uuid")
String? uuid;
// @DataMember(Name="restricted")
bool? restricted;
// @DataMember(Name="stability")
Stability? stability;
// @DataMember(Name="capabilities")
List<String>? capabilities;
// @DataMember(Name="available_auth_mechanisms")
List<AuthMechanism>? available_auth_mechanisms;
// @DataMember(Name="categories")
List<String>? categories;
// @DataMember(Name="auth_mechanism")
AuthMechanism? auth_mechanism;
// @DataMember(Name="account_types")
List<dynamic>? account_types;
// @DataMember(Name="account_usage")
List<dynamic>? account_usage;
// @DataMember(Name="documents_type")
List<String>? documents_type;
// @DataMember(Name="products")
List<dynamic>? products;
ConnectorReq({this.id,this.name,this.hidden,this.charged,this.code,this.beta,this.color,this.slug,this.sync_periodicity,this.months_to_fetch,this.siret,this.uuid,this.restricted,this.stability,this.capabilities,this.available_auth_mechanisms,this.categories,this.auth_mechanism,this.account_types,this.account_usage,this.documents_type,this.products});
ConnectorReq.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
hidden = json['hidden'];
charged = json['charged'];
code = json['code'];
beta = json['beta'];
color = json['color'];
slug = json['slug'];
sync_periodicity = JsonConverters.toDouble(json['syncPeriodicity']);
months_to_fetch = json['monthsToFetch'];
siret = json['siret'];
uuid = json['uuid'];
restricted = json['restricted'];
stability = JsonConverters.fromJson(json['stability'],'Stability',context!);
capabilities = JsonConverters.fromJson(json['capabilities'],'List<String>',context!);
available_auth_mechanisms = JsonConverters.fromJson(json['availableAuthMechanisms'],'List<AuthMechanism>',context!);
categories = JsonConverters.fromJson(json['categories'],'List<String>',context!);
auth_mechanism = JsonConverters.fromJson(json['authMechanism'],'AuthMechanism',context!);
account_types = JsonConverters.fromJson(json['accountTypes'],'List<dynamic>',context!);
account_usage = JsonConverters.fromJson(json['accountUsages'],'List<dynamic>',context!);
documents_type = JsonConverters.fromJson(json['documentsType'],'List<String>',context!);
products = JsonConverters.fromJson(json['products'],'List<dynamic>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'hidden': hidden,
'charged': charged,
'code': code,
'beta': beta,
'color': color,
'slug': slug,
'sync_periodicity': sync_periodicity,
'months_to_fetch': months_to_fetch,
'siret': siret,
'uuid': uuid,
'restricted': restricted,
'stability': JsonConverters.toJson(stability,'Stability',context!),
'capabilities': JsonConverters.toJson(capabilities,'List<String>',context!),
'available_auth_mechanisms': JsonConverters.toJson(available_auth_mechanisms,'List<AuthMechanism>',context!),
'categories': JsonConverters.toJson(categories,'List<String>',context!),
'auth_mechanism': JsonConverters.toJson(auth_mechanism,'AuthMechanism',context!),
'account_types': JsonConverters.toJson(account_types,'List<dynamic>',context!),
'account_usage': JsonConverters.toJson(account_usage,'List<dynamic>',context!),
'documents_type': JsonConverters.toJson(documents_type,'List<String>',context!),
'products': JsonConverters.toJson(products,'List<dynamic>',context!)
};
getTypeName() => "ConnectorReq";
TypeContext? context = _ctx;
}
// @DataContract
class ConnectionRequest implements IConvertible
{
// @DataMember(Name="id")
int? id;
// @DataMember(Name="id_user")
int? id_user;
// @DataMember(Name="id_connector")
int? id_connector;
// @DataMember(Name="last_update")
DateTime? last_update;
// @DataMember(Name="created")
DateTime? created;
// @DataMember(Name="active")
bool? active;
// @DataMember(Name="last_push")
DateTime? last_push;
// @DataMember(Name="next_try")
DateTime? next_try;
// @DataMember(Name="connector")
ConnectorReq? connector;
// @DataMember(Name="accounts")
List<PowensAccount>? accounts;
// @DataMember(Name="state")
String? state;
// @DataMember(Name="error")
String? error;
// @DataMember(Name="error_message")
String? error_message;
// @DataMember(Name="expire")
DateTime? expire;
// @DataMember(Name="id_provider")
int? id_provider;
// @DataMember(Name="id_bank")
int? id_bank;
// @DataMember(Name="bank")
ConnectorReq? bank;
// @DataMember(Name="connector_uuid")
String? connector_uuid;
// @DataMember(Name="informations")
dynamic? informations;
ConnectionRequest({this.id,this.id_user,this.id_connector,this.last_update,this.created,this.active,this.last_push,this.next_try,this.connector,this.accounts,this.state,this.error,this.error_message,this.expire,this.id_provider,this.id_bank,this.bank,this.connector_uuid,this.informations});
ConnectionRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
id_user = json['idUser'];
id_connector = json['idConnector'];
last_update = JsonConverters.fromJson(json['lastUpdate'],'DateTime',context!);
created = JsonConverters.fromJson(json['created'],'DateTime',context!);
active = json['active'];
last_push = JsonConverters.fromJson(json['lastPush'],'DateTime',context!);
next_try = JsonConverters.fromJson(json['nextTry'],'DateTime',context!);
connector = JsonConverters.fromJson(json['connector'],'ConnectorReq',context!);
accounts = JsonConverters.fromJson(json['accounts'],'List<PowensAccount>',context!);
state = json['state'];
error = json['error'];
error_message = json['errorMessage'];
expire = JsonConverters.fromJson(json['expire'],'DateTime',context!);
id_provider = json['idProvider'];
id_bank = json['idBank'];
bank = JsonConverters.fromJson(json['bank'],'ConnectorReq',context!);
connector_uuid = json['connectorUuid'];
informations = JsonConverters.fromJson(json['informations'],'dynamic',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'id_user': id_user,
'id_connector': id_connector,
'last_update': JsonConverters.toJson(last_update,'DateTime',context!),
'created': JsonConverters.toJson(created,'DateTime',context!),
'active': active,
'last_push': JsonConverters.toJson(last_push,'DateTime',context!),
'next_try': JsonConverters.toJson(next_try,'DateTime',context!),
'connector': JsonConverters.toJson(connector,'ConnectorReq',context!),
'accounts': JsonConverters.toJson(accounts,'List<PowensAccount>',context!),
'state': state,
'error': error,
'error_message': error_message,
'expire': JsonConverters.toJson(expire,'DateTime',context!),
'id_provider': id_provider,
'id_bank': id_bank,
'bank': JsonConverters.toJson(bank,'ConnectorReq',context!),
'connector_uuid': connector_uuid,
'informations': JsonConverters.toJson(informations,'dynamic',context!)
};
getTypeName() => "ConnectionRequest";
TypeContext? context = _ctx;
}
class PowensConnectionSyncRequest implements IConvertible
{
ConnectionRequest? connection;
// @DataMember(Name="push_type")
String? push_type;
// @DataMember(Name="id_webhook_data")
int? id_webhook_data;
PowensConnectionSyncRequest({this.connection,this.push_type,this.id_webhook_data});
PowensConnectionSyncRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
connection = JsonConverters.fromJson(json['connection'],'ConnectionRequest',context!);
push_type = json['pushType'];
id_webhook_data = json['idWebhookData'];
return this;
}
Map<String, dynamic> toJson() => {
'connection': JsonConverters.toJson(connection,'ConnectionRequest',context!),
'push_type': push_type,
'id_webhook_data': id_webhook_data
};
getTypeName() => "PowensConnectionSyncRequest";
TypeContext? context = _ctx;
}
// @DataContract
class PowensCurrency implements IConvertible
{
// @DataMember(Name="id")
String? id;
// @DataMember(Name="name")
String? name;
// @DataMember(Name="symbol")
String? symbol;
// @DataMember(Name="crypto")
bool? crypto;
// @DataMember(Name="precision")
int? precision;
// @DataMember(Name="prefix")
bool? prefix;
// @DataMember(Name="marketcap")
dynamic? marketcap;
// @DataMember(Name="datetime")
DateTime? datetime;
PowensCurrency({this.id,this.name,this.symbol,this.crypto,this.precision,this.prefix,this.marketcap,this.datetime});
PowensCurrency.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
symbol = json['symbol'];
crypto = json['crypto'];
precision = json['precision'];
prefix = json['prefix'];
marketcap = JsonConverters.fromJson(json['marketcap'],'dynamic',context!);
datetime = JsonConverters.fromJson(json['datetime'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'symbol': symbol,
'crypto': crypto,
'precision': precision,
'prefix': prefix,
'marketcap': JsonConverters.toJson(marketcap,'dynamic',context!),
'datetime': JsonConverters.toJson(datetime,'DateTime',context!)
};
getTypeName() => "PowensCurrency";
TypeContext? context = _ctx;
}
enum AccountUsage
{
PRIV,
ORGA,
}
// @DataContract
class PowensInformation implements IConvertible
{
// @DataMember(Name="version")
String? version;
// @DataMember(Name="provider_type")
String? provider_type;
PowensInformation({this.version,this.provider_type});
PowensInformation.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
version = json['version'];
provider_type = json['providerType'];
return this;
}
Map<String, dynamic> toJson() => {
'version': version,
'provider_type': provider_type
};
getTypeName() => "PowensInformation";
TypeContext? context = _ctx;
}
// @DataContract
class PowensLoan implements IConvertible
{
// @DataMember(Name="total_amount")
double? total_amount;
// @DataMember(Name="available_amount")
double? available_amount;
// @DataMember(Name="used_amount")
double? used_amount;
// @DataMember(Name="subscription_date")
DateTime? subscription_date;
// @DataMember(Name="maturity_date")
DateTime? maturity_date;
// @DataMember(Name="next_payment_amount")
double? next_payment_amount;
// @DataMember(Name="next_payment_date")
DateTime? next_payment_date;
// @DataMember(Name="rate")
double? rate;
// @DataMember(Name="nb_payments_left")
int? nb_payments_left;
// @DataMember(Name="nb_payments_done")
int? nb_payments_done;
// @DataMember(Name="nb_payments_total")
int? nb_payments_total;
// @DataMember(Name="last_payment_amount")
double? last_payment_amount;
// @DataMember(Name="last_payment_date")
DateTime? last_payment_date;
// @DataMember(Name="account_label")
String? account_label;
// @DataMember(Name="insurance_label")
String? insurance_label;
// @DataMember(Name="insurance_amount")
double? insurance_amount;
// @DataMember(Name="insurance_rate")
double? insurance_rate;
// @DataMember(Name="duration")
int? duration;
// @DataMember(Name="type")
String? type;
PowensLoan({this.total_amount,this.available_amount,this.used_amount,this.subscription_date,this.maturity_date,this.next_payment_amount,this.next_payment_date,this.rate,this.nb_payments_left,this.nb_payments_done,this.nb_payments_total,this.last_payment_amount,this.last_payment_date,this.account_label,this.insurance_label,this.insurance_amount,this.insurance_rate,this.duration,this.type});
PowensLoan.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
total_amount = JsonConverters.toDouble(json['totalAmount']);
available_amount = JsonConverters.toDouble(json['availableAmount']);
used_amount = JsonConverters.toDouble(json['usedAmount']);
subscription_date = JsonConverters.fromJson(json['subscriptionDate'],'DateTime',context!);
maturity_date = JsonConverters.fromJson(json['maturityDate'],'DateTime',context!);
next_payment_amount = JsonConverters.toDouble(json['nextPaymentAmount']);
next_payment_date = JsonConverters.fromJson(json['nextPaymentDate'],'DateTime',context!);
rate = JsonConverters.toDouble(json['rate']);
nb_payments_left = json['nbPaymentsLeft'];
nb_payments_done = json['nbPaymentsDone'];
nb_payments_total = json['nbPaymentsTotal'];
last_payment_amount = JsonConverters.toDouble(json['lastPaymentAmount']);
last_payment_date = JsonConverters.fromJson(json['lastPaymentDate'],'DateTime',context!);
account_label = json['accountLabel'];
insurance_label = json['insuranceLabel'];
insurance_amount = JsonConverters.toDouble(json['insuranceAmount']);
insurance_rate = JsonConverters.toDouble(json['insuranceRate']);
duration = json['duration'];
type = json['type'];
return this;
}
Map<String, dynamic> toJson() => {
'total_amount': total_amount,
'available_amount': available_amount,
'used_amount': used_amount,
'subscription_date': JsonConverters.toJson(subscription_date,'DateTime',context!),
'maturity_date': JsonConverters.toJson(maturity_date,'DateTime',context!),
'next_payment_amount': next_payment_amount,
'next_payment_date': JsonConverters.toJson(next_payment_date,'DateTime',context!),
'rate': rate,
'nb_payments_left': nb_payments_left,
'nb_payments_done': nb_payments_done,
'nb_payments_total': nb_payments_total,
'last_payment_amount': last_payment_amount,
'last_payment_date': JsonConverters.toJson(last_payment_date,'DateTime',context!),
'account_label': account_label,
'insurance_label': insurance_label,
'insurance_amount': insurance_amount,
'insurance_rate': insurance_rate,
'duration': duration,
'type': type
};
getTypeName() => "PowensLoan";
TypeContext? context = _ctx;
}
// @DataContract
class PowensAccount implements IConvertible
{
// @DataMember(Name="investments")
List<PowensInvestment>? investments;
// @DataMember(Name="id")
int? id;
// @DataMember(Name="id_connection")
int? id_connection;
// @DataMember(Name="id_user")
int? id_user;
// @DataMember(Name="id_source")
int? id_source;
// @DataMember(Name="id_parent")
int? id_parent;
// @DataMember(Name="number")
String? number;
// @DataMember(Name="webid")
String? webid;
// @DataMember(Name="original_name")
String? original_name;
// @DataMember(Name="balance")
double? balance;
// @DataMember(Name="coming")
double? coming;
// @DataMember(Name="display")
bool? display;
// @DataMember(Name="last_update")
DateTime? last_update;
// @DataMember(Name="deleted")
DateTime? deleted;
// @DataMember(Name="disabled")
DateTime? disabled;
// @DataMember(Name="iban")
String? iban;
// @DataMember(Name="currency")
PowensCurrency? currency;
// @DataMember(Name="id_type")
int? id_type;
// @DataMember(Name="bookmarked")
int? bookmarked;
// @DataMember(Name="name")
String? name;
// @DataMember(Name="error")
String? error;
// @DataMember(Name="usage")
AccountUsage? usage;
// @DataMember(Name="company_name")
String? company_name;
// @DataMember(Name="opening_date")
DateTime? opening_date;
// @DataMember(Name="bic")
dynamic? bic;
// @DataMember(Name="coming_balance")
int? coming_balance;
// @DataMember(Name="formatted_balance")
String? formatted_balance;
// @DataMember(Name="type")
String? type;
// @DataMember(Name="calculated")
List<String>? calculated;
// @DataMember(Name="valuation")
double? valuation;
// @DataMember(Name="diff")
double? diff;
// @DataMember(Name="diff_percent")
double? diff_percent;
// @DataMember(Name="prev_diff")
double? prev_diff;
// @DataMember(Name="prev_diff_percent")
double? prev_diff_percent;
// @DataMember(Name="information")
PowensInformation? information;
// @DataMember(Name="loan")
PowensLoan? loan;
PowensAccount({this.investments,this.id,this.id_connection,this.id_user,this.id_source,this.id_parent,this.number,this.webid,this.original_name,this.balance,this.coming,this.display,this.last_update,this.deleted,this.disabled,this.iban,this.currency,this.id_type,this.bookmarked,this.name,this.error,this.usage,this.company_name,this.opening_date,this.bic,this.coming_balance,this.formatted_balance,this.type,this.calculated,this.valuation,this.diff,this.diff_percent,this.prev_diff,this.prev_diff_percent,this.information,this.loan});
PowensAccount.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
investments = JsonConverters.fromJson(json['investments'],'List<PowensInvestment>',context!);
id = json['id'];
id_connection = json['idConnection'];
id_user = json['idUser'];
id_source = json['idSource'];
id_parent = json['idParent'];
number = json['number'];
webid = json['webId'];
original_name = json['originalName'];
balance = JsonConverters.toDouble(json['balance']);
coming = JsonConverters.toDouble(json['coming']);
display = json['display'];
last_update = JsonConverters.fromJson(json['lastUpdate'],'DateTime',context!);
deleted = JsonConverters.fromJson(json['deleted'],'DateTime',context!);
disabled = JsonConverters.fromJson(json['disabled'],'DateTime',context!);
iban = json['iban'];
currency = JsonConverters.fromJson(json['currency'],'PowensCurrency',context!);
id_type = json['idType'];
bookmarked = json['bookmarked'];
name = json['name'];
error = json['error'];
usage = JsonConverters.fromJson(json['usage'],'AccountUsage',context!);
company_name = json['companyName'];
opening_date = JsonConverters.fromJson(json['openingDate'],'DateTime',context!);
bic = JsonConverters.fromJson(json['bic'],'dynamic',context!);
coming_balance = json['comingBalances'];
formatted_balance = json['formattedBalance'];
type = json['type'];
calculated = JsonConverters.fromJson(json['calculated'],'List<String>',context!);
valuation = JsonConverters.toDouble(json['valuation']);
diff = JsonConverters.toDouble(json['diff']);
diff_percent = JsonConverters.toDouble(json['diffPercent']);
prev_diff = JsonConverters.toDouble(json['prevDiff']);
prev_diff_percent = JsonConverters.toDouble(json['prevDiffPercent']);
information = JsonConverters.fromJson(json['information'],'PowensInformation',context!);
loan = JsonConverters.fromJson(json['loan'],'PowensLoan',context!);
return this;
}
Map<String, dynamic> toJson() => {
'investments': JsonConverters.toJson(investments,'List<PowensInvestment>',context!),
'id': id,
'id_connection': id_connection,
'id_user': id_user,
'id_source': id_source,
'id_parent': id_parent,
'number': number,
'webid': webid,
'original_name': original_name,
'balance': balance,
'coming': coming,
'display': display,
'last_update': JsonConverters.toJson(last_update,'DateTime',context!),
'deleted': JsonConverters.toJson(deleted,'DateTime',context!),
'disabled': JsonConverters.toJson(disabled,'DateTime',context!),
'iban': iban,
'currency': JsonConverters.toJson(currency,'PowensCurrency',context!),
'id_type': id_type,
'bookmarked': bookmarked,
'name': name,
'error': error,
'usage': JsonConverters.toJson(usage,'AccountUsage',context!),
'company_name': company_name,
'opening_date': JsonConverters.toJson(opening_date,'DateTime',context!),
'bic': JsonConverters.toJson(bic,'dynamic',context!),
'coming_balance': coming_balance,
'formatted_balance': formatted_balance,
'type': type,
'calculated': JsonConverters.toJson(calculated,'List<String>',context!),
'valuation': valuation,
'diff': diff,
'diff_percent': diff_percent,
'prev_diff': prev_diff,
'prev_diff_percent': prev_diff_percent,
'information': JsonConverters.toJson(information,'PowensInformation',context!),
'loan': JsonConverters.toJson(loan,'PowensLoan',context!)
};
getTypeName() => "PowensAccount";
TypeContext? context = _ctx;
}
class Currency implements IConvertible
{
String? id;
String? name;
String? symbol;
bool? crypto;
int? precision;
bool? prefix;
dynamic? marketcap;
DateTime? datetime;
Currency({this.id,this.name,this.symbol,this.crypto,this.precision,this.prefix,this.marketcap,this.datetime});
Currency.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
symbol = json['symbol'];
crypto = json['crypto'];
precision = json['precision'];
prefix = json['prefix'];
marketcap = JsonConverters.fromJson(json['marketcap'],'dynamic',context!);
datetime = JsonConverters.fromJson(json['datetime'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'symbol': symbol,
'crypto': crypto,
'precision': precision,
'prefix': prefix,
'marketcap': JsonConverters.toJson(marketcap,'dynamic',context!),
'datetime': JsonConverters.toJson(datetime,'DateTime',context!)
};
getTypeName() => "Currency";
TypeContext? context = _ctx;
}
// @DataContract
class PowensInvestment implements IConvertible
{
// @DataMember(Name="id")
int? id;
// @DataMember(Name="id_account")
int? id_account;
// @DataMember(Name="label")
String? label;
// @DataMember(Name="code")
String? code;
// @DataMember(Name="code_type")
String? code_type;
// @DataMember(Name="stock_symbol")
String? stock_symbol;
// @DataMember(Name="stock_market")
dynamic? stock_market;
// @DataMember(Name="source")
String? source;
// @DataMember(Name="description")
String? description;
// @DataMember(Name="quantity")
double? quantity;
// @DataMember(Name="unitprice")
double? unitprice;
// @DataMember(Name="unitvalue")
double? unitvalue;
// @DataMember(Name="valuation")
double? valuation;
// @DataMember(Name="diff")
double? diff;
// @DataMember(Name="diff_percent")
double? diff_percent;
// @DataMember(Name="prev_diff")
double? prev_diff;
// @DataMember(Name="portfolio_share")
double? portfolio_share;
// @DataMember(Name="vdate")
DateTime? vdate;
// @DataMember(Name="prev_vdate")
DateTime? prev_vdate;
// @DataMember(Name="id_security")
int? id_security;
// @DataMember(Name="original_currency")
Currency? original_currency;
// @DataMember(Name="original_valuation")
double? original_valuation;
// @DataMember(Name="original_unitvalue")
double? original_unitvalue;
// @DataMember(Name="original_unitprice")
double? original_unitprice;
// @DataMember(Name="original_diff")
double? original_diff;
// @DataMember(Name="last_update")
DateTime? last_update;
// @DataMember(Name="deleted")
DateTime? deleted;
// @DataMember(Name="calculated")
List<String>? calculated;
// @DataMember(Name="id_type")
int? id_type;
PowensInvestment({this.id,this.id_account,this.label,this.code,this.code_type,this.stock_symbol,this.stock_market,this.source,this.description,this.quantity,this.unitprice,this.unitvalue,this.valuation,this.diff,this.diff_percent,this.prev_diff,this.portfolio_share,this.vdate,this.prev_vdate,this.id_security,this.original_currency,this.original_valuation,this.original_unitvalue,this.original_unitprice,this.original_diff,this.last_update,this.deleted,this.calculated,this.id_type});
PowensInvestment.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
id_account = json['idAccount'];
label = json['label'];
code = json['code'];
code_type = json['codeType'];
stock_symbol = json['stockSymbol'];
stock_market = JsonConverters.fromJson(json['stockMarket'],'dynamic',context!);
source = json['source'];
description = json['description'];
quantity = JsonConverters.toDouble(json['quantity']);
unitprice = JsonConverters.toDouble(json['unitPrice']);
unitvalue = JsonConverters.toDouble(json['unitValue']);
valuation = JsonConverters.toDouble(json['valuation']);
diff = JsonConverters.toDouble(json['diff']);
diff_percent = JsonConverters.toDouble(json['diffPercent']);
prev_diff = JsonConverters.toDouble(json['prevDiff']);
portfolio_share = JsonConverters.toDouble(json['portfolioShare']);
vdate = JsonConverters.fromJson(json['vDate'],'DateTime',context!);
prev_vdate = JsonConverters.fromJson(json['prevVDate'],'DateTime',context!);
id_security = json['idSecurity'];
original_currency = JsonConverters.fromJson(json['originalCurrency'],'Currency',context!);
original_valuation = JsonConverters.toDouble(json['originalValuation']);
original_unitvalue = JsonConverters.toDouble(json['originalUnitValue']);
original_unitprice = JsonConverters.toDouble(json['originalUnitPrice']);
original_diff = JsonConverters.toDouble(json['originalDiff']);
last_update = JsonConverters.fromJson(json['lastUpdate'],'DateTime',context!);
deleted = JsonConverters.fromJson(json['deleted'],'DateTime',context!);
calculated = JsonConverters.fromJson(json['calculated'],'List<String>',context!);
id_type = json['idType'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'id_account': id_account,
'label': label,
'code': code,
'code_type': code_type,
'stock_symbol': stock_symbol,
'stock_market': JsonConverters.toJson(stock_market,'dynamic',context!),
'source': source,
'description': description,
'quantity': quantity,
'unitprice': unitprice,
'unitvalue': unitvalue,
'valuation': valuation,
'diff': diff,
'diff_percent': diff_percent,
'prev_diff': prev_diff,
'portfolio_share': portfolio_share,
'vdate': JsonConverters.toJson(vdate,'DateTime',context!),
'prev_vdate': JsonConverters.toJson(prev_vdate,'DateTime',context!),
'id_security': id_security,
'original_currency': JsonConverters.toJson(original_currency,'Currency',context!),
'original_valuation': original_valuation,
'original_unitvalue': original_unitvalue,
'original_unitprice': original_unitprice,
'original_diff': original_diff,
'last_update': JsonConverters.toJson(last_update,'DateTime',context!),
'deleted': JsonConverters.toJson(deleted,'DateTime',context!),
'calculated': JsonConverters.toJson(calculated,'List<String>',context!),
'id_type': id_type
};
getTypeName() => "PowensInvestment";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'hcbtas_q_albamfs_api.azurewebsites.net', types: <String, TypeInfo> {
'Stability': TypeInfo(TypeOf.Class, create:() => Stability()),
'AuthMechanism': TypeInfo(TypeOf.Enum, enumValues:AuthMechanism.values),
'ConnectorReq': TypeInfo(TypeOf.Class, create:() => ConnectorReq()),
'List<AuthMechanism>': TypeInfo(TypeOf.Class, create:() => <AuthMechanism>[]),
'List<dynamic>': TypeInfo(TypeOf.Class, create:() => <dynamic>[]),
'ConnectionRequest': TypeInfo(TypeOf.Class, create:() => ConnectionRequest()),
'List<PowensAccount>': TypeInfo(TypeOf.Class, create:() => <PowensAccount>[]),
'PowensAccount': TypeInfo(TypeOf.Class, create:() => PowensAccount()),
'PowensConnectionSyncRequest': TypeInfo(TypeOf.Class, create:() => PowensConnectionSyncRequest()),
'PowensCurrency': TypeInfo(TypeOf.Class, create:() => PowensCurrency()),
'AccountUsage': TypeInfo(TypeOf.Enum, enumValues:AccountUsage.values),
'PowensInformation': TypeInfo(TypeOf.Class, create:() => PowensInformation()),
'PowensLoan': TypeInfo(TypeOf.Class, create:() => PowensLoan()),
'List<PowensInvestment>': TypeInfo(TypeOf.Class, create:() => <PowensInvestment>[]),
'PowensInvestment': TypeInfo(TypeOf.Class, create:() => PowensInvestment()),
'Currency': TypeInfo(TypeOf.Class, create:() => Currency()),
});
Dart PowensConnectionSyncRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /ext/powens/connection_synced HTTP/1.1
Host: hcbtas-q-albamfs-api.azurewebsites.net
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
connection:
{
id: 0,
id_user: 0,
id_connector: 0,
last_update: 0001-01-01,
created: 0001-01-01,
active: False,
last_push: 0001-01-01,
next_try: 0001-01-01,
connector:
{
id: 0,
name: String,
hidden: False,
charged: False,
code: String,
beta: False,
color: String,
slug: String,
sync_periodicity: 0,
months_to_fetch: 0,
siret: String,
uuid: String,
restricted: False,
stability:
{
status: String,
lastUpdate: 0001-01-01
},
capabilities:
[
String
],
available_auth_mechanisms:
[
credentials
],
categories:
[
String
],
auth_mechanism: credentials,
account_types:
[
{
}
],
account_usage:
[
{
}
],
documents_type:
[
String
],
products:
[
{
}
]
},
accounts:
[
{
investments:
[
{
id: 0,
id_account: 0,
label: String,
code: String,
code_type: String,
stock_symbol: String,
stock_market: {},
source: String,
description: String,
quantity: 0,
unitprice: 0,
unitvalue: 0,
valuation: 0,
diff: 0,
diff_percent: 0,
prev_diff: 0,
portfolio_share: 0,
vdate: 0001-01-01,
prev_vdate: 0001-01-01,
id_security: 0,
original_currency:
{
id: String,
name: String,
symbol: String,
crypto: False,
precision: 0,
prefix: False,
marketcap: {},
datetime: 0001-01-01
},
original_valuation: 0,
original_unitvalue: 0,
original_unitprice: 0,
original_diff: 0,
last_update: 0001-01-01,
deleted: 0001-01-01,
calculated:
[
String
],
id_type: 0
}
],
id: 0,
id_connection: 0,
id_user: 0,
id_source: 0,
id_parent: 0,
number: String,
webid: String,
original_name: String,
balance: 0,
coming: 0,
display: False,
last_update: 0001-01-01,
deleted: 0001-01-01,
disabled: 0001-01-01,
iban: String,
currency:
{
id: String,
name: String,
symbol: String,
crypto: False,
precision: 0,
prefix: False,
marketcap: {},
datetime: 0001-01-01
},
id_type: 0,
bookmarked: 0,
name: String,
error: String,
usage: 0,
company_name: String,
opening_date: 0001-01-01,
bic: {},
coming_balance: 0,
formatted_balance: String,
type: String,
calculated:
[
String
],
valuation: 0,
diff: 0,
diff_percent: 0,
prev_diff: 0,
prev_diff_percent: 0,
information:
{
version: String,
provider_type: String
},
loan:
{
total_amount: 0,
available_amount: 0,
used_amount: 0,
subscription_date: 0001-01-01,
maturity_date: 0001-01-01,
next_payment_amount: 0,
next_payment_date: 0001-01-01,
rate: 0,
nb_payments_left: 0,
nb_payments_done: 0,
nb_payments_total: 0,
last_payment_amount: 0,
last_payment_date: 0001-01-01,
account_label: String,
insurance_label: String,
insurance_amount: 0,
insurance_rate: 0,
duration: 0,
type: String
}
}
],
state: String,
error: String,
error_message: String,
expire: 0001-01-01,
id_provider: 0,
id_bank: 0,
bank:
{
id: 0,
name: String,
hidden: False,
charged: False,
code: String,
beta: False,
color: String,
slug: String,
sync_periodicity: 0,
months_to_fetch: 0,
siret: String,
uuid: String,
restricted: False,
stability:
{
status: String,
lastUpdate: 0001-01-01
},
capabilities:
[
String
],
available_auth_mechanisms:
[
credentials
],
categories:
[
String
],
auth_mechanism: credentials,
account_types:
[
{
}
],
account_usage:
[
{
}
],
documents_type:
[
String
],
products:
[
{
}
]
},
connector_uuid: String,
informations: {}
},
push_type: String,
id_webhook_data: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { version: { major: 0, minor: 0, build: -1, revision: -1, majorRevision: -1, minorRevision: -1 }, content: { __type: "System.Net.Http.EmptyContent, System.Net.Http", headers: [] }, statusCode: Continue, reasonPhrase: String, headers: [], trailingHeaders: [], requestMessage: { version: { major: 0, minor: 0, build: -1, revision: -1, majorRevision: -1, minorRevision: -1 }, versionPolicy: RequestVersionOrLower, method: { method: GET }, headers: [], properties: {}, options: {} }, isSuccessStatusCode: False }