Skip to content

Commit

Permalink
Amazon Pay API SDK (.NET) 2.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Shangamesh T committed Dec 25, 2020
1 parent 6b90805 commit 892c3ac
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Amazon.Pay.API.SDK/Amazon.Pay.API.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<TargetFrameworks>net45;netstandard2.0</TargetFrameworks>
<Version>2.4.1</Version>
<AssemblyVersion>2.4.1.0</AssemblyVersion>
<Version>2.4.2</Version>
<AssemblyVersion>2.4.2.0</AssemblyVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Amazon Pay</Authors>
<Company>Amazon</Company>
Expand Down
2 changes: 1 addition & 1 deletion Amazon.Pay.API.SDK/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Amazon.Pay.API
{
public class Constants
{
public const string SdkVersion = "2.4.1.0";
public const string SdkVersion = "2.4.2.0";
public const string SdkName = "amazon-pay-api-sdk-dotnet";
public const int ApiVersion = 2;

Expand Down
7 changes: 7 additions & 0 deletions Amazon.Pay.API.SDK/WebStore/Buyer/BuyerResponse.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Amazon.Pay.API.Types;
using Amazon.Pay.API.WebStore.Types;
using Newtonsoft.Json;

namespace Amazon.Pay.API.WebStore.Buyer
Expand Down Expand Up @@ -34,5 +35,11 @@ public class BuyerResponse : AmazonPayResponse
/// </summary>
[JsonProperty(PropertyName = "postalCode")]
public string PostalCode { get; internal set; }

/// <summary>
/// Shipping address selected by the buyer.
/// </summary>
[JsonProperty(PropertyName = "shippingAddress")]
public Address ShippingAddress { get; internal set; }
}
}
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### Version 2.4.2 - December 2020
* Added the "ShippingAdress" property to BuyerResponse which can be accessed by passing "shippingAddress" as signInScopes parameter while rendering Amazon Sign-in button

### Version 2.4.1
* Add Interfaces for WebStoreClient and InstoreClient to allow developers to mock classes in tests.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public class Sample : PageModel
public void OnGet()
{
// prepare the request
SignInScope[] scopes = { SignInScope.Name, SignInScope.Email, SignInScope.PostalCode };
SignInScope[] scopes = { SignInScope.Name, SignInScope.Email, SignInScope.PostalCode, SignInScope.ShippingAddress, SignInScope.PhoneNumber };
var request = new SignInRequest
(
signInReturnUrl: "https://example.com/account.html",
Expand Down Expand Up @@ -457,7 +457,7 @@ public class Sample : PageModel
string buyerToken = HttpContext.Request.Query["buyerToken"];

// get the buyer details
// NOTE: the BuyerResponse that is returned here contains properties for buyerId, name, email, etc.
// NOTE: the BuyerResponse that is returned here contains properties for buyerId, name, email, shippingAddress, phoneNumber etc.
Buyer = client.GetBuyer(buyerToken);
}
}
Expand Down

0 comments on commit 892c3ac

Please sign in to comment.