Class: EloquaApiService::CustomObject
- Inherits:
-
Service
- Object
- Service
- EloquaApiService::CustomObject
show all
- Defined in:
- lib/eloqua_api_service/custom_object.rb
Constant Summary
collapse
- BASE_PATH =
"/API/REST/1.0"
Instance Method Summary
collapse
Methods inherited from Service
#initialize, #parse, #parse_body
Instance Method Details
#all ⇒ Object
11
12
13
|
# File 'lib/eloqua_api_service/custom_object.rb', line 11
def all
parse(self.class.get("#{BASE_PATH}/assets/customObjects?depth=complete", @options))
end
|
#create(name:) ⇒ Object
15
16
17
18
|
# File 'lib/eloqua_api_service/custom_object.rb', line 15
def create(name:)
@options[:body] = { name: name, description: 'created from cli' }.to_json
parse(self.class.post("#{BASE_PATH}/assets/customObject", @options))
end
|
#data_by_id(id:) ⇒ Object
20
21
22
|
# File 'lib/eloqua_api_service/custom_object.rb', line 20
def data_by_id(id:)
parse(self.class.get("#{BASE_PATH}/data/customObject/#{id}?depth=complete", @options))
end
|
#find(id:) ⇒ Object
7
8
9
|
# File 'lib/eloqua_api_service/custom_object.rb', line 7
def find(id:)
parse(self.class.get("#{BASE_PATH}/assets/customObject/#{id}?depth=complete", @options))
end
|