Pg.Pulse 1.0.5

dotnet add package Pg.Pulse --version 1.0.5
                    
NuGet\Install-Package Pg.Pulse -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Pg.Pulse" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pg.Pulse" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="Pg.Pulse" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Pg.Pulse --version 1.0.5
                    
#r "nuget: Pg.Pulse, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Pg.Pulse@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Pg.Pulse&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=Pg.Pulse&version=1.0.5
                    
Install as a Cake Tool

Pulse API SDK for .NET

The official .NET SDK for Protect Group's Pulse API - a comprehensive solution for managing refundable bookings, quotes, sales, and transactions in the hospitality and travel industries.

What is Pulse API?

Pulse API enables travel and hospitality businesses to offer flexible refund protection to their customers. With this SDK, you can:

  • 💰 Create and manage refundable booking quotes
  • 🎫 Process sales and bookings with refund protection
  • 💳 Handle payments and transaction statuses
  • 👥 Manage customer information
  • 📅 Update event and travel dates
  • 🔄 Cancel sales and individual items

Installation

Install via NuGet Package Manager:

Install-Package Pg.Pulse

Or using .NET CLI:

dotnet add package Pg.Pulse

Quick Start

1. Add Configuration

Add your Pulse API credentials to appsettings.json:

{
  "Pulse": {
    "Environment": "Test",
    "Region": "Global",
    "MemberVendorCode": "<<YourVendorCode>>",
    "ClientId": "<<YourClientId>>",
    "ClientSecret": "<<YourClientSecret>>"
  }
}

2. Register the Service

In your Program.cs or Startup.cs:

using Pg.Pulse.Extensions;

builder.Services.AddPulseApiClient();

3. Use in Your Code

using Pg.Pulse;
using Pg.Pulse.Models.Quote.Request;
using Pg.Pulse.Models.Sale.Request;

public class BookingService
{
    private readonly IPulseApiClient _pulseClient;

    public BookingService(IPulseApiClient pulseClient)
    {
        _pulseClient = pulseClient;
    }

    public async Task<string> CreateProtectedBookingAsync(decimal amount, int guests)
    {
        // Create a quote
        var quoteRequest = new QuoteRequest
        {
            CurrencyCode = "USD",
            LanguageCode = "en",
            TotalValue = amount,
            EventTravelDateTime = DateTime.Now.AddMonths(3).ToString("yyyy-MM-ddTHH:mm:ss.ffffffzzz"),
            NumberOfTickets = guests,
            ReturnHtml = true
        };

        var quoteResponse = await _pulseClient.CreateQuoteAsync(quoteRequest);

        // Create a sale
        var saleRequest = new SaleRequest
        {
            QuoteId = quoteResponse.Data.QuoteId,
            BookingReference = "ABC4567",
            IsPaidInFull = true,
            TransactionDate = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.ffffffzzz"),
            Customers = new[]
            {
                new CustomerModel
                {
                    FirstName = "John",
                    LastName = "Doe",
                    Email = "john.doe@example.com",
                    Telephone = "+11234567890"
                }
            },
            Products = new[]
            {
                new SaleProduct
                {
                    ProductId = 16,
                    Sold = true
                }
            }
        };

        var saleResponse = await _pulseClient.CreateSaleAsync(saleRequest);
        return saleResponse.Data.SaleId;
    }
}

Error Handling

All methods return response objects with Success property and detailed error information:

var response = await _pulseClient.CreateQuoteAsync(request);

if (!response.Success)
{
    _logger.LogError("Quote creation failed: {Error}", response.Error?.Message);
    // Handle error
    return;
}

// Process successful response
var quoteId = response.Data.QuoteId;

API Reference

Method Description
CreateQuoteAsync Create a new refundable booking quote
GetQuoteAsync Retrieve an existing quote
UpdateQuoteAsync Update quote details
CreateSaleAsync Create a sale from a quote
GetSaleAsync Retrieve sale information
UpdateSaleAsync Update an existing sale
HoldSaleAsync Put a sale on hold
CancelSaleAsync Cancel an entire sale
CancelSaleItemAsync Cancel a specific item
UpdateTransactionStatusAsync Update transaction status
UpdateTransactionItemStatusAsync Update item status
AcceptPaymentAsync Record a payment
UpdateCustomersAsync Update customer information
UpdateEventDateAsync Change event/travel date

Requirements

  • .NET 8.0 or higher
  • Valid Pulse API credentials (API Key and Member ID)

Support & Documentation

  • If you need further assistance or have questions not covered in the documentation, please contact your assigned Integration Manager.

License

This project is licensed under a Proprietary License. Use of this package is permitted only for authorized partners who have received valid credentials from us.


Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 97 2/10/2026
1.0.4 100 1/27/2026
1.0.3 105 1/5/2026
1.0.2 228 12/15/2025
1.0.1 421 12/11/2025

# Release Notes
## 1.0.5
- Updated date-related fields across request models from string to DateTimeOffset
## 1.0.4
- Added values array for quote request
## 1.0.3
- Added release notes support
## 1.0.1
- Bug Fixes
## 1.0.0
- Initial release