Class: MangoPay::Recipient
- Defined in:
- lib/mangopay/recipient.rb
Class Method Summary collapse
- .create(params, user_id, idempotency_key = nil) ⇒ Object
- .deactivate(recipient_id) ⇒ Object
- .get(recipient_id, filters = {}) ⇒ Object
- .get_payout_methods(country, currency, filters = {}) ⇒ Object
- .get_schema(payout_method_type, recipient_type, currency, country, filters = {}) ⇒ Object
- .get_user_recipients(user_id, filters = {}) ⇒ Object
- .validate(params, user_id, idempotency_key = nil) ⇒ Object
Methods inherited from Resource
Class Method Details
.create(params, user_id, idempotency_key = nil) ⇒ Object
4 5 6 |
# File 'lib/mangopay/recipient.rb', line 4 def self.create(params, user_id, idempotency_key = nil) MangoPay.request(:post, "#{MangoPay.api_path}/users/#{user_id}/recipients", params, {}, idempotency_key) end |
.deactivate(recipient_id) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/mangopay/recipient.rb', line 28 def self.deactivate(recipient_id) params = { Status: 'DEACTIVATED' } MangoPay.request(:put, "#{MangoPay.api_path}/recipients/#{recipient_id}", params, {}) end |
.get(recipient_id, filters = {}) ⇒ Object
8 9 10 |
# File 'lib/mangopay/recipient.rb', line 8 def self.get(recipient_id, filters = {}) MangoPay.request(:get, "#{MangoPay.api_path}/recipients/#{recipient_id}", {}, filters) end |
.get_payout_methods(country, currency, filters = {}) ⇒ Object
20 21 22 |
# File 'lib/mangopay/recipient.rb', line 20 def self.get_payout_methods(country, currency, filters = {}) MangoPay.request(:get, "#{MangoPay.api_path}/recipients/payout-methods?country=#{country}¤cy=#{currency}", {}, filters) end |
.get_schema(payout_method_type, recipient_type, currency, country, filters = {}) ⇒ Object
16 17 18 |
# File 'lib/mangopay/recipient.rb', line 16 def self.get_schema(payout_method_type, recipient_type, currency, country, filters = {}) MangoPay.request(:get, "#{MangoPay.api_path}/recipients/schema?payoutMethodType=#{payout_method_type}&recipientType=#{recipient_type}¤cy=#{currency}&country=#{country}", {}, filters) end |