Skip to content

Commit 53b8b50

Browse files
feat(api): api update (#316)
Co-authored-by: increase-releases[bot] <285999079+increase-releases[bot]@users.noreply.github.com>
1 parent b93f4f1 commit 53b8b50

12 files changed

Lines changed: 93 additions & 97 deletions

File tree

‎.stats.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
configured_endpoints: 258
2-
openapi_spec_hash: db9b11eedc47ef944a11e46900d7fcae
2+
openapi_spec_hash: a0b4ea6e95b4d03425ddbbf38709d16d
33
config_hash: b0e46656e84a8c26907fbe6dc8116a3d

‎scripts/mock‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎src/Increase.Api.Tests/Models/AchTransfers/AchTransferCreateParamsTest.cs‎

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public void FieldRoundtrip_Works()
1616
{
1717
AccountID = "account_in71c4amph0vgo2qllky",
1818
Amount = 100,
19-
StatementDescriptor = "INVOICE 2468",
19+
CompanyName = "Phonographs Inc",
20+
IndividualName = "Ian Crease",
2021
AccountNumber = "987654321",
2122
Addenda = new()
2223
{
@@ -29,12 +30,10 @@ public void FieldRoundtrip_Works()
2930
CompanyDescriptiveDate = "J!",
3031
CompanyDiscretionaryData = "J!",
3132
CompanyEntryDescription = "J!",
32-
CompanyName = "Phonographs Inc",
3333
DestinationAccountHolder = DestinationAccountHolder.Business,
3434
ExternalAccountID = "external_account_id",
3535
Funding = Funding.Checking,
3636
IndividualID = "individual_id",
37-
IndividualName = "Ian Crease",
3837
PreferredEffectiveDate = new()
3938
{
4039
Date = "2019-12-27",
@@ -47,7 +46,8 @@ public void FieldRoundtrip_Works()
4746

4847
string expectedAccountID = "account_in71c4amph0vgo2qllky";
4948
long expectedAmount = 100;
50-
string expectedStatementDescriptor = "INVOICE 2468";
49+
string expectedCompanyName = "Phonographs Inc";
50+
string expectedIndividualName = "Ian Crease";
5151
string expectedAccountNumber = "987654321";
5252
Addenda expectedAddenda = new()
5353
{
@@ -58,13 +58,11 @@ public void FieldRoundtrip_Works()
5858
string expectedCompanyDescriptiveDate = "J!";
5959
string expectedCompanyDiscretionaryData = "J!";
6060
string expectedCompanyEntryDescription = "J!";
61-
string expectedCompanyName = "Phonographs Inc";
6261
ApiEnum<string, DestinationAccountHolder> expectedDestinationAccountHolder =
6362
DestinationAccountHolder.Business;
6463
string expectedExternalAccountID = "external_account_id";
6564
ApiEnum<string, Funding> expectedFunding = Funding.Checking;
6665
string expectedIndividualID = "individual_id";
67-
string expectedIndividualName = "Ian Crease";
6866
PreferredEffectiveDate expectedPreferredEffectiveDate = new()
6967
{
7068
Date = "2019-12-27",
@@ -77,18 +75,17 @@ public void FieldRoundtrip_Works()
7775

7876
Assert.Equal(expectedAccountID, parameters.AccountID);
7977
Assert.Equal(expectedAmount, parameters.Amount);
80-
Assert.Equal(expectedStatementDescriptor, parameters.StatementDescriptor);
78+
Assert.Equal(expectedCompanyName, parameters.CompanyName);
79+
Assert.Equal(expectedIndividualName, parameters.IndividualName);
8180
Assert.Equal(expectedAccountNumber, parameters.AccountNumber);
8281
Assert.Equal(expectedAddenda, parameters.Addenda);
8382
Assert.Equal(expectedCompanyDescriptiveDate, parameters.CompanyDescriptiveDate);
8483
Assert.Equal(expectedCompanyDiscretionaryData, parameters.CompanyDiscretionaryData);
8584
Assert.Equal(expectedCompanyEntryDescription, parameters.CompanyEntryDescription);
86-
Assert.Equal(expectedCompanyName, parameters.CompanyName);
8785
Assert.Equal(expectedDestinationAccountHolder, parameters.DestinationAccountHolder);
8886
Assert.Equal(expectedExternalAccountID, parameters.ExternalAccountID);
8987
Assert.Equal(expectedFunding, parameters.Funding);
9088
Assert.Equal(expectedIndividualID, parameters.IndividualID);
91-
Assert.Equal(expectedIndividualName, parameters.IndividualName);
9289
Assert.Equal(expectedPreferredEffectiveDate, parameters.PreferredEffectiveDate);
9390
Assert.Equal(expectedRequireApproval, parameters.RequireApproval);
9491
Assert.Equal(expectedRoutingNumber, parameters.RoutingNumber);
@@ -102,7 +99,8 @@ public void OptionalNonNullableParamsUnsetAreNotSet_Works()
10299
{
103100
AccountID = "account_in71c4amph0vgo2qllky",
104101
Amount = 100,
105-
StatementDescriptor = "INVOICE 2468",
102+
CompanyName = "Phonographs Inc",
103+
IndividualName = "Ian Crease",
106104
};
107105

108106
Assert.Null(parameters.AccountNumber);
@@ -115,8 +113,6 @@ public void OptionalNonNullableParamsUnsetAreNotSet_Works()
115113
Assert.False(parameters.RawBodyData.ContainsKey("company_discretionary_data"));
116114
Assert.Null(parameters.CompanyEntryDescription);
117115
Assert.False(parameters.RawBodyData.ContainsKey("company_entry_description"));
118-
Assert.Null(parameters.CompanyName);
119-
Assert.False(parameters.RawBodyData.ContainsKey("company_name"));
120116
Assert.Null(parameters.DestinationAccountHolder);
121117
Assert.False(parameters.RawBodyData.ContainsKey("destination_account_holder"));
122118
Assert.Null(parameters.ExternalAccountID);
@@ -125,8 +121,6 @@ public void OptionalNonNullableParamsUnsetAreNotSet_Works()
125121
Assert.False(parameters.RawBodyData.ContainsKey("funding"));
126122
Assert.Null(parameters.IndividualID);
127123
Assert.False(parameters.RawBodyData.ContainsKey("individual_id"));
128-
Assert.Null(parameters.IndividualName);
129-
Assert.False(parameters.RawBodyData.ContainsKey("individual_name"));
130124
Assert.Null(parameters.PreferredEffectiveDate);
131125
Assert.False(parameters.RawBodyData.ContainsKey("preferred_effective_date"));
132126
Assert.Null(parameters.RequireApproval);
@@ -144,20 +138,19 @@ public void OptionalNonNullableParamsSetToNullAreNotSet_Works()
144138
{
145139
AccountID = "account_in71c4amph0vgo2qllky",
146140
Amount = 100,
147-
StatementDescriptor = "INVOICE 2468",
141+
CompanyName = "Phonographs Inc",
142+
IndividualName = "Ian Crease",
148143

149144
// Null should be interpreted as omitted for these properties
150145
AccountNumber = null,
151146
Addenda = null,
152147
CompanyDescriptiveDate = null,
153148
CompanyDiscretionaryData = null,
154149
CompanyEntryDescription = null,
155-
CompanyName = null,
156150
DestinationAccountHolder = null,
157151
ExternalAccountID = null,
158152
Funding = null,
159153
IndividualID = null,
160-
IndividualName = null,
161154
PreferredEffectiveDate = null,
162155
RequireApproval = null,
163156
RoutingNumber = null,
@@ -174,8 +167,6 @@ public void OptionalNonNullableParamsSetToNullAreNotSet_Works()
174167
Assert.False(parameters.RawBodyData.ContainsKey("company_discretionary_data"));
175168
Assert.Null(parameters.CompanyEntryDescription);
176169
Assert.False(parameters.RawBodyData.ContainsKey("company_entry_description"));
177-
Assert.Null(parameters.CompanyName);
178-
Assert.False(parameters.RawBodyData.ContainsKey("company_name"));
179170
Assert.Null(parameters.DestinationAccountHolder);
180171
Assert.False(parameters.RawBodyData.ContainsKey("destination_account_holder"));
181172
Assert.Null(parameters.ExternalAccountID);
@@ -184,8 +175,6 @@ public void OptionalNonNullableParamsSetToNullAreNotSet_Works()
184175
Assert.False(parameters.RawBodyData.ContainsKey("funding"));
185176
Assert.Null(parameters.IndividualID);
186177
Assert.False(parameters.RawBodyData.ContainsKey("individual_id"));
187-
Assert.Null(parameters.IndividualName);
188-
Assert.False(parameters.RawBodyData.ContainsKey("individual_name"));
189178
Assert.Null(parameters.PreferredEffectiveDate);
190179
Assert.False(parameters.RawBodyData.ContainsKey("preferred_effective_date"));
191180
Assert.Null(parameters.RequireApproval);
@@ -203,7 +192,8 @@ public void Url_Works()
203192
{
204193
AccountID = "account_in71c4amph0vgo2qllky",
205194
Amount = 100,
206-
StatementDescriptor = "INVOICE 2468",
195+
CompanyName = "Phonographs Inc",
196+
IndividualName = "Ian Crease",
207197
};
208198

209199
var url = parameters.Url(new() { ApiKey = "My API Key" });
@@ -218,7 +208,8 @@ public void CopyConstructor_Works()
218208
{
219209
AccountID = "account_in71c4amph0vgo2qllky",
220210
Amount = 100,
221-
StatementDescriptor = "INVOICE 2468",
211+
CompanyName = "Phonographs Inc",
212+
IndividualName = "Ian Crease",
222213
AccountNumber = "987654321",
223214
Addenda = new()
224215
{
@@ -231,12 +222,10 @@ public void CopyConstructor_Works()
231222
CompanyDescriptiveDate = "J!",
232223
CompanyDiscretionaryData = "J!",
233224
CompanyEntryDescription = "J!",
234-
CompanyName = "Phonographs Inc",
235225
DestinationAccountHolder = DestinationAccountHolder.Business,
236226
ExternalAccountID = "external_account_id",
237227
Funding = Funding.Checking,
238228
IndividualID = "individual_id",
239-
IndividualName = "Ian Crease",
240229
PreferredEffectiveDate = new()
241230
{
242231
Date = "2019-12-27",

‎src/Increase.Api.Tests/Models/FednowTransfers/FednowTransferListPageResponseTest.cs‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public void FieldRoundtrip_Works()
4747
State = "NY",
4848
},
4949
DebtorName = "National Phonograph Company",
50+
EndToEndIdentification = "Invoice 29582",
5051
ExternalAccountID = null,
5152
IdempotencyKey = null,
5253
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -117,6 +118,7 @@ public void FieldRoundtrip_Works()
117118
State = "NY",
118119
},
119120
DebtorName = "National Phonograph Company",
121+
EndToEndIdentification = "Invoice 29582",
120122
ExternalAccountID = null,
121123
IdempotencyKey = null,
122124
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -199,6 +201,7 @@ public void SerializationRoundtrip_Works()
199201
State = "NY",
200202
},
201203
DebtorName = "National Phonograph Company",
204+
EndToEndIdentification = "Invoice 29582",
202205
ExternalAccountID = null,
203206
IdempotencyKey = null,
204207
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -284,6 +287,7 @@ public void FieldRoundtripThroughSerialization_Works()
284287
State = "NY",
285288
},
286289
DebtorName = "National Phonograph Company",
290+
EndToEndIdentification = "Invoice 29582",
287291
ExternalAccountID = null,
288292
IdempotencyKey = null,
289293
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -362,6 +366,7 @@ public void FieldRoundtripThroughSerialization_Works()
362366
State = "NY",
363367
},
364368
DebtorName = "National Phonograph Company",
369+
EndToEndIdentification = "Invoice 29582",
365370
ExternalAccountID = null,
366371
IdempotencyKey = null,
367372
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -444,6 +449,7 @@ public void Validation_Works()
444449
State = "NY",
445450
},
446451
DebtorName = "National Phonograph Company",
452+
EndToEndIdentification = "Invoice 29582",
447453
ExternalAccountID = null,
448454
IdempotencyKey = null,
449455
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -522,6 +528,7 @@ public void CopyConstructor_Works()
522528
State = "NY",
523529
},
524530
DebtorName = "National Phonograph Company",
531+
EndToEndIdentification = "Invoice 29582",
525532
ExternalAccountID = null,
526533
IdempotencyKey = null,
527534
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",

‎src/Increase.Api.Tests/Models/FednowTransfers/FednowTransferTest.cs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public void FieldRoundtrip_Works()
4444
State = "NY",
4545
},
4646
DebtorName = "National Phonograph Company",
47+
EndToEndIdentification = "Invoice 29582",
4748
ExternalAccountID = null,
4849
IdempotencyKey = null,
4950
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -109,6 +110,7 @@ public void FieldRoundtrip_Works()
109110
State = "NY",
110111
};
111112
string expectedDebtorName = "National Phonograph Company";
113+
string expectedEndToEndIdentification = "Invoice 29582";
112114
string expectedPendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4";
113115
FednowTransfers::Rejection expectedRejection = new()
114116
{
@@ -152,6 +154,7 @@ public void FieldRoundtrip_Works()
152154
Assert.Equal(expectedCurrency, model.Currency);
153155
Assert.Equal(expectedDebtorAddress, model.DebtorAddress);
154156
Assert.Equal(expectedDebtorName, model.DebtorName);
157+
Assert.Equal(expectedEndToEndIdentification, model.EndToEndIdentification);
155158
Assert.Null(model.ExternalAccountID);
156159
Assert.Null(model.IdempotencyKey);
157160
Assert.Equal(expectedPendingTransactionID, model.PendingTransactionID);
@@ -212,6 +215,7 @@ public void SerializationRoundtrip_Works()
212215
State = "NY",
213216
},
214217
DebtorName = "National Phonograph Company",
218+
EndToEndIdentification = "Invoice 29582",
215219
ExternalAccountID = null,
216220
IdempotencyKey = null,
217221
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -289,6 +293,7 @@ public void FieldRoundtripThroughSerialization_Works()
289293
State = "NY",
290294
},
291295
DebtorName = "National Phonograph Company",
296+
EndToEndIdentification = "Invoice 29582",
292297
ExternalAccountID = null,
293298
IdempotencyKey = null,
294299
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -361,6 +366,7 @@ public void FieldRoundtripThroughSerialization_Works()
361366
State = "NY",
362367
};
363368
string expectedDebtorName = "National Phonograph Company";
369+
string expectedEndToEndIdentification = "Invoice 29582";
364370
string expectedPendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4";
365371
FednowTransfers::Rejection expectedRejection = new()
366372
{
@@ -404,6 +410,7 @@ public void FieldRoundtripThroughSerialization_Works()
404410
Assert.Equal(expectedCurrency, deserialized.Currency);
405411
Assert.Equal(expectedDebtorAddress, deserialized.DebtorAddress);
406412
Assert.Equal(expectedDebtorName, deserialized.DebtorName);
413+
Assert.Equal(expectedEndToEndIdentification, deserialized.EndToEndIdentification);
407414
Assert.Null(deserialized.ExternalAccountID);
408415
Assert.Null(deserialized.IdempotencyKey);
409416
Assert.Equal(expectedPendingTransactionID, deserialized.PendingTransactionID);
@@ -464,6 +471,7 @@ public void Validation_Works()
464471
State = "NY",
465472
},
466473
DebtorName = "National Phonograph Company",
474+
EndToEndIdentification = "Invoice 29582",
467475
ExternalAccountID = null,
468476
IdempotencyKey = null,
469477
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",
@@ -535,6 +543,7 @@ public void CopyConstructor_Works()
535543
State = "NY",
536544
},
537545
DebtorName = "National Phonograph Company",
546+
EndToEndIdentification = "Invoice 29582",
538547
ExternalAccountID = null,
539548
IdempotencyKey = null,
540549
PendingTransactionID = "pending_transaction_k1sfetcau2qbvjbzgju4",

‎src/Increase.Api.Tests/Services/AchTransferServiceTest.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public async Task Create_Works()
1212
{
1313
AccountID = "account_in71c4amph0vgo2qllky",
1414
Amount = 100,
15-
StatementDescriptor = "INVOICE 2468",
15+
CompanyName = "Phonographs Inc",
16+
IndividualName = "Ian Crease",
1617
},
1718
TestContext.Current.CancellationToken
1819
);

‎src/Increase.Api/Increase.Api.csproj‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
<PackageReadmeFile>README.md</PackageReadmeFile>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<InternalsVisibleTo Include="Increase.Api.Tests"/>
13-
<None Include="..\..\README.md" Pack="true" PackagePath="\"/>
14-
<PackageReference Include="System.Text.Json" Version="9.0.9"/>
15-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
12+
<InternalsVisibleTo Include="Increase.Api.Tests" />
13+
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
14+
<PackageReference Include="System.Text.Json" Version="9.0.9" />
15+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
1616
</ItemGroup>
1717
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
18-
<PackageReference Include="System.Collections.Immutable" Version="8.0.0"/>
18+
<PackageReference Include="System.Collections.Immutable" Version="8.0.0" />
1919
</ItemGroup>
2020
</Project>

‎src/Increase.Api/Models/AchTransfers/AchTransfer.cs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,9 @@ public required ApiEnum<string, AchTransferStandardEntryClassCode> StandardEntry
464464
}
465465

466466
/// <summary>
467-
/// The descriptor that will show on the recipient's bank statement.
467+
/// A description you chose to give the transfer. If `individual_name` and `company_name`
468+
/// were not explicitly set, the `statement_descriptor` will be sent in those
469+
/// fields to the receiving bank to help the customer recognize the transfer.
468470
/// </summary>
469471
public required string? StatementDescriptor
470472
{

0 commit comments

Comments
 (0)