Class: BillForward::InsertableEntity
- Inherits:
-
BillingEntity
- Object
- BillingEntity
- BillForward::InsertableEntity
- Defined in:
- lib/bill_forward/insertable_entity.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BillingEntity
Class Method Summary collapse
-
.create(entity = nil) ⇒ self
The created Entity.
Instance Method Summary collapse
-
#initialize(*args) ⇒ InsertableEntity
constructor
A new instance of InsertableEntity.
Methods inherited from BillingEntity
#[], #[]=, #_dump, _load, build_entity, build_entity_array, #camel_case_lower, get_all, get_by_id, #method_missing, request_ambiguous, request_first_heterotyped, request_many_heterotyped, #serialize, #serialize_field, singleton_client, #state_params, #to_json, #to_ordered_hash, #to_s, #to_unordered_hash
Constructor Details
#initialize(*args) ⇒ InsertableEntity
Returns a new instance of InsertableEntity.
3 4 5 6 |
# File 'lib/bill_forward/insertable_entity.rb', line 3 def initialize(*args) raise AbstractInstantiateError.new('This abstract class cannot be instantiated!') if self.class == InsertableEntity super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BillForward::BillingEntity
Class Method Details
.create(entity = nil) ⇒ self
Returns The created Entity.
14 15 16 17 18 19 |
# File 'lib/bill_forward/insertable_entity.rb', line 14 def create(entity = nil) entity = self.new if entity.nil? TypeCheck.verifyObj(self, entity, 'entity') self.request_first('post', '', entity, nil, entity._client) end |