-
Notifications
You must be signed in to change notification settings - Fork 1
Usage
Tiago Guedes edited this page Mar 21, 2018
·
4 revisions
Iugu.Customer.list()
#=> {:ok, [%Iugu.Customer{cc_emails: nil, city: "Campo Mourão", complement: "Cobertura", ...}], 128}
Iugu.Customer.show("6DB324B6859D4D46A3B8689AC745A943")
#=> {:ok, %Iugu.Customer{cc_emails: nil, city: "Campo Mourão", complement: "Cobertura", ...}}
%Iugu.Customer{name: "Foobar", email: "foo@bar.com"} |> Iugu.Customer.create()
#=> {:ok, %Iugu.Customer{cc_emails: nil, city: "Campo Mourão", complement: "Cobertura", ...}}
%Iugu.Subscription{customer_id: "097E474852F64ED3BEDB1D35BF84E2BB", plan_identifier: "Is12"}
|> Iugu.Subscription.create()
%{
due_date: "2018-10-04",
total_cents: 1000,
items: [%{description: "Item Um", price_cents: 1000, quantity: 1, "price": "R$ 10,00" }],
email: "foobar4@beautydate.com.
payer: %{name: "Foobar", cpf_cnpj: "99384620220", address: %{number: "370", zip_code: "80320070"}}
}
|> Iugu.Invoice.create()