Class: Conekta::Card

Inherits:
Resource show all
Includes:
Operations::CustomAction, Operations::Delete, Operations::Update
Defined in:
lib/conekta/card.rb

Instance Attribute Summary collapse

Attributes inherited from Resource

#id

Attributes inherited from ConektaObject

#values

Instance Method Summary collapse

Methods included from Operations::CustomAction

#custom_action

Methods included from Operations::Update

#update

Methods included from Operations::Delete

#delete_member

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

#binObject

Returns the value of attribute bin.



7
8
9
# File 'lib/conekta/card.rb', line 7

def bin
  @bin
end

#brandObject

Returns the value of attribute brand.



7
8
9
# File 'lib/conekta/card.rb', line 7

def brand
  @brand
end

#created_atObject

Returns the value of attribute created_at.



7
8
9
# File 'lib/conekta/card.rb', line 7

def created_at
  @created_at
end

#defaultObject

Returns the value of attribute default.



7
8
9
# File 'lib/conekta/card.rb', line 7

def default
  @default
end

#exp_monthObject

Returns the value of attribute exp_month.



7
8
9
# File 'lib/conekta/card.rb', line 7

def exp_month
  @exp_month
end

#exp_yearObject

Returns the value of attribute exp_year.



7
8
9
# File 'lib/conekta/card.rb', line 7

def exp_year
  @exp_year
end

#last4Object

Returns the value of attribute last4.



7
8
9
# File 'lib/conekta/card.rb', line 7

def last4
  @last4
end

#nameObject

Returns the value of attribute name.



7
8
9
# File 'lib/conekta/card.rb', line 7

def name
  @name
end

#parent_idObject

Returns the value of attribute parent_id.



7
8
9
# File 'lib/conekta/card.rb', line 7

def parent_id
  @parent_id
end

Instance Method Details

#_urlObject



11
12
13
14
15
# File 'lib/conekta/card.rb', line 11

def _url
  ensure_id

  self.customer._url + self.class._url + "/" + id
end

#deleteObject



17
18
19
# File 'lib/conekta/card.rb', line 17

def delete
  self.delete_member('customer','cards')
end