Class: Braintree::MerchantAccount
- Inherits:
-
Object
- Object
- Braintree::MerchantAccount
- 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
-
#currency_iso_code ⇒ Object
readonly
Returns the value of attribute currency_iso_code.
-
#default ⇒ Object
(also: #default?)
readonly
Returns the value of attribute default.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(gateway, attributes) ⇒ MerchantAccount
constructor
A new instance of MerchantAccount.
- #inspect ⇒ Object
Methods included from BaseModule
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_code ⇒ Object (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 |
#default ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
23 24 25 |
# File 'lib/braintree/merchant_account.rb', line 23 def id @id end |
#status ⇒ Object (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.merchant_account.find(*args) end |
Instance Method Details
#inspect ⇒ Object
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 |