Module: PayoneerApi::Utils
- Included in:
- API::Payees, Client
- Defined in:
- lib/payoneer_api/utils.rb
Instance Method Summary collapse
-
#bool_to_string(boolean) ⇒ nil, String
Turn a ruby boolean into an XML ‘True’/‘False’ string.
- #payout_methods_list(payout_methods) ⇒ Object
- #perform(request_method, options) ⇒ Object
- #perform_with_object(request_method, options, klass) ⇒ Object
Instance Method Details
#bool_to_string(boolean) ⇒ nil, String
Turn a ruby boolean into an XML ‘True’/‘False’ string
7 8 9 10 |
# File 'lib/payoneer_api/utils.rb', line 7 def bool_to_string(boolean) return nil if boolean.nil? boolean ? 'True' : 'False' end |
#payout_methods_list(payout_methods) ⇒ Object
12 13 14 15 16 |
# File 'lib/payoneer_api/utils.rb', line 12 def payout_methods_list(payout_methods) payout_methods.is_a?(Array) ? payout_methods.join(',') : payout_methods.to_s end |
#perform(request_method, options) ⇒ Object
20 21 22 23 |
# File 'lib/payoneer_api/utils.rb', line 20 def perform(request_method, ) request = PayoneerApi::Request.new(self, request_method, ) request.perform end |
#perform_with_object(request_method, options, klass) ⇒ Object
28 29 30 31 |
# File 'lib/payoneer_api/utils.rb', line 28 def perform_with_object(request_method, , klass) request = PayoneerApi::Request.new(self, request_method, ) request.perform_with_object(klass) end |