Alexa.NET.InSkillPricing 2.2.0

A simple package built to work with Alexa In Skill Products

There is a newer version of this package available.
See the version list below for details.
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

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Alexa.NET.InSkillPricing:

Package Downloads
Ask.Sdk.Core
Core SDK package that contains the basic components and default implementations of ASK SDK for .Net Core.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
3.0.0 1,140 1/16/2020
2.2.0 272 8/9/2019
2.1.0 524 9/25/2018
2.0.0 402 6/11/2018
1.0.0 407 5/3/2018