From 87e1d507ca445632ca68fded2c1d6287d7929368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Mello?= Date: Wed, 23 Jan 2019 17:31:39 -0200 Subject: [PATCH] Add automatic registration to entities --- lib/cobrato/entities/charge.rb | 1 + spec/cobrato/entities/charge_spec.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cobrato/entities/charge.rb b/lib/cobrato/entities/charge.rb index 84dfca3..cba33f6 100644 --- a/lib/cobrato/entities/charge.rb +++ b/lib/cobrato/entities/charge.rb @@ -58,6 +58,7 @@ class Charge < Base attribute :instructions, String attribute :demonstrative, String attribute :registrable, Boolean + attribute :automatic_registration, Boolean attribute :registration_status, String attribute :mulct_type, String attribute :payment_tax, Decimal diff --git a/spec/cobrato/entities/charge_spec.rb b/spec/cobrato/entities/charge_spec.rb index 388f438..fe6aacc 100644 --- a/spec/cobrato/entities/charge_spec.rb +++ b/spec/cobrato/entities/charge_spec.rb @@ -23,6 +23,7 @@ processing_date: "2015-01-30", for_homologation: true, registrable: true, + automatic_registration: false, interest_amount_per_month: 1.02, mulct_type: 'percentage', mulct_value: 10.12, @@ -63,7 +64,7 @@ :email_subject, :email_text, :available_billet, :received_at, # deprecated # billet specifics :due_date, :processing_date, :document_kind, :document_date, :document_number, :custom_our_number, :our_number, - :our_number_digit, :instructions, :demonstrative, :registrable, :payment_tax, + :our_number_digit, :instructions, :demonstrative, :registrable, :automatic_registration, :payment_tax, :registration_status, :interest_amount_per_month, :mulct_type, :mulct_value, :charge_template_id, :paid_discount, :paid_additions, :paid_rebate, :paid_difference, # payment gateway specifics