Class: MachineShop::DataSourceTypes

Inherits:
APIResource show all
Includes:
APIOperations::Create, APIOperations::Delete, APIOperations::List
Defined in:
lib/machineshop/data_source_types.rb

Instance Attribute Summary

Attributes inherited from MachineShopObject

#auth_token

Instance Method Summary collapse

Methods included from APIOperations::Delete

#delete

Methods included from APIOperations::Create

included

Methods included from APIOperations::List

included

Methods inherited from APIResource

class_name, #refresh, retrieve, #url

Methods inherited from MachineShopObject

#[], #[]=, #as_json, construct_from, #each, #initialize, #inspect, #keys, #refresh_from, #to_hash, #to_json, #to_s, #values

Constructor Details

This class inherits a constructor from MachineShop::MachineShopObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MachineShop::MachineShopObject

Instance Method Details

#create_data_source(params) ⇒ Object



8
9
10
11
# File 'lib/machineshop/data_source_types.rb', line 8

def create_data_source(params)
  params.merge!({:data_source_type => self.id})
  DataSources.create(params, @auth_token)
end

#create_email_data_source(params) ⇒ Object



13
14
15
16
# File 'lib/machineshop/data_source_types.rb', line 13

def create_email_data_source(params)
  params.merge!({:data_source_type => self.id})
  MachineShop.gem_post(email_data_source_url, @auth_token, params)
end