Skip to content

Commit

Permalink
Merge pull request #9 from EAddario/master
Browse files Browse the repository at this point in the history
Update Conversion Cancellation, Conversion Date Change and Conversion Split
  • Loading branch information
EAddario authored Jul 1, 2018
2 parents c9d4241 + 9c1cb0c commit beb4e40
Show file tree
Hide file tree
Showing 22 changed files with 329 additions and 244 deletions.
8 changes: 3 additions & 5 deletions Source/CurrencyCloud.Tests/ConversionsTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public async Task FindNoParams()

Assert.Contains(created, found.Conversions);
}

/// <summary>
/// Successfully cancels a conversion.
/// </summary>
Expand All @@ -125,7 +125,6 @@ public async Task Cancel()
Assert.AreEqual(cancelled.ConversionId, created.Id);
}


/// <summary>
/// Successfully changes the date of a conversion.
/// </summary>
Expand All @@ -137,13 +136,12 @@ public async Task DateChange()

Conversion created = await client.CreateConversionAsync(conversion1);

DateTime newSettlementDate = DateTime.Parse("2017-11-10T12:18:56+00:00");
ConversionDateChange dateChanged = await client.DateChangeConversionsAsync(created.Id, newSettlementDate);
DateTime newSettlementDate = DateTime.Parse("2018-02-02T12:34:56+00:00");
ConversionDateChange dateChanged = await client.DateChangeConversionAsync(created.Id, newSettlementDate);

Assert.AreEqual(dateChanged.NewSettlementDate, newSettlementDate);
}


/// <summary>
/// Successfully splits a conversion.
/// </summary>
Expand Down
28 changes: 14 additions & 14 deletions Source/CurrencyCloud.Tests/Mock/Http/Recordings/Accounts.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"method": "POST",
"path": "/v2/authenticate/api",
"headers": {
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
},
"body": "[email protected]&api_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
},
Expand All @@ -34,7 +34,7 @@
"path": "/v2/authenticate/close_session",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand All @@ -60,7 +60,7 @@
"body": "?account_name=Acme%20Ltd.&legal_entity_type=company&your_reference=POS-UID-23523&status=enabled&street=12%20Steward%20St&city=London&state_or_province=London&postal_code=E1%206FQ&country=GB&spread_table=no_markup&identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -102,7 +102,7 @@
"path": "/v2/accounts/current",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -150,7 +150,7 @@
"body": "?account_name=Acme%20Ltd.&legal_entity_type=company&your_reference=POS-UID-23523&status=enabled&street=12%20Steward%20St&city=London&state_or_province=London&postal_code=E1%206FQ&country=GB&spread_table=no_markup&identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -192,7 +192,7 @@
"path": "/v2/accounts/9c9c2492-b0f3-4cfe-9243-b062c9985a9c",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -240,7 +240,7 @@
"body": "?account_name=Acme%20Ltd.&legal_entity_type=company&your_reference=POS-UID-23523&status=enabled&street=12%20Steward%20St&city=London&state_or_province=London&postal_code=E1%206FQ&country=GB&spread_table=no_markup&identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -283,7 +283,7 @@
"body": "?account_name=Company%20PLC&legal_entity_type=company&your_reference=0012345564ABC&status=enabled&street=12%20Steward%20St&city=London&state_or_province=&postal_code=E1%206FQ&country=GB&spread_table=flat_0.5_percent&identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -325,7 +325,7 @@
"path": "/v2/accounts/9c9c2492-b0f3-4cfe-9243-b062c9985a9c",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -372,7 +372,7 @@
"path": "/v2/accounts/current",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -415,7 +415,7 @@
"query": "?account_name=Toptal&order=created_at&order_asc_desc=desc&per_page=5",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -476,7 +476,7 @@
"path": "/v2/accounts/current",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -518,7 +518,7 @@
"path": "/v2/accounts/find",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -579,7 +579,7 @@
"path": "/v2/accounts/current",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down
14 changes: 7 additions & 7 deletions Source/CurrencyCloud.Tests/Mock/Http/Recordings/Balances.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"method": "POST",
"path": "/v2/authenticate/api",
"headers": {
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
},
"body": "[email protected]&api_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
},
Expand All @@ -34,7 +34,7 @@
"path": "/v2/authenticate/close_session",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand All @@ -59,7 +59,7 @@
"path": "/v2/balances/GBP",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -90,7 +90,7 @@
"path": "/v2/balances/GBP",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand All @@ -117,7 +117,7 @@
"query": "?order=created_at&order_asc_desc=desc&per_page=5",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -186,7 +186,7 @@
"path": "/v2/balances/GBP",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand All @@ -212,7 +212,7 @@
"path": "/v2/balances/find",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down
32 changes: 16 additions & 16 deletions Source/CurrencyCloud.Tests/Mock/Http/Recordings/Beneficiaries.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"method": "POST",
"path": "/v2/authenticate/api",
"headers": {
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
},
"body": "[email protected]&api_key=deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"
},
Expand All @@ -34,7 +34,7 @@
"path": "/v2/authenticate/close_session",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand All @@ -60,7 +60,7 @@
"body": "?bank_country=GB&currency=GBP&beneficiary_country=GB&account_number=13071472&routing_code_type_1=sort_code&routing_code_value_1=200605",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -111,7 +111,7 @@
"body": "?bank_account_holder_name=John%20Doe&bank_country=DE&currency=EUR&name=Employee%20Funds&beneficiary_address=23%20Acacia%20Road&beneficiary_country=GB&bic_swift=COBADEFF&iban=DE89370400440532013000&default_beneficiary=true&bank_address=KAISERSTRASSE%2016&bank_name=COMMERZBANK%20AG&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Some%20Company%20LLC&beneficiary_first_name=John&beneficiary_last_name=Doe&beneficiary_city=London&beneficiary_postcode=W11%202BQ&beneficiary_state_or_province=TX&beneficiary_date_of_birth=1990-07-20&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -171,7 +171,7 @@
"body": "?bank_account_holder_name=John%20Doe&bank_country=DE&currency=EUR&name=Employee%20Funds&beneficiary_address=23%20Acacia%20Road&beneficiary_country=GB&bic_swift=COBADEFF&iban=DE89370400440532013000&default_beneficiary=true&bank_address=KAISERSTRASSE%2016&bank_name=COMMERZBANK%20AG&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Some%20Company%20LLC&beneficiary_first_name=John&beneficiary_last_name=Doe&beneficiary_city=London&beneficiary_postcode=W11%202BQ&beneficiary_state_or_province=TX&beneficiary_date_of_birth=1990-07-20&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -225,7 +225,7 @@
"path": "/v2/beneficiaries/c3dafe79-9394-4f43-a1a3-b7a518ab1cba",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -285,7 +285,7 @@
"body": "?bank_account_holder_name=John%20Doe&bank_country=DE&currency=EUR&name=Employee%20Funds&beneficiary_address=23%20Acacia%20Road&beneficiary_country=GB&bic_swift=COBADEFF&iban=DE89370400440532013000&default_beneficiary=true&bank_address=KAISERSTRASSE%2016&bank_name=COMMERZBANK%20AG&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Some%20Company%20LLC&beneficiary_first_name=John&beneficiary_last_name=Doe&beneficiary_city=London&beneficiary_postcode=W11%202BQ&beneficiary_state_or_province=TX&beneficiary_date_of_birth=1990-07-20&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -340,7 +340,7 @@
"body": "?bank_account_holder_name=Martin%20McFly&bank_country=US&currency=USD&name=Employee%20Funds&beneficiary_address=9303%20Roslyndale%20Ave.&beneficiary_country=US&account_number=13071472&routing_code_type_1=sort_code&routing_code_value_1=200606&routing_code_type_2=aba&routing_code_value_2=780&bic_swift=DABADKKK&iban=US89370400440532013000&default_beneficiary=true&bank_address=1%20Courthouse%20Square&bank_name=Emmet%20Bank&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Back%20to%20the%20Future&beneficiary_first_name=Martin&beneficiary_last_name=McFly&beneficiary_city=Hill%20Valley&beneficiary_postcode=91331&beneficiary_state_or_province=CA&beneficiary_date_of_birth=1968-06-09&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -397,7 +397,7 @@
"path": "/v2/beneficiaries/c3dafe79-9394-4f43-a1a3-b7a518ab1cba",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -460,7 +460,7 @@
"body": "?bank_account_holder_name=John%20Doe&bank_country=DE&currency=EUR&name=Employee%20Funds&beneficiary_address=23%20Acacia%20Road&beneficiary_country=GB&bic_swift=COBADEFF&iban=DE89370400440532013000&default_beneficiary=true&bank_address=KAISERSTRASSE%2016&bank_name=COMMERZBANK%20AG&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Some%20Company%20LLC&beneficiary_first_name=John&beneficiary_last_name=Doe&beneficiary_city=London&beneficiary_postcode=W11%202BQ&beneficiary_state_or_province=TX&beneficiary_date_of_birth=1990-07-20&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -515,7 +515,7 @@
"query": "?name=Employee%20Funds&order=created_at&order_asc_desc=desc&per_page=5",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -589,7 +589,7 @@
"body": "?bank_account_holder_name=John%20Doe&bank_country=DE&currency=EUR&name=Employee%20Funds&beneficiary_address=23%20Acacia%20Road&beneficiary_country=GB&bic_swift=COBADEFF&iban=DE89370400440532013000&default_beneficiary=true&bank_address=KAISERSTRASSE%2016&bank_name=COMMERZBANK%20AG&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Some%20Company%20LLC&beneficiary_first_name=John&beneficiary_last_name=Doe&beneficiary_city=London&beneficiary_postcode=W11%202BQ&beneficiary_state_or_province=TX&beneficiary_date_of_birth=1990-07-20&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -643,7 +643,7 @@
"path": "/v2/beneficiaries/find",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -717,7 +717,7 @@
"body": "?bank_account_holder_name=John%20Doe&bank_country=DE&currency=EUR&name=Employee%20Funds&beneficiary_address=23%20Acacia%20Road&beneficiary_country=GB&bic_swift=COBADEFF&iban=DE89370400440532013000&default_beneficiary=true&bank_address=KAISERSTRASSE%2016&bank_name=COMMERZBANK%20AG&bank_account_type=checking&beneficiary_entity_type=company&beneficiary_company_name=Some%20Company%20LLC&beneficiary_first_name=John&beneficiary_last_name=Doe&beneficiary_city=London&beneficiary_postcode=W11%202BQ&beneficiary_state_or_province=TX&beneficiary_date_of_birth=1990-07-20&beneficiary_identification_type=none",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -771,7 +771,7 @@
"path": "/v2/beneficiaries/c3dafe79-9394-4f43-a1a3-b7a518ab1cba/delete",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down Expand Up @@ -825,7 +825,7 @@
"path": "/v2/beneficiaries/c3dafe79-9394-4f43-a1a3-b7a518ab1cba",
"headers": {
"X-Auth-Token": "034d23d24490718e8766853e14d480b7",
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.1.5"
"User-Agent": "CurrencyCloudSDK/2.0 .NET/2.2.1"
}
},
"response": {
Expand Down
Loading

0 comments on commit beb4e40

Please sign in to comment.