"address": {
            "line1": "1234 Broad St.",
            "city": "Portland",
            "state": "OR",
            "postal_code": "97216",
            "country_code": "US"
        }
    }
})

if invoice.create():
    print(("Invoice[%s] created successfully" % (invoice.id)))
else:
    print((invoice.error))

if invoice.send():  # return True or False
    print(("Invoice[%s] send successfully" % (invoice.id)))
else:
    print((invoice.error))

payment_attr = {
    "method": "CASH",
    "date": "2014-07-10 03:30:00 PST",
    "note": "Cash received."
}

if invoice.record_payment(payment_attr):  # return True or False
    print(("Payment record on Invoice[%s] successfully" % (invoice.id)))
else:
    print((invoice.error))
    "address": {
      "line1": "1234 Broad St.",
      "city": "Portland",
      "state": "OR",
      "postal_code": "97216",
      "country_code": "US"
    }
  }
})

if invoice.create():
  print("Invoice[%s] created successfully"%(invoice.id))
else:
  print(invoice.error)
    
if invoice.send():  # return True or False
  print("Invoice[%s] send successfully"%(invoice.id))
else:
  print(invoice.error)

payment_attr = {
    "method" : "CASH",
    "date" : "2014-07-10 03:30:00 PST",
    "note" : "Cash received."
}

if invoice.record_payment(payment_attr):  # return True or False
  print("Payment record on Invoice[%s] successfully"%(invoice.id))
else:
  print(invoice.error)