Skip to content
Merged
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: 255
openapi_spec_hash: de4578cd6e5125791bb32e1a25c9c5ac
openapi_spec_hash: 31dbb51b621eeb3886e4e430fe825146
config_hash: de151ebd21a0bd391662389b310a8f49
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 @@ -16,7 +16,7 @@ public void FieldRoundtrip_Works()
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 100,
StatementDescriptor = "New ACH transfer",
StatementDescriptor = "INVOICE 2468",
AccountNumber = "987654321",
Addenda = new()
{
Expand All @@ -29,12 +29,12 @@ public void FieldRoundtrip_Works()
CompanyDescriptiveDate = "J!",
CompanyDiscretionaryData = "J!",
CompanyEntryDescription = "J!",
CompanyName = "company_name",
CompanyName = "Phonographs Inc",
DestinationAccountHolder = DestinationAccountHolder.Business,
ExternalAccountID = "external_account_id",
Funding = Funding.Checking,
IndividualID = "individual_id",
IndividualName = "individual_name",
IndividualName = "Ian Crease",
PreferredEffectiveDate = new()
{
Date = "2019-12-27",
Expand All @@ -47,7 +47,7 @@ public void FieldRoundtrip_Works()

string expectedAccountID = "account_in71c4amph0vgo2qllky";
long expectedAmount = 100;
string expectedStatementDescriptor = "New ACH transfer";
string expectedStatementDescriptor = "INVOICE 2468";
string expectedAccountNumber = "987654321";
Addenda expectedAddenda = new()
{
Expand All @@ -58,13 +58,13 @@ public void FieldRoundtrip_Works()
string expectedCompanyDescriptiveDate = "J!";
string expectedCompanyDiscretionaryData = "J!";
string expectedCompanyEntryDescription = "J!";
string expectedCompanyName = "company_name";
string expectedCompanyName = "Phonographs Inc";
ApiEnum<string, DestinationAccountHolder> expectedDestinationAccountHolder =
DestinationAccountHolder.Business;
string expectedExternalAccountID = "external_account_id";
ApiEnum<string, Funding> expectedFunding = Funding.Checking;
string expectedIndividualID = "individual_id";
string expectedIndividualName = "individual_name";
string expectedIndividualName = "Ian Crease";
PreferredEffectiveDate expectedPreferredEffectiveDate = new()
{
Date = "2019-12-27",
Expand Down Expand Up @@ -102,7 +102,7 @@ public void OptionalNonNullableParamsUnsetAreNotSet_Works()
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 100,
StatementDescriptor = "New ACH transfer",
StatementDescriptor = "INVOICE 2468",
};

Assert.Null(parameters.AccountNumber);
Expand Down Expand Up @@ -144,7 +144,7 @@ public void OptionalNonNullableParamsSetToNullAreNotSet_Works()
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 100,
StatementDescriptor = "New ACH transfer",
StatementDescriptor = "INVOICE 2468",

// Null should be interpreted as omitted for these properties
AccountNumber = null,
Expand Down Expand Up @@ -203,7 +203,7 @@ public void Url_Works()
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 100,
StatementDescriptor = "New ACH transfer",
StatementDescriptor = "INVOICE 2468",
};

var url = parameters.Url(new() { ApiKey = "My API Key" });
Expand All @@ -218,7 +218,7 @@ public void CopyConstructor_Works()
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 100,
StatementDescriptor = "New ACH transfer",
StatementDescriptor = "INVOICE 2468",
AccountNumber = "987654321",
Addenda = new()
{
Expand All @@ -231,12 +231,12 @@ public void CopyConstructor_Works()
CompanyDescriptiveDate = "J!",
CompanyDiscretionaryData = "J!",
CompanyEntryDescription = "J!",
CompanyName = "company_name",
CompanyName = "Phonographs Inc",
DestinationAccountHolder = DestinationAccountHolder.Business,
ExternalAccountID = "external_account_id",
Funding = Funding.Checking,
IndividualID = "individual_id",
IndividualName = "individual_name",
IndividualName = "Ian Crease",
PreferredEffectiveDate = new()
{
Date = "2019-12-27",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public void FieldRoundtrip_Works()
var parameters = new AccountRevenuePaymentCreateParams
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 1000,
Amount = 100,
AccruedOnAccountID = "accrued_on_account_id",
PeriodEnd = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
PeriodStart = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
};

string expectedAccountID = "account_in71c4amph0vgo2qllky";
long expectedAmount = 1000;
long expectedAmount = 100;
string expectedAccruedOnAccountID = "accrued_on_account_id";
DateTimeOffset expectedPeriodEnd = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z");
DateTimeOffset expectedPeriodStart = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z");
Expand All @@ -36,7 +36,7 @@ public void OptionalNonNullableParamsUnsetAreNotSet_Works()
var parameters = new AccountRevenuePaymentCreateParams
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 1000,
Amount = 100,
};

Assert.Null(parameters.AccruedOnAccountID);
Expand All @@ -53,7 +53,7 @@ public void OptionalNonNullableParamsSetToNullAreNotSet_Works()
var parameters = new AccountRevenuePaymentCreateParams
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 1000,
Amount = 100,

// Null should be interpreted as omitted for these properties
AccruedOnAccountID = null,
Expand All @@ -75,7 +75,7 @@ public void Url_Works()
AccountRevenuePaymentCreateParams parameters = new()
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 1000,
Amount = 100,
};

var url = parameters.Url(new() { ApiKey = "My API Key" });
Expand All @@ -94,7 +94,7 @@ public void CopyConstructor_Works()
var parameters = new AccountRevenuePaymentCreateParams
{
AccountID = "account_in71c4amph0vgo2qllky",
Amount = 1000,
Amount = 100,
AccruedOnAccountID = "accrued_on_account_id",
PeriodEnd = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
PeriodStart = DateTimeOffset.Parse("2019-12-27T18:11:19.117Z"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public void FieldRoundtrip_Works()
{
Action = CardDisputes::Action.AcceptUserSubmission,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand All @@ -38,6 +39,7 @@ public void FieldRoundtrip_Works()
{
Action = CardDisputes::Action.AcceptUserSubmission,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand Down Expand Up @@ -116,6 +118,7 @@ public void CopyConstructor_Works()
{
Action = CardDisputes::Action.AcceptUserSubmission,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand Down Expand Up @@ -200,6 +203,7 @@ public void FieldRoundtrip_Works()
{
Action = CardDisputes::Action.AcceptChargeback,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand All @@ -215,6 +219,7 @@ public void FieldRoundtrip_Works()
ApiEnum<string, CardDisputes::Action> expectedAction =
CardDisputes::Action.AcceptChargeback;
CardDisputes::AcceptChargeback expectedAcceptChargeback = new();
CardDisputes::AcceptUserPrearbitration expectedAcceptUserPrearbitration = new();
CardDisputes::AcceptUserSubmission expectedAcceptUserSubmission = new();
CardDisputes::DeclineUserPrearbitration expectedDeclineUserPrearbitration = new();
CardDisputes::ReceiveMerchantPrearbitration expectedReceiveMerchantPrearbitration = new();
Expand All @@ -228,6 +233,7 @@ public void FieldRoundtrip_Works()

Assert.Equal(expectedAction, model.Action);
Assert.Equal(expectedAcceptChargeback, model.AcceptChargeback);
Assert.Equal(expectedAcceptUserPrearbitration, model.AcceptUserPrearbitration);
Assert.Equal(expectedAcceptUserSubmission, model.AcceptUserSubmission);
Assert.Equal(expectedDeclineUserPrearbitration, model.DeclineUserPrearbitration);
Assert.Equal(expectedReceiveMerchantPrearbitration, model.ReceiveMerchantPrearbitration);
Expand All @@ -247,6 +253,7 @@ public void SerializationRoundtrip_Works()
{
Action = CardDisputes::Action.AcceptChargeback,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand Down Expand Up @@ -275,6 +282,7 @@ public void FieldRoundtripThroughSerialization_Works()
{
Action = CardDisputes::Action.AcceptChargeback,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand All @@ -297,6 +305,7 @@ public void FieldRoundtripThroughSerialization_Works()
ApiEnum<string, CardDisputes::Action> expectedAction =
CardDisputes::Action.AcceptChargeback;
CardDisputes::AcceptChargeback expectedAcceptChargeback = new();
CardDisputes::AcceptUserPrearbitration expectedAcceptUserPrearbitration = new();
CardDisputes::AcceptUserSubmission expectedAcceptUserSubmission = new();
CardDisputes::DeclineUserPrearbitration expectedDeclineUserPrearbitration = new();
CardDisputes::ReceiveMerchantPrearbitration expectedReceiveMerchantPrearbitration = new();
Expand All @@ -310,6 +319,7 @@ public void FieldRoundtripThroughSerialization_Works()

Assert.Equal(expectedAction, deserialized.Action);
Assert.Equal(expectedAcceptChargeback, deserialized.AcceptChargeback);
Assert.Equal(expectedAcceptUserPrearbitration, deserialized.AcceptUserPrearbitration);
Assert.Equal(expectedAcceptUserSubmission, deserialized.AcceptUserSubmission);
Assert.Equal(expectedDeclineUserPrearbitration, deserialized.DeclineUserPrearbitration);
Assert.Equal(
Expand All @@ -335,6 +345,7 @@ public void Validation_Works()
{
Action = CardDisputes::Action.AcceptChargeback,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand All @@ -357,6 +368,8 @@ public void OptionalNonNullablePropertiesUnsetAreNotSet_Works()

Assert.Null(model.AcceptChargeback);
Assert.False(model.RawData.ContainsKey("accept_chargeback"));
Assert.Null(model.AcceptUserPrearbitration);
Assert.False(model.RawData.ContainsKey("accept_user_prearbitration"));
Assert.Null(model.AcceptUserSubmission);
Assert.False(model.RawData.ContainsKey("accept_user_submission"));
Assert.Null(model.DeclineUserPrearbitration);
Expand Down Expand Up @@ -396,6 +409,7 @@ public void OptionalNonNullablePropertiesSetToNullAreNotSet_Works()

// Null should be interpreted as omitted for these properties
AcceptChargeback = null,
AcceptUserPrearbitration = null,
AcceptUserSubmission = null,
DeclineUserPrearbitration = null,
ReceiveMerchantPrearbitration = null,
Expand All @@ -410,6 +424,8 @@ public void OptionalNonNullablePropertiesSetToNullAreNotSet_Works()

Assert.Null(model.AcceptChargeback);
Assert.False(model.RawData.ContainsKey("accept_chargeback"));
Assert.Null(model.AcceptUserPrearbitration);
Assert.False(model.RawData.ContainsKey("accept_user_prearbitration"));
Assert.Null(model.AcceptUserSubmission);
Assert.False(model.RawData.ContainsKey("accept_user_submission"));
Assert.Null(model.DeclineUserPrearbitration);
Expand Down Expand Up @@ -441,6 +457,7 @@ public void OptionalNonNullablePropertiesSetToNullValidation_Works()

// Null should be interpreted as omitted for these properties
AcceptChargeback = null,
AcceptUserPrearbitration = null,
AcceptUserSubmission = null,
DeclineUserPrearbitration = null,
ReceiveMerchantPrearbitration = null,
Expand All @@ -463,6 +480,7 @@ public void CopyConstructor_Works()
{
Action = CardDisputes::Action.AcceptChargeback,
AcceptChargeback = new(),
AcceptUserPrearbitration = new(),
AcceptUserSubmission = new(),
DeclineUserPrearbitration = new(),
ReceiveMerchantPrearbitration = new(),
Expand All @@ -485,6 +503,7 @@ public class ActionTest : TestBase
{
[Theory]
[InlineData(CardDisputes::Action.AcceptChargeback)]
[InlineData(CardDisputes::Action.AcceptUserPrearbitration)]
[InlineData(CardDisputes::Action.AcceptUserSubmission)]
[InlineData(CardDisputes::Action.DeclineUserPrearbitration)]
[InlineData(CardDisputes::Action.ReceiveMerchantPrearbitration)]
Expand Down Expand Up @@ -516,6 +535,7 @@ public void InvalidEnumValidationThrows_Works()

[Theory]
[InlineData(CardDisputes::Action.AcceptChargeback)]
[InlineData(CardDisputes::Action.AcceptUserPrearbitration)]
[InlineData(CardDisputes::Action.AcceptUserSubmission)]
[InlineData(CardDisputes::Action.DeclineUserPrearbitration)]
[InlineData(CardDisputes::Action.ReceiveMerchantPrearbitration)]
Expand Down Expand Up @@ -611,6 +631,60 @@ public void CopyConstructor_Works()
}
}

public class AcceptUserPrearbitrationTest : TestBase
{
[Fact]
public void FieldRoundtrip_Works()
{
var model = new CardDisputes::AcceptUserPrearbitration { };
}

[Fact]
public void SerializationRoundtrip_Works()
{
var model = new CardDisputes::AcceptUserPrearbitration { };

string json = JsonSerializer.Serialize(model, ModelBase.SerializerOptions);
var deserialized = JsonSerializer.Deserialize<CardDisputes::AcceptUserPrearbitration>(
json,
ModelBase.SerializerOptions
);

Assert.Equal(model, deserialized);
}

[Fact]
public void FieldRoundtripThroughSerialization_Works()
{
var model = new CardDisputes::AcceptUserPrearbitration { };

string element = JsonSerializer.Serialize(model, ModelBase.SerializerOptions);
var deserialized = JsonSerializer.Deserialize<CardDisputes::AcceptUserPrearbitration>(
element,
ModelBase.SerializerOptions
);
Assert.NotNull(deserialized);
}

[Fact]
public void Validation_Works()
{
var model = new CardDisputes::AcceptUserPrearbitration { };

model.Validate();
}

[Fact]
public void CopyConstructor_Works()
{
var model = new CardDisputes::AcceptUserPrearbitration { };

CardDisputes::AcceptUserPrearbitration copied = new(model);

Assert.Equal(model, copied);
}
}

public class AcceptUserSubmissionTest : TestBase
{
[Fact]
Expand Down
Loading
Loading