class PayPal::SDK::REST::DataTypes::BankAccount
Public Class Methods
find(resource_id)
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 470 def find(resource_id) raise ArgumentError.new("id required") if resource_id.to_s.strip.empty? path = "v1/vault/bank-accounts/#{resource_id}" self.new(api.get(path)) end
load_members()
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 434 def self.load_members object_of :id, String object_of :account_number, String object_of :account_number_type, String object_of :routing_number, String object_of :account_type, String object_of :account_name, String object_of :check_type, String object_of :auth_type, String object_of :auth_capture_timestamp, String object_of :bank_name, String object_of :country_code, String object_of :first_name, String object_of :last_name, String object_of :birth_date, String object_of :billing_address, Address object_of :state, String object_of :confirmation_status, String object_of :payer_id, String object_of :external_customer_id, String object_of :merchant_id, String object_of :create_time, String object_of :update_time, String object_of :valid_until, String end
Public Instance Methods
create()
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 462 def create() path = "v1/vault/bank-accounts" response = api.post(path, self.to_hash, http_header) self.merge!(response) success? end
delete()
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 477 def delete() path = "v1/vault/bank-accounts/#{self.id}" response = api.delete(path, {}) self.merge!(response) success? end
update(patch_request)
click to toggle source
# File lib/paypal-sdk/rest/data_types.rb, line 484 def update(patch_request) patch_request = PatchRequest.new(patch_request) unless patch_request.is_a? PatchRequest path = "v1/vault/bank-accounts/#{self.id}" response = api.patch(path, patch_request.to_hash, http_header) self.merge!(response) success? end