C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
API.PortfolioViewMarginals.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Runtime.Serialization;
5
8using RestSharp;
9
10namespace AnalyzeRe
11{
13 public static partial class API
14 {
17 {
19 public static readonly string PATH = "portfolio_view_marginals";
20
22 public string Path => PATH;
23
26 {
29 public sealed override string collection_name => PortfolioViewMarginals.PATH;
30
32 [DataMember(Order = 3)]
34
36 [DataMember(Order = 4)]
38
40 [DataMember(Order = 5)]
42
45 [DataMember(Order = 6)]
47 }
48
62 int? timeout = null)
63 {
64 if (basePortfolio == null)
66 if (basePortfolio.ref_id == null)
67 throw new ArgumentException("The referenced base portfolio_view reference has no id.");
68
71 if (!layerViewsToAdd.Any() && !layerViewsToRemove.Any())
72 throw new ArgumentException("You must specify either layers to add or layers to remove, or both.");
73
75 {
76 portfolio_view_id = basePortfolio,
77 add_layer_view_ids = layerViewsToAdd,
78 remove_layer_view_ids = layerViewsToRemove
79 };
80
81 return m.Post(requestParameters, timeout).portfolio_view;
82 }
83 }
84 }
85}
Base class used by all resources.
Describes a collection of resources which can be listed.
The structure used to create a Marginal PortfolioView.
IEnumerable< IReference< ILayerView > > add_layer_view_ids
The collection of Layer Views to add to the base PortfolioView.
IReference< PortfolioView > portfolio_view
The Marginal Portfolio View.
IEnumerable< IReference< ILayerView > > remove_layer_view_ids
The collection of LayerViews to remove from the base PortfolioView.
override string collection_name
The collection endpoint at which resources of this type will be posted.
IReference< PortfolioView > portfolio_view_id
The base Portfolio View.
Represents the endpoint on the server for requesting marginal portfolios.
string Path
The relative path to this endpoint from the root URL.
static readonly string PATH
The path of the endpoint for requesting marginal portfolios.
static IReference< PortfolioView > Post(IReference< PortfolioView > basePortfolio, IEnumerable< IReference< ILayerView > > layerViewsToAdd=null, IEnumerable< IReference< ILayerView > > layerViewsToRemove=null, IEnumerable< Parameter > requestParameters=null, int? timeout=null)
Construct a "marginal" PortfolioView by adding and/or removing one or more LayerViews to/from some ba...
API methods / requests made available to the user.
Specifies that a property is generated by the server and should not be specified on the client side d...
Describes an endpoint on the server that can be interacted with. Inheriting from this interface means...
Definition IEndpoint.cs:10