Class: Braintree::MerchantAccount

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/braintree/merchant_account.rb,
lib/braintree/merchant_account/address_details.rb

Defined Under Namespace

Modules: FundingDestination, FundingDestinations, Status Classes: AddressDetails

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included

Methods included from BaseModule::Methods

#copy_instance_variables_from_object, #return_object_or_raise, #set_instance_variables_from_hash, #singleton_class

Constructor Details

#initialize(gateway, attributes) ⇒ MerchantAccount

Returns a new instance of MerchantAccount.



32
33
34
35
# File 'lib/braintree/merchant_account.rb', line 32

def initialize(gateway, attributes)
  @gateway = gateway
  set_instance_variables_from_hash(attributes)
end

Instance Attribute Details

#currency_iso_codeObject (readonly)

Returns the value of attribute currency_iso_code.



21
22
23
# File 'lib/braintree/merchant_account.rb', line 21

def currency_iso_code
  @currency_iso_code
end

#defaultObject (readonly) Also known as: default?

Returns the value of attribute default.



22
23
24
# File 'lib/braintree/merchant_account.rb', line 22

def default
  @default
end

#idObject (readonly)

Returns the value of attribute id.



23
24
25
# File 'lib/braintree/merchant_account.rb', line 23

def id
  @id
end

#statusObject (readonly)

Returns the value of attribute status.



24
25
26
# File 'lib/braintree/merchant_account.rb', line 24

def status
  @status
end

Class Method Details

._new(*args) ⇒ Object



39
40
41
# File 'lib/braintree/merchant_account.rb', line 39

def _new(*args)
  self.new(*args)
end

.find(*args) ⇒ Object



28
29
30
# File 'lib/braintree/merchant_account.rb', line 28

def self.find(*args)
  Configuration.gateway..find(*args)
end

Instance Method Details

#inspectObject



44
45
46
47
48
49
50
# File 'lib/braintree/merchant_account.rb', line 44

def inspect
  order = [:id, :status]
  nice_attributes = order.map do |attr|
    "#{attr}: #{send(attr).inspect}"
  end
  "#<#{self.class}: #{nice_attributes.join(', ')}>"
end