lib/promisepay/models/user.rb
# Gets PayPal account for a user on a marketplace.
#
# @see https://reference.promisepay.com/#show-user-paypal-account
#
# @return [Promisepay::PaypalAccount]
Gets PayPal account for a user on a marketplace.
Gets PayPal account for a user on a marketplace .
def paypal_account
      response = JSON.parse(@client.get("users/#{send(:id)}/paypal_accounts").body)
      Promisepay::PaypalAccount.new(@client, response['paypal_accounts'])
    rescue Promisepay::UnprocessableEntity
      nil
    end
def paypal_account response = JSON . parse ( @client . get ( "users/#{send(:id)}/paypal_accounts" ) . body ) Promisepay :: PaypalAccount . new ( @client , response [ 'paypal_accounts' ] ) rescue Promisepay :: UnprocessableEntity nil end
Gets PayPal account for a user on a marketplace.
Gets PayPal account for a user on a marketplace .
None
Promisepay::PaypalAccount
see
None