class Braintree::MerchantAccount

Attributes

business_details[R]
currency_iso_code[R]
default[R]
default?[R]
funding_details[R]
id[R]
individual_details[R]
master_merchant_account[R]
status[R]

Public Class Methods

create(*args) click to toggle source
# File lib/braintree/merchant_account.rb, line 32
def self.create(*args)
  Configuration.gateway.merchant_account.create(*args)
end
create!(*args) click to toggle source
# File lib/braintree/merchant_account.rb, line 36
def self.create!(*args)
  Configuration.gateway.merchant_account.create!(*args)
end
find(*args) click to toggle source
# File lib/braintree/merchant_account.rb, line 40
def self.find(*args)
  Configuration.gateway.merchant_account.find(*args)
end
update(*args) click to toggle source
# File lib/braintree/merchant_account.rb, line 44
def self.update(*args)
  Configuration.gateway.merchant_account.update(*args)
end
update!(*args) click to toggle source
# File lib/braintree/merchant_account.rb, line 48
def self.update!(*args)
  Configuration.gateway.merchant_account.update!(*args)
end

Protected Class Methods

new(gateway, attributes) click to toggle source
# File lib/braintree/merchant_account.rb, line 52
def initialize(gateway, attributes) # :nodoc
  @gateway = gateway
  set_instance_variables_from_hash(attributes)
  @individual_details = IndividualDetails.new(@individual)
  @business_details = BusinessDetails.new(@business)
  @funding_details = FundingDetails.new(@funding)
  @master_merchant_account = MerchantAccount._new(@gateway, attributes.delete(:master_merchant_account)) if attributes[:master_merchant_account]
end

Public Instance Methods

inspect() click to toggle source
# File lib/braintree/merchant_account.rb, line 68
def inspect
  order = [:id, :status, :master_merchant_account]
  nice_attributes = order.map do |attr|
    "#{attr}: #{send(attr).inspect}"
  end
  "#<#{self.class}: #{nice_attributes.join(', ')}>"
end