lib/braintree/credit_card_verification.rb in braintree-2.18.0 vs lib/braintree/credit_card_verification.rb in braintree-2.19.0

- old
+ new

@@ -10,22 +10,22 @@ VERIFIED = 'verified' end attr_reader :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code, :cvv_response_code, :merchant_account_id, :processor_response_code, :processor_response_text, :status, - :gateway_rejection_reason + :id, :gateway_rejection_reason, :credit_card, :billing, :created_at def initialize(attributes) # :nodoc: set_instance_variables_from_hash(attributes) end def inspect # :nodoc: attr_order = [ :status, :processor_response_code, :processor_response_text, :cvv_response_code, :avs_error_response_code, :avs_postal_code_response_code, :avs_street_address_response_code, - :merchant_account_id, :gateway_rejection_reason + :merchant_account_id, :gateway_rejection_reason, :id, :credit_card, :billing, :created_at ] formatted_attrs = attr_order.map do |attr| "#{attr}: #{send(attr).inspect}" end "#<#{self.class} #{formatted_attrs.join(", ")}>" @@ -35,8 +35,21 @@ protected :new end def self._new(*args) # :nodoc: self.new *args + end + + def self.find(id) + Configuration.gateway.verification.find(id) + end + + def self.search(&block) + Configuration.gateway.verification.search(&block) + end + + def ==(other) + return false unless other.is_a?(CreditCardVerification) + id == other.id end end end