lbearl / lob-dotnet

Lob .Net API wrapper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lob-dotnet

Lob .Net API wrapper

Install

To get started install the package via nuget package manager.

PM > Install-Package Lob

Quick Start

Refernce the Library

using LobClient;

Create an instance of the client with an API key

string apiKey = "Your custom API key"
var lob = new Lob( apiKey );

Create resources

lob.Letters.Create(new
{
  to = new
  {
      name = "John Smith",
      address_line1 = "ADDRESS LINE 1",
      address_line2 = "ADDRESS LINE 2",
      address_country = "COUNTRY CODE",
      address_city = "CITY",
      address_state = "STATE",
      address_zip = ZIP CODE
  },
  // Or use the address ID
  from = 5,
  color = true,
  file = "Contents",
  insert_blank_page = false
});

View a resources

lobClient.Postcards.Get("id of postcard");

View all resources

lobClient.Postcards.All();

Delete a resource

lobClient.Postcards.Delete("id of postcard");

Resources:

  • Addresses
  • Areas
  • BankAccounts
  • Checks
  • Countries
  • Letters
  • Postcards
  • Routes
  • States

See Lob api docs more info on the API Lob.com/docs

About

Lob .Net API wrapper

License:Apache License 2.0


Languages

Language:C# 100.0%