Class: Vpsa::Api::Installments
- Inherits:
-
Client
- Object
- Client
- Vpsa::Api::Installments
show all
- Defined in:
- lib/vpsa/api/installments.rb
Instance Attribute Summary
Attributes inherited from Client
#access_token
Instance Method Summary
collapse
Methods inherited from Client
#default_entries, #entities, #initialize, #installments, #provisions, #third_parties, #user_data
#require_all
Constructor Details
This class inherits a constructor from Vpsa::Client
Instance Method Details
#create(data) ⇒ Object
15
16
17
|
# File 'lib/vpsa/api/installments.rb', line 15
def create(data)
return parse_response(self.class.post("/", :body => build_body(data), :headers => ))
end
|
#find(id) ⇒ Object
23
24
25
|
# File 'lib/vpsa/api/installments.rb', line 23
def find(id)
return parse_response(self.class.get("/#{id}", :body => build_body, :headers => ))
end
|
#list(searcher = nil) ⇒ Object
8
9
10
11
12
13
|
# File 'lib/vpsa/api/installments.rb', line 8
def list(searcher = nil)
raise ArgumentError unless searcher.nil? || searcher.is_a?(Vpsa::Searcher::Financial::InstallmentSearcher)
return parse_response(self.class.get("/", :body => build_body(searcher.as_parameter), :headers => )) if searcher
return parse_response(self.class.get("/", :body => build_body, :headers => )) unless searcher
end
|
#update(id, data) ⇒ Object
19
20
21
|
# File 'lib/vpsa/api/installments.rb', line 19
def update(id, data)
return parse_response(self.class.put("/#{id}", :body => build_body(data), :headers => ))
end
|