Class: MangoPay::Mandate
  
  
  
Overview
  
  
    
      Class Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  included, parse_id_or_filters
  
  
  
  
  
  
  
  
  Methods inherited from Resource
  class_name, url
  
    Class Method Details
    
      
    
      
  
  
    .create(params, idempotency_key = nil)  ⇒ Object 
  
  
  
  
  
    | 
10
11
12
13 | # File 'lib/mangopay/mandate.rb', line 10
def create(params, idempotency_key = nil)
  url = "#{MangoPay.api_path}/mandates/directdebit/web"
  MangoPay.request(:post, url, params, {}, idempotency_key)
end | 
 
    
      
  
  
    .fetch_for_user(user_id, filters = {})  ⇒ Object 
  
  
  
  
    | 
20
21
22
23 | # File 'lib/mangopay/mandate.rb', line 20
def fetch_for_user(user_id, filters = {})
  url = "#{MangoPay.api_path}/users/#{user_id}/mandates"
  MangoPay.request(:get, url, {}, filters)
end | 
 
    
      
  
  
    .fetch_for_user_bank_account(user_id, bank_account_id, filters = {})  ⇒ Object 
  
  
  
  
    | 
25
26
27
28 | # File 'lib/mangopay/mandate.rb', line 25
def fetch_for_user_bank_account(user_id, bank_account_id, filters = {})
  url = "#{MangoPay.api_path}/users/#{user_id}/bankaccounts/#{bank_account_id}/mandates"
  MangoPay.request(:get, url, {}, filters)
end | 
 
    
      
  
  
    .transactions(mandate_id, filters = {})  ⇒ Object 
  
  
  
  
    
Fetches list of transactions belonging to given mandate_id.
Optional filters is a hash accepting following keys:
- 
page,per_page,sort: pagination and sorting params (see MangoPay::HTTPCalls::Fetch::ClassMethods#fetch)
 
- 
Status: TransactionStatus SUCCEEDED, FAILED
 
- 
ResultCode: string representing the transaction result
 
 
 
  
  
    | 
36
37
38
39 | # File 'lib/mangopay/mandate.rb', line 36
def transactions(mandate_id, filters = {})
  url = url(mandate_id) + '/transactions'
  MangoPay.request(:get, url, {}, filters)
end |