Skip to content

A simple package built to work with Alexa In Skill Products

License

Notifications You must be signed in to change notification settings

stoiveyp/Alexa.NET.InSkillPricing

Repository files navigation

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
...
ConnectionRequestHandler.AddToRequestConverter();
...
switch(request)
{
case ConnectionResponseRequest paymentDetail:
//TODO: Handle payment here
}

About

A simple package built to work with Alexa In Skill Products

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages