lib/braintree/transaction.rb in braintree-2.6.3 vs lib/braintree/transaction.rb in braintree-2.7.0
- old
+ new
@@ -43,26 +43,30 @@
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 :currency_iso_code
attr_reader :custom_fields
attr_reader :cvv_response_code
+ attr_reader :descriptor
attr_reader :gateway_rejection_reason
attr_reader :merchant_account_id
attr_reader :order_id
attr_reader :billing_details, :shipping_details
# The authorization code from the processor.
attr_reader :processor_authorization_code
# The response code from the processor.
attr_reader :processor_response_code
# The response text from the processor.
attr_reader :processor_response_text
+ attr_reader :purchase_order_number
attr_reader :refund_ids, :refunded_transaction_id
attr_reader :settlement_batch_id
# See Transaction::Status
attr_reader :status
attr_reader :status_history
attr_reader :subscription_id
+ attr_reader :tax_amount
+ attr_reader :tax_exempt
# Will either be "sale" or "credit"
attr_reader :type
attr_reader :updated_at
attr_reader :add_ons, :discounts
@@ -152,9 +156,11 @@
@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) } : []
+ @tax_amount = Util.to_big_decimal(tax_amount)
+ @descriptor = Descriptor.new(@descriptor)
add_ons.map! { |attrs| AddOn._new(attrs) } if add_ons
discounts.map! { |attrs| Discount._new(attrs) } if discounts
end
# True if <tt>other</tt> is a Braintree::Transaction with the same id.