Skip to content

daangruijters/Pwinty.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pwinty.Net - A C# wrapper for the Pwinty API

Pwinty is a powerful image-printing API providing direct access to a global network of on-demand manufacturing partners.


Nuget

GitHub issues

GitHub license


Example use

// Create a new order object with required information.
Order orderToCreate = new Order(
   recipientName: "F. Prince",
   countryCode: new Country("US"),
   preferredShippingMethod: ShippingMethod.Express
);

// Add destination address.
orderToCreate.Address1 = "805 St Cloud Road";
orderToCreate.AddressTownOrCity = "Los Angeles";

PwintyClient client = new PwintyClient(merchantId, apiKey);

// Create the order
Order createdOrder = await client.Orders.CreateAsync(orderToCreate);

// Create a product
Image imageToAdd = new Image(
   sku: "123-product-sku",
   url: "https://i.imgur.com/image.jpg",
   copies: 1,
   sizing: ImageSizing.Crop
);

// Add the product to the order
Image addedImage = await client.Orders.AddImageAsync(createdOrder.Id, imageToAdd);

// Submit the order
await client.Orders.SubmitAsync(createdOrder.Id);

About

C# wrapper for the Pwinty API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages