class Braintree::UsBankAccount
Attributes
account_holder_name[R]
account_type[R]
ach_mandate[R]
bank_name[R]
default[R]
image_url[R]
last_4[R]
routing_number[R]
token[R]
verifications[R]
verified[R]
Public Class Methods
_new(*args)
click to toggle source
# File lib/braintree/us_bank_account.rb, line 37 def self._new(*args) self.new(*args) end
find(*args)
click to toggle source
# File lib/braintree/us_bank_account.rb, line 41 def self.find(*args) Configuration.gateway.us_bank_account.find(*args) end
sale(token, transaction_attributes)
click to toggle source
# File lib/braintree/us_bank_account.rb, line 45 def self.sale(token, transaction_attributes) Configuration.gateway.transaction.sale(transaction_attributes.merge( :payment_method_token => token, :options => {:submit_for_settlement => true}, ), ) end
sale!(token, transaction_attributes)
click to toggle source
# File lib/braintree/us_bank_account.rb, line 53 def self.sale!(token, transaction_attributes) return_object_or_raise(:transaction) { sale(token, transaction_attributes) } end
Protected Class Methods
new(gateway, attributes)
click to toggle source
# File lib/braintree/us_bank_account.rb, line 17 def initialize(gateway, attributes) @gateway = gateway set_instance_variables_from_hash(attributes) @ach_mandate = AchMandate.new(attributes[:ach_mandate]) if attributes[:ach_mandate] if attributes[:verifications] @verifications = attributes[:verifications].map do |v| UsBankAccountVerification._new(v) end end end
Public Instance Methods
default?()
click to toggle source
# File lib/braintree/us_bank_account.rb, line 29 def default? @default end