Class: Iugu::PaymentMethod
- Inherits:
-
APIResource
- Object
- Object
- APIResource
- Iugu::PaymentMethod
- Defined in:
- lib/iugu/payment_method.rb
Instance Attribute Summary
Attributes inherited from Object
#attributes, #errors, #unsaved_attributes
Class Method Summary collapse
Methods included from APIDelete
Methods included from APISave
Methods included from APICreate
Methods included from APIFetch
Methods inherited from APIResource
endpoint_url, #is_new?, object_base_uri, object_type, relative_url
Methods inherited from Object
#add_accessor, #copy, #initialize, #method_missing, #modified_attributes, #set_attributes
Constructor Details
This class inherits a constructor from Iugu::Object
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Iugu::Object
Class Method Details
.url(options = {}) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/iugu/payment_method.rb', line 10 def self.url( = {}) customer_id = [:customer_id] || ["customer_id"] id = [:id] || ["id"] raise StandardError, "Missing Customer ID" unless customer_id "#{Customer.url customer_id}/#{object_base_uri}" + relative_url(id) end |