Alexa.NET.InSkillPricing 2.2.0

A simple package built to work with Alexa In Skill Products

Install-Package Alexa.NET.InSkillPricing -Version 2.2.0
dotnet add package Alexa.NET.InSkillPricing --version 2.2.0
<PackageReference Include="Alexa.NET.InSkillPricing" Version="2.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Alexa.NET.InSkillPricing --version 2.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Alexa.NET.InSkillPricing

A simple package built to work with Alexa In Skill Products

Add Directive Support

	PaymentDirective.AddSupport();

Getting all products for the current user and skill

using Alexa.NET.InSkillPricing
...
var client = new InSkillProductsClient(skillRequest);
var response = client.GetProducts();
var count = response.Products.Length;

Getting a specific product for the current user and skill

using Alexa.NET.InSkillPricing
...
var client = new InSkillProductsClient(skillRequest);
var product = client.GetProduct("productId");

Adding a directive to buy a product

using Alexa.NET.InSkillPricing.Directives
...
var buyDirective = new BuyDirective("amzn1.adg.productId", "correlationToken");

var response = ResponseBuilder.Empty();
response.Response.ShouldEndSession = true;

response.Response.Directives.Add(buyDirective);

Add Request Handler support

using Alexa.NET.InSkillPricing.Responses
...
ConnectionResponseHandler.AddToRequestConverter();
...
switch(request)
{
case ConnectionResponseRequest paymentDetail:
//TODO: Handle payment here
}

Alexa.NET.InSkillPricing

A simple package built to work with Alexa In Skill Products

Add Directive Support

	PaymentDirective.AddSupport();

Getting all products for the current user and skill

using Alexa.NET.InSkillPricing
...
var client = new InSkillProductsClient(skillRequest);
var response = client.GetProducts();
var count = response.Products.Length;

Getting a specific product for the current user and skill

using Alexa.NET.InSkillPricing
...
var client = new InSkillProductsClient(skillRequest);
var product = client.GetProduct("productId");

Adding a directive to buy a product

using Alexa.NET.InSkillPricing.Directives
...
var buyDirective = new BuyDirective("amzn1.adg.productId", "correlationToken");

var response = ResponseBuilder.Empty();
response.Response.ShouldEndSession = true;

response.Response.Directives.Add(buyDirective);

Add Request Handler support

using Alexa.NET.InSkillPricing.Responses
...
ConnectionResponseHandler.AddToRequestConverter();
...
switch(request)
{
case ConnectionResponseRequest paymentDetail:
//TODO: Handle payment here
}

Release Notes

Update to NetStandard2.0 and latest Alexa.NET reference

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.2.0 101 8/9/2019
2.1.0 387 9/25/2018
2.0.0 237 6/11/2018
1.0.0 240 5/3/2018