Table of Contents

Class BreezeHelper

Namespace
BreezeSdk.Runtime
Assembly
docfx-helper.dll

General-purpose URL and locale utilities used internally by the Breeze SDK.

public static class BreezeHelper
Inheritance
BreezeHelper
Inherited Members

Methods

BuildQueryString(NameValueCollection)

Encodes a NameValueCollection into a URL query string using Unity's URL escaping. Keys or values that are null are treated as empty strings.

public static string BuildQueryString(NameValueCollection queryParams)

Parameters

queryParams NameValueCollection

The parameters to encode. Returns an empty string when null or empty.

Returns

string

A percent-encoded query string without a leading ?, e.g. "key1=val1&key2=val2".

BuildRequestUrl(string, string, NameValueCollection)

Constructs an absolute URL from a base URL, a path, and an optional set of query parameters.

public static string BuildRequestUrl(string baseUrl, string path, NameValueCollection queryParams)

Parameters

baseUrl string

The scheme and host portion of the URL (e.g., "https://pay.breeze.cash").

path string

The URL path (e.g., "/checkout").

queryParams NameValueCollection

Query parameters to append. Pass null or an empty collection for no query string.

Returns

string

The fully-formed absolute URI string.

GetCurrentTwoLetterIsoRegionName(CultureInfo)

Returns the two-letter ISO 3166-1 alpha-2 country code for the given CultureInfo. Falls back to "US" if the culture cannot be mapped to a region (e.g., invariant or neutral cultures).

public static string GetCurrentTwoLetterIsoRegionName(CultureInfo culture)

Parameters

culture CultureInfo

The culture to resolve to a region.

Returns

string

A two-letter uppercase country code such as "US", "GB", or "JP".

UpdateUrlQueryParams(string, NameValueCollection, bool)

Merges or appends query parameters into an existing URL.

public static string UpdateUrlQueryParams(string url, NameValueCollection extraParams, bool appendOnly = false)

Parameters

url string

The base URL whose query string will be modified.

extraParams NameValueCollection

The parameters to merge in.

appendOnly bool

When true, parameters are added without removing existing keys (multi-value allowed). When false (default), existing keys are replaced by the values in extraParams.

Returns

string

The URL with the updated query string.