Class: Conekta::Destination
- Inherits:
-
Resource
- Object
- Hash
- ConektaObject
- Resource
- Conekta::Destination
- Defined in:
- lib/conekta/destination.rb
Instance Attribute Summary collapse
-
#account_holder_name ⇒ Object
Returns the value of attribute account_holder_name.
-
#bank ⇒ Object
Returns the value of attribute bank.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#last4 ⇒ Object
Returns the value of attribute last4.
-
#payee_id ⇒ Object
Returns the value of attribute payee_id.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Resource
Attributes inherited from ConektaObject
Instance Method Summary collapse
Methods included from Operations::CustomAction
Methods included from Operations::Update
Methods included from Operations::Delete
Methods inherited from Resource
_url, #create_member_with_relation, #initialize, underscored_class
Methods inherited from ConektaObject
#class_name, class_name, #create_attr, #first, #initialize, #inspect, #last, #load_from, #set_val, #to_s, #unset_key
Constructor Details
This class inherits a constructor from Conekta::Resource
Instance Attribute Details
#account_holder_name ⇒ Object
Returns the value of attribute account_holder_name.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def account_holder_name @account_holder_name end |
#bank ⇒ Object
Returns the value of attribute bank.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def bank @bank end |
#created_at ⇒ Object
Returns the value of attribute created_at.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def created_at @created_at end |
#currency ⇒ Object
Returns the value of attribute currency.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def currency @currency end |
#last4 ⇒ Object
Returns the value of attribute last4.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def last4 @last4 end |
#payee_id ⇒ Object
Returns the value of attribute payee_id.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def payee_id @payee_id end |
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'lib/conekta/destination.rb', line 7 def type @type end |
Instance Method Details
#_url ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/conekta/destination.rb', line 10 def _url if (id.nil? || id.to_s.empty?) exception = Error.new({ "message" => I18n.t('error.resource.id', { resource: self.class.class_name, locale: :en }), "message_to_purchaser" => I18n.t('error.resource.id_purchaser', { locale: Conekta.locale.to_sym }) }) if Conekta.api_version == "2.0.0" error_list = Conekta::ErrorList.new error_list.details << exception exception = error_list end raise exception end self.payee._url + self.class._url + "/" + id end |
#delete ⇒ Object
25 26 27 |
# File 'lib/conekta/destination.rb', line 25 def delete self.delete_member('payee','destinations') end |