Class: Omise::OmiseObject
- Inherits:
-
Object
- Object
- Omise::OmiseObject
- Includes:
- Attributes
- Defined in:
- lib/omise/object.rb
Direct Known Subclasses
Account, Balance, BankAccount, Capability, Card, Chain, Charge, Customer, Dispute, Document, Event, Forex, Integration, Link, List, Occurrence, Receipt, Recipient, Refund, Schedule, Source, Token, Transaction, Transfer
Class Attribute Summary collapse
-
.endpoint ⇒ Object
Returns the value of attribute endpoint.
Class Method Summary collapse
Methods included from Attributes
#[], #as_json, #assign_attributes, #attributes, #destroyed?, #initialize, #key?, #location, #method_missing, #predicate?, #respond_to_missing?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Omise::Attributes
Class Attribute Details
.endpoint ⇒ Object
Returns the value of attribute endpoint.
9 10 11 |
# File 'lib/omise/object.rb', line 9 def endpoint @endpoint end |
Class Method Details
.location(id = nil) ⇒ Object
11 12 13 |
# File 'lib/omise/object.rb', line 11 def location(id = nil) [endpoint, id].compact.join("/") end |
.resource(path, attributes = {}) ⇒ Object
15 16 17 18 19 |
# File 'lib/omise/object.rb', line 15 def resource(path, attributes = {}) key = attributes.delete(:key) { resource_key } preprocess_attributes!(attributes) Omise.resource.new(resource_url, path, key) end |