From 1273f1ea928c8b1f667e4722519ef8fa9a6f12dc Mon Sep 17 00:00:00 2001 From: lontivero Date: Thu, 3 Sep 2015 19:34:26 -0300 Subject: [PATCH] Support for account provider id when register account --- MetacoClient.Tests/AccountTest.cs | 7 ++++++- MetacoClient/Contracts/RegisterAccountRequest.cs | 6 ++++++ MetacoClient/MetacoClient.cs | 2 ++ MetacoClient/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/MetacoClient.Tests/AccountTest.cs b/MetacoClient.Tests/AccountTest.cs index 431b586..45a0170 100644 --- a/MetacoClient.Tests/AccountTest.cs +++ b/MetacoClient.Tests/AccountTest.cs @@ -14,7 +14,12 @@ public void ClientCanRegisterAndValidateAccount() var client = CreateClient(); /** Account registration **/ - var result = client.RegisterAccount(new RegisterAccountRequest {Phone = "+15005550006"}); + var result = client.RegisterAccount( + new RegisterAccountRequest { + Phone = "+15005550006", + ProviderId = "TestsProvider" + }); + Assert.NotNull(result.ApiId); var validationCode = client.LatestDebugData; diff --git a/MetacoClient/Contracts/RegisterAccountRequest.cs b/MetacoClient/Contracts/RegisterAccountRequest.cs index 3636055..1ca4527 100644 --- a/MetacoClient/Contracts/RegisterAccountRequest.cs +++ b/MetacoClient/Contracts/RegisterAccountRequest.cs @@ -11,5 +11,11 @@ public string Phone set; } + [JsonProperty("provider_id")] + public string ProviderId + { + get; + set; + } } } diff --git a/MetacoClient/MetacoClient.cs b/MetacoClient/MetacoClient.cs index 690d661..7e4516a 100644 --- a/MetacoClient/MetacoClient.cs +++ b/MetacoClient/MetacoClient.cs @@ -46,6 +46,8 @@ public RestClient(Uri apiUrl, string apiId, string apiKey, bool testingMode) /// Register an account on Metaco /// Sends an SMS to the provided phone number /// If you are in debug mode, this request will return a HTTP header X-Metaco-DebugData with the validation code, it won't be send by SMS + /// + /// If you are a wallet registering accounts for your clients, don't forget to set the provider_id with your Name/ID. /// /// The request containing the phone number. /// The initial account settings diff --git a/MetacoClient/Properties/AssemblyInfo.cs b/MetacoClient/Properties/AssemblyInfo.cs index 50a3d34..7b5ee97 100644 --- a/MetacoClient/Properties/AssemblyInfo.cs +++ b/MetacoClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.8.3.0")] -[assembly: AssemblyFileVersion("0.8.3.0")] +[assembly: AssemblyVersion("0.8.4.0")] +[assembly: AssemblyFileVersion("0.8.4.0")]