Class: Conekta::Card

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

Instance Attribute Summary

Attributes inherited from ConektaObject

#id, #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

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::ConektaObject

Instance Method Details

#deleteObject



10
11
12
# File 'lib/conekta/card.rb', line 10

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

#urlObject

Raises:



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

def url
  raise Error.new('Could not get the id of ' + self.class.class_name + ' instance.') if (id.nil? || id.empty?)
  self.customer.url + self.class.url + "/" + id
end