Class: Braintree::SepaDirectDebitAccount
- Inherits:
-
Object
- Object
- Braintree::SepaDirectDebitAccount
- Includes:
- BaseModule
- Defined in:
- lib/braintree/sepa_direct_debit_account.rb
Instance Attribute Summary collapse
-
#bank_reference_token ⇒ Object
readonly
Returns the value of attribute bank_reference_token.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#customer_global_id ⇒ Object
readonly
Returns the value of attribute customer_global_id.
-
#customer_id ⇒ Object
readonly
Returns the value of attribute customer_id.
-
#default ⇒ Object
readonly
Returns the value of attribute default.
-
#global_id ⇒ Object
readonly
Returns the value of attribute global_id.
-
#image_url ⇒ Object
readonly
Returns the value of attribute image_url.
-
#last_4 ⇒ Object
readonly
Returns the value of attribute last_4.
-
#mandate_type ⇒ Object
readonly
Returns the value of attribute mandate_type.
-
#merchant_or_partner_customer_id ⇒ Object
readonly
Returns the value of attribute merchant_or_partner_customer_id.
-
#subscriptions ⇒ Object
readonly
Returns the value of attribute subscriptions.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#view_mandate_url ⇒ Object
readonly
Returns the value of attribute view_mandate_url.
Class Method Summary collapse
- ._new(*args) ⇒ Object
- .delete(*args) ⇒ Object
- .find(*args) ⇒ Object
- .sale(token, transaction_attributes) ⇒ Object
- .sale!(token, transaction_attributes) ⇒ Object
Instance Method Summary collapse
- #default? ⇒ Boolean
-
#initialize(gateway, attributes) ⇒ SepaDirectDebitAccount
constructor
A new instance of SepaDirectDebitAccount.
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) ⇒ SepaDirectDebitAccount
Returns a new instance of SepaDirectDebitAccount.
20 21 22 23 24 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 20 def initialize(gateway, attributes) @gateway = gateway @subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) } set_instance_variables_from_hash(attributes) end |
Instance Attribute Details
#bank_reference_token ⇒ Object (readonly)
Returns the value of attribute bank_reference_token.
5 6 7 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 5 def bank_reference_token @bank_reference_token end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
6 7 8 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 6 def created_at @created_at end |
#customer_global_id ⇒ Object (readonly)
Returns the value of attribute customer_global_id.
8 9 10 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 8 def customer_global_id @customer_global_id end |
#customer_id ⇒ Object (readonly)
Returns the value of attribute customer_id.
7 8 9 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 7 def customer_id @customer_id end |
#default ⇒ Object (readonly)
Returns the value of attribute default.
9 10 11 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 9 def default @default end |
#global_id ⇒ Object (readonly)
Returns the value of attribute global_id.
10 11 12 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 10 def global_id @global_id end |
#image_url ⇒ Object (readonly)
Returns the value of attribute image_url.
11 12 13 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 11 def image_url @image_url end |
#last_4 ⇒ Object (readonly)
Returns the value of attribute last_4.
12 13 14 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 12 def last_4 @last_4 end |
#mandate_type ⇒ Object (readonly)
Returns the value of attribute mandate_type.
13 14 15 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 13 def mandate_type @mandate_type end |
#merchant_or_partner_customer_id ⇒ Object (readonly)
Returns the value of attribute merchant_or_partner_customer_id.
14 15 16 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 14 def merchant_or_partner_customer_id @merchant_or_partner_customer_id end |
#subscriptions ⇒ Object (readonly)
Returns the value of attribute subscriptions.
15 16 17 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 15 def subscriptions @subscriptions end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
16 17 18 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 16 def token @token end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
17 18 19 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 17 def updated_at @updated_at end |
#view_mandate_url ⇒ Object (readonly)
Returns the value of attribute view_mandate_url.
18 19 20 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 18 def view_mandate_url @view_mandate_url end |
Class Method Details
._new(*args) ⇒ Object
34 35 36 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 34 def self._new(*args) self.new(*args) end |
.delete(*args) ⇒ Object
42 43 44 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 42 def self.delete(*args) Configuration.gateway.sepa_direct_debit_account.delete(*args) end |
.find(*args) ⇒ Object
38 39 40 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 38 def self.find(*args) Configuration.gateway.sepa_direct_debit_account.find(*args) end |
.sale(token, transaction_attributes) ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 46 def self.sale(token, transaction_attributes) = transaction_attributes[:options] || {} Configuration.gateway.transaction.sale( transaction_attributes.merge( :payment_method_token => token, :options => .merge(:submit_for_settlement => true), ), ) end |
.sale!(token, transaction_attributes) ⇒ Object
56 57 58 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 56 def self.sale!(token, transaction_attributes) return_object_or_raise(:transaction) { sale(token, transaction_attributes) } end |
Instance Method Details
#default? ⇒ Boolean
26 27 28 |
# File 'lib/braintree/sepa_direct_debit_account.rb', line 26 def default? @default end |