-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include payloads. Full and checked currencies
- Loading branch information
Showing
7 changed files
with
134 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace NowPayments.Net.Objects | ||
{ | ||
public class Currency | ||
{ | ||
[JsonPropertyName("id")] | ||
public int Id { get; set; } | ||
[JsonPropertyName("code")] | ||
public string? Code { get; set; } | ||
[JsonPropertyName("name")] | ||
public string? Name { get; set; } | ||
[JsonPropertyName("enable")] | ||
public bool Enable { get; set; } | ||
[JsonPropertyName("wallet_regex")] | ||
public string? WalletRegex { get; set; } | ||
[JsonPropertyName("priority")] | ||
public int Priority { get; set; } | ||
[JsonPropertyName("extra_id_exists")] | ||
public bool ExtraIdExists { get; set; } | ||
[JsonPropertyName("extra_id_regex")] | ||
public string? ExtraIdRegex { get; set; } | ||
[JsonPropertyName("logo_url")] | ||
public string? LogoUrl { get; set; } | ||
[JsonPropertyName("track")] | ||
public bool Track { get; set; } | ||
[JsonPropertyName("cg_id")] | ||
public string? CgId { get; set; } | ||
[JsonPropertyName("is_maxlimit")] | ||
public bool IsMaxlimit { get; set; } | ||
[JsonPropertyName("network")] | ||
public string? Network { get; set; } | ||
[JsonPropertyName("smart_contract")] | ||
public string? SmartContract { get; set; } | ||
[JsonPropertyName("network_precision")] | ||
public string? NetworkPrecision { get; set; } | ||
[JsonPropertyName("explorer_link_hash")] | ||
public string? ExplorerLinkHash { get; set; } | ||
[JsonPropertyName("precision")] | ||
public int Precision { get; set; } | ||
[JsonPropertyName("ticker")] | ||
public string? Ticker { get; set; } | ||
[JsonPropertyName("is_defi")] | ||
public bool IsDefi { get; set; } | ||
[JsonPropertyName("is_popular")] | ||
public bool IsPopular { get; set; } | ||
[JsonPropertyName("is_stable")] | ||
public bool IsStable { get; set; } | ||
[JsonPropertyName("available_for_to_conversion")] | ||
public bool AvailableForToConversion { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
NowPayments.Net.Objects/RequestPayload/AuthenticationRequestPayload.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace NowPayments.Net.Objects.RequestPayload | ||
{ | ||
internal class AuthenticationRequestPayload | ||
{ | ||
[JsonPropertyName("email")] | ||
public string Email { get; set; } = string.Empty; | ||
[JsonPropertyName("password")] | ||
public string Password { get; set; } = string.Empty; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
NowPayments.Net.Objects/RequestPayload/PaymentRequestPayload.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
|
||
namespace NowPayments.Net.Objects.RequestPayload | ||
{ | ||
public class PaymentRequestPayload | ||
{ | ||
[JsonPropertyName("price_amount")] | ||
public decimal PriceAmount { get; set; } | ||
[JsonPropertyName("price_currency")] | ||
public string PriceCurrency { get; set; } = "usd"; | ||
[JsonPropertyName("pay_amount")] | ||
public decimal PayAmount { get; set; } | ||
[JsonPropertyName("pay_currency")] | ||
public string PayCurrency { get; set; } = "btc"; | ||
[JsonPropertyName("ipn_callback_url")] | ||
public string? IPNCallbackUrl { get; set; } | ||
[JsonPropertyName("order_id")] | ||
public string? OrderId { get; set; } | ||
[JsonPropertyName("order_description")] | ||
public string? OrderDescription { get; set; } | ||
[JsonPropertyName("purchase_id")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public long PurchaseId { get; set; } = 0; | ||
[JsonPropertyName("payout_address")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public string? PayoutAddress { get; set; } | ||
[JsonPropertyName("payout_currency")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public string? PayoutCurrency { get; set; } | ||
[JsonPropertyName("payout_extra_id")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] | ||
public string? PayoutExtraId { get; set; } | ||
[JsonPropertyName("is_fixed_rate")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public bool IsFixedRate { get; set; } = false; | ||
[JsonPropertyName("is_fee_paid_by_user")] | ||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)] | ||
public bool IsFeePaidByUser { get; set; } = false; | ||
} | ||
|
||
public class PaymentRequestPayload_Sandbox : PaymentRequestPayload | ||
{ | ||
[JsonPropertyName("case")] | ||
public string? Case { get; set; } | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
NowPayments.Net.Objects/ResponsePayload/PaymentResponsePayload.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace NowPayments.Net.Objects.ResponsePayload | ||
{ | ||
public class PaymentResponsePayload : Payment | ||
{ | ||
} | ||
} |