Module: Smartcoin::ApiOperations::Retrieve
- Included in:
- Charge, Customer, Plan, Subscription
- Defined in:
- lib/smartcoin/api_operations/retrieve.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
11 12 13 |
# File 'lib/smartcoin/api_operations/retrieve.rb', line 11 def self.included(base) base.extend(Retrieve) end |
Instance Method Details
#retrieve(obj_id) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/smartcoin/api_operations/retrieve.rb', line 4 def retrieve(obj_id) obj_id = "?email=#{obj_id}" if obj_id.include? '@' method = :get response = api_request("#{url}/#{obj_id}",method) create_from(response) end |