1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-29 07:14:50 -05:00
bitwarden/src/Billing/BillingSettings.cs
Daniel James Smith 09144ddb52
[PM-153] Extend Freshdesk integration (#2939)
* Move keys into FreshDeskSettings class

* Add configurable custom fields for user and org

In FreshDesk we currently use the custom fields `cf_user` and `cf_org`.

- For the US instance these will be set to those values.
- For the EU instance these will likely be configured to `cf_user_eu` and `cf_org_eu`

* Fix file encoding

* Add region to notes

* Use customizable org field value in condition check
2023-05-23 14:43:44 +02:00

34 lines
1.3 KiB
C#

namespace Bit.Billing;
public class BillingSettings
{
public virtual string JobsKey { get; set; }
public virtual string StripeWebhookKey { get; set; }
public virtual string StripeWebhookSecret { get; set; }
public virtual bool StripeEventParseThrowMismatch { get; set; } = true;
public virtual string BitPayWebhookKey { get; set; }
public virtual string AppleWebhookKey { get; set; }
public virtual FreshDeskSettings FreshDesk { get; set; } = new FreshDeskSettings();
public virtual string FreshsalesApiKey { get; set; }
public virtual PayPalSettings PayPal { get; set; } = new PayPalSettings();
public class PayPalSettings
{
public virtual bool Production { get; set; }
public virtual string BusinessId { get; set; }
public virtual string WebhookKey { get; set; }
}
public class FreshDeskSettings
{
public virtual string ApiKey { get; set; }
public virtual string WebhookKey { get; set; }
/// <summary>
/// Indicates the data center region. Valid values are "US" and "EU"
/// </summary>
public virtual string Region { get; set; }
public virtual string UserFieldName { get; set; }
public virtual string OrgFieldName { get; set; }
}
}