lib/pin_payment/recipient.rb
def update email, account_or_token = nil
      attributes = self.class.attributes - [:token, :created_at]
      options    = self.class.parse_options_for_request(attributes, email: email, bank_account: account_or_token)
      response   = self.class.put(URI.parse(PinPayment.api_url).tap{|uri| uri.path = "/1/recipients/#{token}" }, options)
      self.email = response['email']
      self.bank_account  = response['bank_account']
      self
    end
def update email, account_or_token = nil
      attributes = self.class.attributes - [:token, :created_at]
      options    = self.class.parse_options_for_request(attributes, email: email, bank_account: account_or_token)
      response   = self.class.put(URI.parse(PinPayment.api_url).tap{|uri| uri.path = "/1/recipients/#{token}" }, options)
      self.email = response['email']
      self.bank_account  = response['bank_account']
      self
    end
Update a recipient using the pin API.

 @param [String] email the recipients's new email address
 @param [String, PinPayment::BankAccount, Hash] account_or_token the recipient's new bank account details
 @return [PinPayment::Customer]