Class: SlimpayClient::Mandate

Inherits:
Resource show all
Defined in:
lib/slimpay_client/mandate.rb

Instance Method Summary collapse

Methods inherited from Resource

#get_one, #initialize

Methods inherited from Base

#generate_api_methods, #initialize

Constructor Details

This class inherits a constructor from SlimpayClient::Resource

Instance Method Details

#document(id = 'mandate01') ⇒ Object



11
12
13
14
15
16
# File 'lib/slimpay_client/mandate.rb', line 11

def document(id = 'mandate01')
  url = "mandates/#{id}/document"
  body_options = {}
  response = HTTParty.get("#{@endpoint}/#{url}", body: body_options.to_json, headers: options)
  follow_up_api(response)
end

#revoke(id = 'mandate01') ⇒ Object

POST



4
5
6
7
8
9
# File 'lib/slimpay_client/mandate.rb', line 4

def revoke(id = 'mandate01')
  url = "mandates/#{id}/revocation"
  body_options = {}
  response = HTTParty.post("#{@endpoint}/#{url}", body: body_options.to_json, headers: options)
  follow_up_api(response)
end