lib/braintree/transaction.rb in braintree-2.9.1 vs lib/braintree/transaction.rb in braintree-2.10.0
- old
+ new
@@ -40,11 +40,11 @@
Credit = "credit" # :nodoc:
Sale = "sale" # :nodoc:
end
attr_reader :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code
- attr_reader :amount, :created_at, :credit_card_details, :customer_details, :id
+ attr_reader :amount, :created_at, :credit_card_details, :customer_details, :subscription_details, :id
attr_reader :currency_iso_code
attr_reader :custom_fields
attr_reader :cvv_response_code
attr_reader :descriptor
attr_reader :gateway_rejection_reason
@@ -153,10 +153,11 @@
def initialize(gateway, attributes) # :nodoc:
@gateway = gateway
set_instance_variables_from_hash(attributes)
@amount = Util.to_big_decimal(amount)
@credit_card_details = CreditCardDetails.new(@credit_card)
+ @subscription_details = SubscriptionDetails.new(@subscription)
@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) } : []
@tax_amount = Util.to_big_decimal(tax_amount)
@@ -290,9 +291,9 @@
self.new *args
end
end
def self._attributes # :nodoc:
- [:amount, :created_at, :credit_card_details, :customer_details, :id, :status, :type, :updated_at]
+ [:amount, :created_at, :credit_card_details, :customer_details, :id, :status, :subscription_details, :type, :updated_at]
end
end
end