Class: Hyperwallet::User::PaypalAccount

Inherits:
HyperwalletObject show all
Defined in:
lib/hyperwallet/user.rb

Instance Attribute Summary

Attributes inherited from HyperwalletObject

#values

Class Method Summary collapse

Methods inherited from HyperwalletObject

attributes, construct_from, convert_to_hyperwallet_object, #initialize, #method_missing, relations, #respond_to_missing?

Constructor Details

This class inherits a constructor from Hyperwallet::HyperwalletObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Hyperwallet::HyperwalletObject

Class Method Details

.all(user_token, params) ⇒ Object



41
42
43
44
# File 'lib/hyperwallet/user.rb', line 41

def self.all(user_token, params)
  res = Hyperwallet.request(:get, "/users/#{user_token}/paypal-accounts", params)
  convert_to_hyperwallet_object(res, PaypalAccount)
end

.create(user_token, params) ⇒ Object



51
52
53
54
# File 'lib/hyperwallet/user.rb', line 51

def self.create(user_token, params)
  res = Hyperwallet.request(:post, "/users/#{user_token}/paypal-accounts", params)
  convert_to_hyperwallet_object(res, PaypalAccount)
end

.find(user_token, account_token) ⇒ Object



46
47
48
49
# File 'lib/hyperwallet/user.rb', line 46

def self.find(user_token, )
  res = Hyperwallet.request(:get, "/users/#{user_token}/paypal-accounts/#{}")
  convert_to_hyperwallet_object(res, PaypalAccount)
end

.update(user_token, account_token, params) ⇒ Object



56
57
58
59
# File 'lib/hyperwallet/user.rb', line 56

def self.update(user_token, , params)
  res = Hyperwallet.request(:put, "/users/#{user_token}/paypal-accounts/#{}", params)
  convert_to_hyperwallet_object(res, PaypalAccount)
end