class Promisepay::PaypalAccountResource
Resource for the PaypalAccounts API
Public Instance Methods
create(attributes)
click to toggle source
Create a Paypal account for a user on a marketplace.
@see reference.promisepay.com/#create-paypal-account
@param attributes [Hash] Paypal Account's attributes.
@return [Promisepay::PaypalAccount]
# File lib/promisepay/resources/paypal_account_resource.rb, line 27 def create(attributes) response = JSON.parse(@client.post('paypal_accounts', attributes).body) Promisepay::PaypalAccount.new(@client, response['paypal_accounts']) end
find(id)
click to toggle source
Get paypal account for a user on a marketplace.
@see reference.promisepay.com/#show-paypal-account
@param id [String] Paypal Account
ID.
@return [Promisepay::PaypalAccount]
# File lib/promisepay/resources/paypal_account_resource.rb, line 15 def find(id) response = JSON.parse(@client.get("paypal_accounts/#{id}").body) Promisepay::PaypalAccount.new(@client, response['paypal_accounts']) end
model()
click to toggle source
# File lib/promisepay/resources/paypal_account_resource.rb, line 4 def model Promisepay::PaypalAccount end