def save
      if new_record? || changed?
        clear_errors
        @response = API.send(
          persisted? ? :put : :post, path, to_xml
        )
        reload response
        persist! true
      end
      true
    rescue API::UnprocessableEntity => e
      apply_errors e
      Transaction::Error.validate! e, (self if is_a?(Transaction))
      false
    end
def save
      if new_record? || changed?
        clear_errors
        @response = API.send(
          persisted? ? :put : :post, path, to_xml
        )
        reload response
        persist! true
      end
      true
    rescue API::UnprocessableEntity => e
      apply_errors e
      Transaction::Error.validate! e, (self if is_a?(Transaction))
      false
    end
Attempts to save the record, returning the success of the request.

 @return [true, false]
 @raise [Transaction::Error] A monetary transaction failed.
 @example
   account = Recurly::Account.new
   account.save # => false
   account.account_code = 'account_code'
   account.save # => true
 @see #save!