Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
configured_endpoints: 239
openapi_spec_hash: e95ac51d0818ef7b5b5b9f7606d5891b
openapi_spec_hash: 4b35e1ea5ca1121f4c8d11ff7ee6255b
config_hash: 1ca082e374ef7000e2a5971e8da740e0
2 changes: 1 addition & 1 deletion scripts/mock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@ public class ReasonTest : TestBase
[Theory]
[InlineData(Reason.LateReturn)]
[InlineData(Reason.WrongPayeeCredit)]
[InlineData(Reason.AdjustedAmount)]
[InlineData(Reason.NonConformingItem)]
[InlineData(Reason.Paid)]
public void Validation_Works(Reason rawValue)
{
// force implicit conversion because Theory can't do that for us
Expand All @@ -125,9 +122,6 @@ public void InvalidEnumValidationThrows_Works()
[Theory]
[InlineData(Reason.LateReturn)]
[InlineData(Reason.WrongPayeeCredit)]
[InlineData(Reason.AdjustedAmount)]
[InlineData(Reason.NonConformingItem)]
[InlineData(Reason.Paid)]
public void SerializationRoundtrip_Works(Reason rawValue)
{
// force implicit conversion because Theory can't do that for us
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ public sealed record class Adjustment : JsonModel
}

/// <summary>
/// The amount of the adjustment.
/// The amount of the adjustment in USD cents. A positive amount is a credit
/// to your account and a negative amount is a debit.
/// </summary>
public required long Amount
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ public IReadOnlyDictionary<string, JsonElement> RawBodyData
public string? InboundCheckDepositID { get; init; }

/// <summary>
/// The adjustment amount in cents. Defaults to the amount of the Inbound Check Deposit.
/// The adjustment amount in cents. A positive amount means that the funds are
/// being returned to you by the other bank and is a credit to your account,
/// as happens for a `wrong_payee_credit`. A negative amount is a debit to your
/// account, as happens for a `late_return`. Defaults to the amount of the Inbound
/// Check Deposit.
/// </summary>
public long? Amount
{
Expand Down Expand Up @@ -219,22 +223,6 @@ public enum Reason
/// has reimbursed the funds with a Wrong Payee Credit.
/// </summary>
WrongPayeeCredit,

/// <summary>
/// The check was deposited with a different amount than what was written on the check.
/// </summary>
AdjustedAmount,

/// <summary>
/// The recipient was not able to process the check. This usually happens for
/// e.g., low quality images.
/// </summary>
NonConformingItem,

/// <summary>
/// The check has already been deposited elsewhere and so this is a duplicate.
/// </summary>
Paid,
}

sealed class ReasonConverter : JsonConverter<Reason>
Expand All @@ -249,9 +237,6 @@ JsonSerializerOptions options
{
"late_return" => Reason.LateReturn,
"wrong_payee_credit" => Reason.WrongPayeeCredit,
"adjusted_amount" => Reason.AdjustedAmount,
"non_conforming_item" => Reason.NonConformingItem,
"paid" => Reason.Paid,
_ => (Reason)(-1),
};
}
Expand All @@ -264,9 +249,6 @@ public override void Write(Utf8JsonWriter writer, Reason value, JsonSerializerOp
{
Reason.LateReturn => "late_return",
Reason.WrongPayeeCredit => "wrong_payee_credit",
Reason.AdjustedAmount => "adjusted_amount",
Reason.NonConformingItem => "non_conforming_item",
Reason.Paid => "paid",
_ => throw new IncreaseInvalidDataException(
string.Format("Invalid value '{0}' in {1}", value, nameof(value))
),
Expand Down
3 changes: 2 additions & 1 deletion src/Increase.Api/Models/Transactions/Transaction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16421,7 +16421,8 @@ public required string AdjustedTransactionID
}

/// <summary>
/// The amount of the check adjustment.
/// The amount of the check adjustment in USD cents. A positive amount is a credit
/// to your account and a negative amount is a debit.
/// </summary>
public required long Amount
{
Expand Down