/// <summary> /// セグメントタグ一覧の取得 /// </summary> /// <remarks> /// 指定した事業所のセグメントタグ一覧を取得する /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='companyId'> /// 事業所ID /// </param> /// <param name='segmentId'> /// セグメントID /// </param> /// <param name='offset'> /// 取得レコードのオフセット (デフォルト: 0) /// </param> /// <param name='limit'> /// 取得レコードの件数 (デフォルト: 20, 最大: 500) /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SegmentTagsIndexResponse> ListAsync(this ISegmentTags operations, int companyId, int segmentId, int?offset = default(int?), int?limit = default(int?), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListWithHttpMessagesAsync(companyId, segmentId, offset, limit, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// セグメントタグの更新 /// </summary> /// <remarks> /// 指定した事業所のセグメントタグを更新する /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='parameters'> /// セグメントタグの作成 /// </param> /// <param name='segmentId'> /// セグメントID /// </param> /// <param name='id'> /// セグメントタグID /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <SegmentTagsResponse> UpdateAsync(this ISegmentTags operations, SegmentTagParams parameters, int segmentId, int id, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.UpdateWithHttpMessagesAsync(parameters, segmentId, id, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { Partners = new Partners(this); Selectables = new Selectables(this); AccountItems = new AccountItems(this); Tags = new Tags(this); Sections = new Sections(this); Invoices = new Invoices(this); Deals = new DealsOperations(this); Renews = new Renews(this); Payments = new Payments(this); ManualJournals = new ManualJournals(this); Users = new Users(this); Companies = new Companies(this); Items = new Items(this); Taxes = new Taxes(this); Walletables = new Walletables(this); Banks = new Banks(this); Transfers = new Transfers(this); WalletTxns = new WalletTxnsOperations(this); Journals = new Journals(this); TrialBalance = new TrialBalance(this); Receipts = new Receipts(this); ExpenseApplications = new ExpenseApplications(this); ExpenseApplicationLineTemplates = new ExpenseApplicationLineTemplates(this); SegmentTags = new SegmentTags(this); BaseUri = new System.Uri("https://api.freee.co.jp/api/1"); SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <summary> /// セグメントタグの削除 /// </summary> /// <remarks> /// 指定した事業所のセグメントタグを削除する /// </remarks> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='segmentId'> /// セグメントID /// </param> /// <param name='id'> /// セグメントタグID /// </param> /// <param name='companyId'> /// 事業所ID /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DestroySegmentsTagAsync(this ISegmentTags operations, int segmentId, int id, int companyId, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DestroySegmentsTagWithHttpMessagesAsync(segmentId, id, companyId, null, cancellationToken).ConfigureAwait(false)).Dispose(); }