C# Client Library
A C# Client Library for the AnalyzeRe REST API
Loading...
Searching...
No Matches
Samples.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3
4using AnalyzeRe;
10
11namespace AnalyzeReTesting
12{
13 public partial class Samples
14 {
40
41 public static string Valid_NonExistant_UUID => @"deadbeef-dead-beef-dead-beef00000075";
42
44 {
45 { "Key1", "string" },
46 { "Key2", 1 },
47 { "Key3", 3.14 },
48 { "Key5", true }
49 };
50
52 new Reinstatement { premium = 0.5, brokerage = 0.05 };
53
54 #region Fees
55 public static class Fees
56 {
58 {
59 name = "MyFixedExpense",
60 payout_date = DateTime.UtcNow,
61 amount = new MonetaryUnit(100, "USD")
62 };
63
65 {
66 name = "MyProportionalExpense",
67 payout_date = DateTime.UtcNow,
68 rate = 0.5,
69 premiums = ListOfOne(FeeReference.Create(FeeReference.PremiumSource.Premium))
70 };
71
73 {
74 name = "MyProfitCommission",
75 payout_date = DateTime.UtcNow,
76 rate = 0.5,
77 losses = ListOfOne(FeeReference.Create(FeeReference.LossSource.Losses)),
78 premiums = ListOfOne(FeeReference.Create(FeeReference.PremiumSource.Premium))
79 };
80
81 public static List<Fee> ListOfAllFeeTypes => new List<Fee>
82 {
86 };
87
88 public static List<Fee> ListWithNestedFeeReference => new List<Fee>
89 {
93 {
94 name = "MyProfitCommission",
95 payout_date = DateTime.UtcNow,
96 rate = 0.5,
97 losses = ListOfOne(FeeReference.Create(FeeReference.LossSource.Losses)),
98 premiums = ListOfOne(FeeReference.Create(FeeReference.PremiumSource.Premium)),
99 fees = new List<FeeReference>
100 {
103 }
104 }
105 };
106 }
107 #endregion Fees
108
109 #region Policy
112
113 public static Policy Policy => new Policy
114 {
115 transform_records = new HashSet<RecordType>{ RecordType.Loss,
116 RecordType.FixedExpense, RecordType.ProportionalExpense },
117 forward_records = new HashSet<RecordType>{ RecordType.NoClaimsBonus,
118 RecordType.ProfitCommission, RecordType.SlidingScaleCommission }
119 };
120
121 public static Policy TransformAllPolicy => new Policy { transform_records = AllRecordTypes };
122
123 public static Policy ForwardAllPolicy => new Policy { forward_records = AllRecordTypes };
124 #endregion Policy
125 }
126}
static ProportionalExpense ProportionalExpense
Definition Samples.cs:64
static FixedExpense FixedExpense
Definition Samples.cs:57
static List< Fee > ListOfAllFeeTypes
Definition Samples.cs:81
static List< Fee > ListWithNestedFeeReference
Definition Samples.cs:88
Exposes sample resource objects, with built-in methods for injecting dependencies.
Definition Samples.cs:14
static Policy TransformAllPolicy
Definition Samples.cs:121
static HashSet< RecordType > AllRecordTypes
Returns the set of all record types as a new HashSet instance.
Definition Samples.cs:111
static Dictionary< string, object > SampleMetadata
Definition Samples.cs:43
static List< Type > GetAPIResourceTypes()
A list of base "production" resource types on the server, (e.g. each with their own collection) used ...
static string Valid_NonExistant_UUID
Definition Samples.cs:41
static Policy ForwardAllPolicy
Definition Samples.cs:123
Describes a collection of resources which can be listed.
A configuration of resources used to simulate a layer or portfolio.
Abstract representation of a distribution, used for parametric loss sets.
Representation of an event catalog. The event catalog may cover multiple region/perils,...
A profile describing how to apply exchange rates during an analysis.
A table containing exchange rate information.
Represents a reference, used in Fee objects.
LossSource
Sources of Losses.
static FeeReference CreateFromFeeName(string name)
Create a reference to a Fee from its name.
PremiumSource
Sources of Premium.
static FeeReference Create(PremiumSource source)
Create a reference to a Premium source.
string name
A user friendly name for this fee.
Definition Fee.cs:18
The Fixed Expense Fee applies the payout amount to all trials.
The Profit Commission applies a fee that is the sum of the premium sources minus the sum of loss and ...
The Proportional Expense applies a fee that is the rate multiplied by the sum of premium sources.
Represents the Analysis of a Layer.
Abstract representation of a layer. This resource type cannot be instantiated instead derived resourc...
Definition Layer.cs:12
Layer Policy is the rule on RecordType that determines how occurrences belonging to a particular Reco...
Definition Policy.cs:17
Represents a reinstatement premium and brokerage amount.
A predicate that determines whether a loss should be included in the perspective or not.
Definition LossFilter.cs:11
Base class for all LossSet sub-types. A LossSet is a resource that generates sample (trial) losses wh...
Definition LossSet.cs:13
Representation of a monetary value with a currency.
Representation of a set of Optimization Parameters.
Represents the Analysis of a Portfolio.
Representation of a portfolio.
Definition Portfolio.cs:12
Representation of a simulation of a set of trials each representing an event occurrence sequence.
Definition Simulation.cs:14
Helper class for extending the functionality of the static Enumclass with compile-time-type-specific ...
Definition Enum.cs:11
RecordType
The type of occurrence.
Definition RecordType.cs:10