Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

ZettleDefaults.cs

using Nop.Core;

namespace Nop.Plugin.Misc.Zettle;

/// 
/// Represents plugin constants
/// 
public class ZettleDefaults
{
    /// 
    /// Gets the plugin system name
    /// 
    public static string SystemName => "Misc.Zettle";

    /// 
    /// Gets the user agent used to request third-party services
    /// 
    public static string UserAgent => $"nopCommerce-{NopVersion.CURRENT_VERSION}";

    /// 
    /// Gets the application name
    /// 
    public static string ApplicationName => "nopCommerce-integration";

    /// 
    /// Gets the partner identifier
    /// 
    public static string PartnerIdentifier => "nopCommerce";

    /// 
    /// Gets the partner affiliation header used for each request to APIs
    /// 
    public static (string Name, string Value) PartnerHeader => ("X-iZettle-Application-Id", "f4954821-e7e4-4fca-854e-e36060b5748d");

    /// 
    /// Gets the webhook request signature header
    /// 
    public static string SignatureHeader => "X-iZettle-Signature";

    /// 
    /// Gets a default period (in seconds) before the request times out
    /// 
    public static int RequestTimeout => 15;

    /// 
    /// Gets a default number of products to import in one request
    /// 
    public static int ImportProductsNumber => 500;

    /// 
    /// Gets webhook event names to subscribe
    /// 
    public static List WebhookEventNames =>
    [
    "ProductCreated",
    "InventoryBalanceChanged",
    "InventoryTrackingStopped",
    "ApplicationConnectionRemoved"
    ];

    /// 
    /// Gets the configuration route name
    /// 
    public static string ConfigurationRouteName => "Plugin.Misc.Zettle.Configure";

    /// 
    /// Gets the webhook route name
    /// 
    public static string WebhookRouteName => "Plugin.Misc.Zettle.Webhook";

    /// 
    /// Gets a name, type and period (in seconds) of the auto synchronization task
    /// 
    public static (string Name, string Type, int Period) SynchronizationTask =>
        ("Synchronization (PayPal Zettle plugin)", "Nop.Plugin.Misc.Zettle.Services.ZettleSyncTask", 28800);
}