GithubHelp home page GithubHelp logo

sendowl-dotnet's Introduction

Build Status

SendOwl-dotnet

SendOwl API client

Usage

Add an API key at sendowl.com under Advanced > API.

Initialize the client with your key and secret

SendOwlAPIClient sendOwl = new SendOwlAPIClient("mykey", "mysecret");

Product

Get product by id

var product = await sendOwl.Product.GetAsync(123456);

Search for product by name

var products = await sendOwl.Product.SearchAsync("product name");

List all products

var products = await sendOwl.Product.GetAllAsync();

Create product

var product = await sendOwl.Product.CreateAsync(
  new SendOwlProduct
  {
    Name = "my product",
    Price = "19.99",
    Product_type = ProductType.Software
  });

Update product

var product = await sendOwl.Product.GetAsync(123456);
product.Price = "89.95";
product.Name = "new name";
await sendOwl.Product.UpdateAsync(product);

Delete product

await sendOwl.Product.DeleteAsync(256);

Bundle

Get bundle by id

 var bundle = await sendOwl.Bundle.GetAsync(256);

List all bundles

 var bundles = await sendOwl.Bundle.GetAllAsync();

Create bundle

var bundle = await sendOwl.Bundle.CreateAsync(
  new SendOwlBundle
  {
    Name = "my new bundle",
    Price = "99.5",
    Components = new Components
    {
      Product_ids = new List<long>{ 256, 1024, 1337 }
    }
  });

Update Bundle

var bundle = await sendOwl.Bundle.GetAsync(256)
bundle.Price = "22.9";
bundle.Component.Product_Ids.Remove(1024);
await sendOwl.Bundle.UpdateAsync(bundle);

Delete bundle

 await sendOwl.Bundle.DeleteAsync(256);

sendowl-dotnet's People

Contributors

legogris avatar naile avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.