lib/braintree/transaction.rb in braintree-1.1.0 vs lib/braintree/transaction.rb in braintree-1.1.1
- old
+ new
@@ -390,12 +390,10 @@
]
end
def _init(attributes) # :nodoc:
set_instance_variables_from_hash(attributes)
- if self.amount
- instance_variable_set :@amount, BigDecimal.new(self.amount)
- end
+ @amount = Util.to_big_decimal(amount)
@credit_card_details = CreditCardDetails.new(@credit_card)
@customer_details = CustomerDetails.new(@customer)
@billing_details = AddressDetails.new(@billing)
@shipping_details = AddressDetails.new(@shipping)
@status_history = attributes[:status_history] ? attributes[:status_history].map { |s| StatusDetails.new(s) } : []