From 8fdc2e0283acfb32e263142b412ab85367112c27 Mon Sep 17 00:00:00 2001 From: Luiz Martino Date: Wed, 6 Dec 2017 01:35:07 -0200 Subject: [PATCH 1/2] =?UTF-8?q?Inclus=C3=A3o=20de=20propriedades=20nas=20c?= =?UTF-8?q?lasses=20CustomerModel=20(zip=5Fcode,=20number,=20complement=20?= =?UTF-8?q?e=20cpf=5Fcnpj),=20CustomerRequestMessage=20(ZipCode,=20Number?= =?UTF-8?q?=20e=20Complement)=20e=20em=20SubscriptionSubitem=20(=5Fdestroy?= =?UTF-8?q?).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- iugu.net/Entity/CustomerModel.cs | 6 +++++- iugu.net/Entity/SubscriptionModel.cs | 1 + iugu.net/Request/CustomerRequestMessage.cs | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/iugu.net/Entity/CustomerModel.cs b/iugu.net/Entity/CustomerModel.cs index 547a80a..f869737 100644 --- a/iugu.net/Entity/CustomerModel.cs +++ b/iugu.net/Entity/CustomerModel.cs @@ -18,6 +18,10 @@ public class CustomerModel public string notes { get; set; } public string created_at { get; set; } public string updated_at { get; set; } - public List custom_variables { get; set; } + public List custom_variables { get; set; } + public string zip_code { get; set; } + public int number { get; set; } + public string complement { get; set; } + public string cpf_cnpj { get; set; } } } diff --git a/iugu.net/Entity/SubscriptionModel.cs b/iugu.net/Entity/SubscriptionModel.cs index 832fd19..6776603 100644 --- a/iugu.net/Entity/SubscriptionModel.cs +++ b/iugu.net/Entity/SubscriptionModel.cs @@ -53,6 +53,7 @@ public class SubscriptionSubitem public string price { get; set; } public string total { get; set; } public bool? recurrent { get; set; } + public bool? _destroy { get; set; } } public class SubscriptionLog diff --git a/iugu.net/Request/CustomerRequestMessage.cs b/iugu.net/Request/CustomerRequestMessage.cs index fe4662b..64ee5e1 100644 --- a/iugu.net/Request/CustomerRequestMessage.cs +++ b/iugu.net/Request/CustomerRequestMessage.cs @@ -42,5 +42,23 @@ public class CustomerRequestMessage [JsonProperty("custom_variables")] public List CustomVariables { get; set; } + /// + /// CEP do cliente + /// + [JsonProperty("zip_code")] + public string ZipCode { get; set; } + + /// + /// Número do endereço do cliente + /// + [JsonProperty("number")] + public int Number { get; set; } + + /// + /// Complemento do endereço + /// + [JsonProperty("complement")] + public string Complement { get; set; } + } } From 6a2256d5bc74a790133a22121d52a7ef57d835dd Mon Sep 17 00:00:00 2001 From: Rodrigo Couto Date: Thu, 7 Dec 2017 22:21:12 -0200 Subject: [PATCH 2/2] :art: Remove _ da propriedade destroy em invoice model --- iugu.net/Entity/InvoiceModel.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iugu.net/Entity/InvoiceModel.cs b/iugu.net/Entity/InvoiceModel.cs index ca43a66..b09605e 100644 --- a/iugu.net/Entity/InvoiceModel.cs +++ b/iugu.net/Entity/InvoiceModel.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Newtonsoft.Json; namespace iugu.net.Entity { @@ -61,7 +62,8 @@ public class Item public string created_at { get; set; } public string updated_at { get; set; } public string price { get; set; } - public bool? _destroy { get; set; } + [JsonProperty("_destroy")] + public bool destroy { get; set; } } // TODO: Precisa de refatoração, nomes fora do padrão .Net, sem documentação também